Forum Discussion
Altera_Forum
Honored Contributor
16 years agoDMA memtest.c confusion
Hi, I am using DMA device in my Nios program for DE1 board. The code memtest.c is taken from the example given in Nios IDE. The part of the code is shown below between green arterisk: *******...
Altera_Forum
Honored Contributor
16 years ago1) the IOWR_*DIRECTmacros always use addresses in a 8-bit space, so with offset at 4 the data will indeed be written at addresses 0x0004 to 0x0007. The code is correct. It would have been different if you had used the [] operator on an int pointer.
2) it would still write 0x1000 bytes. Of course only the first 0x0100 bytes would be the ones that you placed there.