Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

dma read error

I build a simle SOPC project,its main function is reading data from my own module to sdram and writing data from sdram to my own module through avalon bus or dma.

first,I use dma to write 16 data(from 1 to 16) from sdram to the ram in my own module.

then I use avalon bus to read the writed data from the ram in my own module to sdram one by one,I get the result is 1 to 16,so I'm sure that dma has writen the data successfully.

at last, I use dma to read the data in the ram to sdram,the data I get is (1 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16).

so the error appears;I get 1 twice,and I don't get 10.What is the problem.Who can help me.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I don't know the reason, but make sure that your data isn't cached if your nios cpu contains data cache.