Forum Discussion

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

Memory corruption & DMA transfer

Hi everyone,

don&#39;t know if anyone has had experience on this kind of problem and can give me a pointer or not. Thanks in advance http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/biggrin.gif .

I have a design I want to add onto the standard example (std1s10 from nios II stratix kit) as a new component inside SOPC builder. This hardware peripheral has two slave interface, one for the task logic and one for the memory built inside with the task logic.

(I want the task logic to be able to read data out from the memory block and do some processing while able to transfer data into the memory block through DMA, I am not pipelining the data transfer and processing )

The memory I declare through mega-wizard in Quartus is a true dual port memory. (cause I want to be able to read two data out at the same time, but to transfer the data into the memory, I am only using one set of address &data&write signal).

When I use dma to do data transferring, I found out the data transferred are somehow corrupted!.

Anyone know, how to setup the setup time or hold times for memory blocks?? I had this information in the compilation report of the system. OR might it be something else that&#39;s corrupting the data transferred to the destination?

I tested my dma transfer function between sdram and on-chip memory, it&#39;s fine, so I think it must be something wrong with my memory block in my component.

<div class='quotetop'>QUOTE </div>

--- Quote Start ---

Info: Design uses memory blocks. Violating setup or hold times of memory block address registers could cause memory contents to be corrupted. Make sure that all memory block address registers meet the setup and hold time requirements.[/b]

--- Quote End ---

Any help is appreciated

Thanks

Tony

1 Reply

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

    Hi Everyone,

    I found the answer to my problem. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif

    I was reading out the the content of my memory too fast, so the data I printed out to the screen were wrong although the contents stored in my memory are right.

    If you have the same problem, you have to go to the component setting inside SOPC builder to adjust the read/write wait. (in cycles or seconds..)

    The number of cycles to wait is depending on your component. Same thing can happen if you are writting too fast, and this time you will really have corrupted data memory content even if you are reading out at the right speed.

    Regards,

    Tony