Forum Discussion
Altera_Forum
Honored Contributor
9 years agoSDRAM read out of sync
I am testing SDRAM read and write using nios. I wrote a simple function with loops to write to 15 memory locations and read them back. for(i=min; i<max; i++) {
IOWR(SDRAM_BASE,0,i...
Altera_Forum
Honored Contributor
9 years agopbase is a pointer to the DRAM base address and gets incremented every time to the next memory location in the loop.
# define SDRAM_BASE 0x00000000 void test() { pbase=(alt_u32 *) mem_base; . . } void main() { test(SDRAM_BASE, 0, 0x000000ff); //just testing the first ff memory locations }