Forum Discussion
Altera_Forum
Honored Contributor
16 years agoInterface to dual port ram memory
Hi, I want to access (read/write) dual port ram in my sopc system. How could I do that in my Nios II program? Thanks, Caridee
Altera_Forum
Honored Contributor
16 years agoThrough the IOWR macro:
IOWR(YOUR_DPRAM_BASE,reg,value) Where reg is the 32-bit register number (reg = 0 will write at YOUR_DPRAM_BASE, reg = 1 will write at YOUR_DPRAM_BASE+4, etc...) and value is the 32-bit value to write. Using pointers: int *myPointer = (int*)alt_remap_uncached(YOUR_DPRAM_BASE,YOUR_DPRAM_SPAN);
myPointer = value1;
myPointer = value2; etc...