Forum Discussion
DMA problem
why when i use my dma, the program stucks here:
--- Quote Start --- while (!rx_done); printf ("Transfer successful!\n"); --- Quote End --- pls help! thanks!17 Replies
- Altera_Forum
Honored Contributor
I already changed the port but I am not sure about the timing. will the timing affect a lot if i just leave it as in your code?
- Altera_Forum
Honored Contributor
Your model is different but the solution I wrote there still applies.
You only need to duplicate the standard component definition (the tcl file) and modify a few parameters in order to match your SRAM characteristics. - Altera_Forum
Honored Contributor
yes, i saw that but the model is different from mine. i used IS61LV25616 SRAM 512KB. pls help. thanks.
- Altera_Forum
Honored Contributor
Take a look at this thread I answered a few time ago
http://www.alteraforum.com/forum/showthread.php?t=26487 - Altera_Forum
Honored Contributor
OK, i will give it a try. besides, i wanna ask regarding SRAM. I cannot find a suitable SRAM module in SOPC for DE2 Board. where can i get the SRAM 512KB module?
- Altera_Forum
Honored Contributor
You can use either.
Or you can simply set/reset a spare PIO and measure the elapsed time with an oscilloscope; that's what I usually do, without need of adding any timer. - Altera_Forum
Honored Contributor
So is it ok if i use performance counter? or maybe the function alt_ntick?
- Altera_Forum
Honored Contributor
Single access to flash memory requires at least 60 to 120ns depending from your flash speed grade. then 64kb requires at least a few millisecs. The transfer time will certainly be longer (both with cpu and dma transfer) because of bus contention or other instrinsic delays.
Then, if you have a timer which can measure intervals in the ms range you can easily make the test with 64kb. - Altera_Forum
Honored Contributor
yes, but now i wish to test by using and without using dma, which is faster and better. so just 64KB of data is sufficient for this testing?
- Altera_Forum
Honored Contributor
Since now you can write data at least in the first 64kb block of flash, you can test the dma transfer.