Forum Discussion
Altera_Forum
Honored Contributor
16 years agoDMA Transfer Issue
Hi,
I have build a system which has NIOS II, DDR SDRAM controller, On-Chip RAM, UART,DMA Controller. My program memory is DDR SDRAM. I have connected DMA controller between DDR SDRAM and On-Chip Memory. I have written a program to transfer data from SDRAM to on-chip memory, before transfering the data from DDR SDRAm i write an incremental data pattern into DDR SDRAM. the program executes but i am not seeing the pattern data into my On-Chip RAM why i don't know? is logically i am correct to DMA the data from program memory i.e. DDR SDRAM to On-chip RAM?? Thanks, Bhupesh14 Replies
- Altera_Forum
Honored Contributor
Thanks MSchmitt,
It is working :) I made those changes u sugestted at different places of the code. Thanks, Bhupesh - Altera_Forum
Honored Contributor
fine, nice to read.
so i assume that the system.h still holds the start adress of the ddr but that is not the start adr nios and dma sees due to the bridge offset. maybe some altera gurus can explain how altera recommends to use these adresses from system.h or it is supposed to be used. - Altera_Forum
Honored Contributor
Hi MSchmitt,
you r write the nios & dma does not seems to be looking DDR SDRAM address, insted they see a bridge address. In system.h the DDR SDRAM & Bridge address where set to same i.e bridge address. I think i was making some mistake while passing the address. I will try to change the code with the base address and update with the result. thanks, bhupesh - Altera_Forum
Honored Contributor
Hi
I am surprised to see that in my program this line of code works IOWR(DDR_Write_Address,0,data); and this one does not give me the correct result IOWR(DDR_SDRAM_BASE,DDR_Write_Address,data); this remains same for both iprintf("Written %08x to address %08x \n", data, DDR_Write_Address); DDR_Write_Address += 4; data += 1; in first line of code DDR_Write_Address = base address which works :) in second line of code DDR_Write_Address = offset address which does not give me result i want :mad: :mad: any input ....idea???