Forum Discussion
custom ip core
I am using de2-115 withquartus.
I have created an IP core in the platform designer, addede it to my quartus project main vhdl file, compil it but it is not included whenI open eclipse.
how to exploit a custom IP data core in eclipse?
33 Replies
- AnandRaj_S_Intel
Regular Contributor
Hi,
Is custom component have avalone interface??
If yes, Check the connection between slave and master.
If no, You should have avalone interface so that custom IP is visible in eclipse.
Refer below documents for custom IP creation.
ftp://ftp.intel.com/Pub/fpgaup/pub/Intel_Material/13.1/Tutorials/Making_Qsys_Components.pdf
https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/tt/tt_my_first_nios_sw.pdf
Regards
Anand
- rkaib
Occasional Contributor
hello anand,
I think I am using the right .sopcinfo(because it is the same working project that I modify),
I am reading the avalon interface document you have with many thanks provided.
You find attached my project: I am trying to make a custom IP ("myRossler") be visible by eclipse,
you have adviced me to add an avalon interface which I havent managed yet.
do not hesistate to ask me again if any information is needed about the project.
thanks
- AnandRaj_S_Intel
Regular Contributor
Hi,
Your myRossler IP dose not have any logic or avalone interface.
Add avalone interface and check the eclipse.
Thanks for update
I don't have vga subsystem to compile your design.
Regards
Anand
- rkaib
Occasional Contributor
hello anand,
I have made some change as follows:
- in Platform Designer: in my IP ("myrossler"), I have added an avalon memory mapped slave with (avalon_slave_read[1],)avalon_slave_readdata[8],avalon_slave_write[1],avalon_slave_writedata[8]),
- In quartus: in DE2_115_computer.vhd, in component and port map added my_rossler_conduit_end_read1 : ou std_logic_vector (31 downto 0); for read1,read2 and read3, then I connected them with myrossler_read1, myrossler_read2 and myrossler_read3, then I compiled.
My problem is: 12002 Port "avalon_slave_read" does not exist in macrofunction "myrossler_0"
12002 Port "avalon_slave_readdata" does not exist in macrofunction "myrossler_0"
12002 Port "avalon_slave_write" does not exist in macrofunction "myrossler_0"
12002 Port "avalon_slave_writedata" does not exist in macrofunction "myrossler_0".
just to remind you "myrossler" is a custom IP that has inputs clk and rst and outputs 3 32 bits signals that I want to exploit
Thank you very much anand
- rkaib
Occasional Contributor
thank you very much anand, that has been all I needed for the moment.
I really appreciate it from you.
- rkaib
Occasional Contributor
Hello Anand,
that's what I did but the problem I am getting different values, maybe I am reading from different location.
I have added these line to my eclipse code:
#define rossler (unsigned char*) MYROSSLER_0_BASE
int main()
{
for (int i=0;i<500;i++)
{
printf("%d, ", *(rossler +i));
}
}
just to remind you Anand, all I need is just retreive one of the three output 32 bits signal x, y and z.
I do not know what I miss.
- AnandRaj_S_Intel
Regular Contributor
We are going out of the context of the subject kindly open new case.
- rkaib
Occasional Contributor
I also want to ask you anand about the file .vhd that outputs the 3 signals, because the one that you added in the custom IP
is called myRossler.v that you created myRossler(clock, resetn,writedata,readdata, write,read,by.teenabel..))
so my question how this IP connects to that.
- AnandRaj_S_Intel
Regular Contributor
Which .vhd?
The project which i have attached is having single register with avalone interface.
- rkaib
Occasional Contributor
Hi anand
Maybe I did not explain well, but I think it is in the problem because My initial problem was to create a custom IP using myRossler.vhd (attached) then make its outputs x,y,z visible in eclipse.
so the one you created myRossler.v doesnot provide the outputs I need ,it rather linkes the outputs using reg.v
Could you please show me how to do that using the file attached.
- rkaib
Occasional Contributor
hi Anand,
the txt file I attached "myRossler.vhd" provide as output 3 signalz x,y and z of 32 bit,
I just want you please to show me how to use your example to make these signals x,y,z
visible in eclipse.
because in the project you attached "myRossler.v" used reg32.v to output Q_export.
It is ineed visible in eclipse by the name MYROSSLER_0_BASE but doesnot give any of the 3 signals x, y or z.
can you please just tell me how to do we with "myRossler.vhd"
- AnandRaj_S_Intel
Regular Contributor
WE ARE NOT HERE FOR CREATING PROJECT
It is ineed visible in eclipse by the name MYROSSLER_0_BASE but does not give any of the 3 signals x, y or z.
>>It's Qsys IP instance name. You have to modify myRossler.v & reg32.v as per your requirement.
It is ineed visible in eclipse by the name MYROSSLER_0_BASE but doesnot give any of the 3 signals x, y or z.
>> You will not see any signals in eclipse, You can communicate using base address check system.h for base address.
Refer below link and try to understand how PIO communicated using base address.
https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/tt/tt_my_first_nios_sw.pdf
Regards
Anand
- AnandRaj_S_Intel
Regular Contributor
Hi,
1.does slave_address variable increment automatically or do I have to do it?
>> NO, you're giving the address from the software.
IORD_32DIRECT(REG32_AVALON_INTERFACE_0_BASE,0);
REG32_AVALON_INTERFACE_0_BASE=slave_address
2.how to use Q1_export 1,2 and 3?
>> You can export x,y,& z as per your requirements.
3.do I still need to use chipselect variable (because there is no write part)?
>>Not a mandatory.
4.how data are stored in memory ie (REG32_AVALON_INTERFACE_0_BASE+1,...)?
>>Each component have a unique base address through which we can access its registers.
In your design REG32_AVALON_INTERFACE_0_BASE is the base address of your component.
Inside your custom component, you have memory and its address is the offset.
mem(0)<=data1; --0 is the offset address
mem(1)<=data1;--1 is the offset address
REG32_AVALON_INTERFACE_0_BASE+1 you can access mem(1) content.
data I am getting in eclipse is random (different from the real x, y and z).
>>Give some static values and check
Put your IORD_32DIRECT command in while loop.
I have provided all the required design example and documents for your design. Open a new thread for further support.
Regards
Anand
- rkaib
Occasional Contributor
hi anand,
Indeed, you have provided all the required design example and documents of my design.
t is me who lack some experience since it is the first time that I create a custom IP
I will open a new thread, I would just ask you if you will be able the one who answers the new thread
because I am almost finished with this problem but need some verification from you.
- rkaib
Occasional Contributor
beside, it is the last difficulty remaining in my work.
- AnandRaj_S_Intel
Regular Contributor
Yes redouane, You can ask.
- rkaib
Occasional Contributor
Thank you Anand.
I am opening new thread, would you tell me which category I can find you (when choosing ask a Question>>Post To..).
I know it is really awkward of me but I have a final same quick question in this thread before closing it today (because if i closed it right know , it would really be hard to explain the whole problem right from the beginning to somebody else).
I know it is not that difficult for you and it represents a lot for me as this point is key in my design problem.
I have tried different things but at this point I really need some assistance form an experienced person as I am working alone.
I have created 2 processes(proc1 and proc2).
*inside proc1 I have included: r_Mem(0) <= x; r_Mem(1) <= y; r_Mem(2) <= z; to store my outputs.
*proc2 is for reading:
proc2: process(clock, resetn)
begin
if(rising_edge(clock)) then
if (read='1') then
readdata <= r_Mem(slave_address);
end if;
end if;
end process;
*in eclipse:
while (1)
{
int x=IORD(REG32_AVALON_INTERFACE_0_BASE,0) ;
printf("x=%d",x);
}
but I am not reading the right data even when I have put r_Mem(0) <= x"FFFFFFFF"; (as you adviced)
so it seems that the code is not reaching this line,
I have then tried to include the reading process(proc2) lines inside proc1(right after storing in the memory), it did not work,
after that, I tried to store data right after proc 1 in vain,
lastly, I tried to store in memory r_Mem(0) <= x inside proc 2 then readdata <= r_Mem(slave_address);
Any ideas?
- AnandRaj_S_Intel
Regular Contributor
Okay, what output you are getting?
is it FFF60000?If so check the reset signal in your design.
The reset signal in your reg32_avalone_interface should be active low.
If you have further Queries open new case and tag me(@<name>) if you want.
Regards
Anand