Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises

custom ip core

rkaib
Beginner
4,941 Views

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?

0 Kudos
33 Replies
rkaib
Beginner
1,726 Views

not at all Anand,

I am not looking for letting you create any project for me,

All I need is to export 3 signals into eclipse,

so can you please show me how to put these signals in the reg_32 you provided,

or at least show me how to modify it so it can export those needed signals

thank you

0 Kudos
AnandRaj_S_Intel
Employee
1,726 Views

Read the pdf line by line attached in my previous post.

 

Try it by user self.

I have shown it for one signal you should do it for 3 signal.

 

0 Kudos
rkaib
Beginner
1,726 Views

Mr Anand,

Now I can see that you haven'y got my meaning yet

and I understand your frustration with me

I am not asking how to export 1 signal,

this I can do it now, from the project and all the documents you post it, I can apply it for more than 1 signals

If I asked something like that, it would silly of me.

My question though is this: I have a function that I called myRossler,

this function perfoms some intermediary calculations and outputs three variables x,y,z

All I am asking if possible, how do I modify reg32_avalon_interface you provided (which works fine)

so I can export them using reg32.

I hope I have made myself clear this time.

sorry for the inconvenience I may have caused you anyways, Annad

 

0 Kudos
AnandRaj_S_Intel
Employee
1,726 Views

Hi,

 

First let us understand how to communicate to custom component using Nios ii.

 

You need to have a custom component with avalone interface with some logic to handle the request from Nioss II Memory mapped master.So that custom component signals or registers can be accessed using eclipse/software.

Basically Nios II<->Onchip-ram<-> custom component(myRossler).

 

I can't see any logic in your myRossler for communicating with Nios II, so that you can access,control or modify the register /signals using software or eclipse project.

 

Please check attached an example and try to modify your design, If still your facing problem you should undergo training.

 

https://www.intel.com/content/www/us/en/programmable/support/training/catalog.html

 

Regards

Anand

0 Kudos
rkaib
Beginner
1,726 Views

Hi Anand,

Thank you for your last post,

In which you write in reg32_avalon_interface (IOWR) then you can read from it (IORD) (in eclipse)

It is working fine,

I would ask you Anand to just bear with me a little bit more because I am almost there, so I can

move to something else and not bother you anymore in this topic.

 

I modified your reg32_avalon_interface.vhd such as:

I have removed the writing input part (write and writedata) because I need just to read the data that the function outputs ( x, y,z) then put them in Q_export.

so I modified your reg32_avalon_interface.vhd file by including my function called myRossler in a new process, It outputs x,y,z. then I have put these outputs in Q_export1,2 and 3.

The last part I am still stuck in is how to read these export data in eclipse.

so would you please just have a final look on my modifications and tell me how to read these data in eclipse.

best regards

0 Kudos
AnandRaj_S_Intel
Employee
1,726 Views

​Hi,

 

so I modified your reg32_avalon_interface.vhd file by including my function called myRossler in a new process, It outputs x,y,z. then I have put these outputs in Q_export1,2 and 3

  1. Also store x,y&z data in r_Mem memory.
  2. r_Mem (offset) you can access the data using base address plus offset.

Example:

       r_Mem (0)<=x;

       r_Mem (1)<=y;

       r_Mem (3)<=z;

      readdata<= r_Mem(slave_address);

IORD_32DIRECT(REG32_AVALON_INTERFACE_0_BASE,0); // you can access x data

IORD_32DIRECT(REG32_AVALON_INTERFACE_0_BASE+1,0);//You can access y data and so on

 

Regards

Anand

 

 

0 Kudos
rkaib
Beginner
1,726 Views

thank you for the example.

can you please have a look on what I did in reg32_avalon_interface.vhd. escecially on the read process

quick questions for you Anand:

1.does slave_address variable increment automatically or do I have to do it?

2.how to use Q1_export 1,2 and 3?

3.do I still need to use chipselect variable (because there is no write part)?

4.how data are stored in memory ie (REG32_AVALON_INTERFACE_0_BASE+1,...)?

the data I am getting in eclipse is random (different from the real x, y and z).

Anand I have read your last document carrefully as you suggested

all I need is some assistance from you, I need just to retreive x,y and z correctly

afterwards we close this thread if you see that it has taken too much

thank you, looking forward to hearing from you.

 

0 Kudos
AnandRaj_S_Intel
Employee
1,726 Views

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

 

0 Kudos
rkaib
Beginner
1,726 Views

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.

 

 

0 Kudos
rkaib
Beginner
1,726 Views

beside, it is the last difficulty remaining in my work.

0 Kudos
AnandRaj_S_Intel
Employee
1,726 Views

Yes redouane, You can ask.

0 Kudos
rkaib
Beginner
1,726 Views

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?

0 Kudos
AnandRaj_S_Intel
Employee
1,726 Views

​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

0 Kudos
Reply