Forum Discussion
Altera_Forum
Honored Contributor
20 years agoMemory access from Nios I
Hej ! I'm quite a newbie to Nios 1 so it may be quite easy but I don't figure out how to do this : I have a peripheral which I declared as a user-logic component in SOPC Builder and as a m...
Altera_Forum
Honored Contributor
20 years agoHello Fly,
I presume excalibur.h has given you an address for your block of user logic and has cast it to be a pointer to void like this na_mylogic ((void*) 0x0002010) If your logic expects to be written and read in 32-bit wide accesses (ints) then just declare an integer pointer and make it point to your logic using a cast. unsigned int *my_pointer = (unsigned int*)na_mylogic; You could now use my_pointer to access your logic as if it were a memory array (of integers). You could easily modify the above to suit the width of your logic. I hope this is what you were asking, and it is of some help. Banx.