Altera_Forum
Honored Contributor
20 years agoVerilog DMA Controller
Hey there,
I'm trying to create a state machine that will properly control a DMA which reads from SDRAM and writes into on-chip memory. The transfer width is 32-bit word only, and the total on-chip memory is 1600 bytes (or 0x190 addresses, with two 800 byte halves and 0xC8 being the start of the second half). I essentially want it to read sequentially from SDRAM address 0x0, placing 800 bytes at a time into each half of the cache. Currently, my state machine sends out these commands: write 0x0 into address 1 of the DMA (SDRAM read address) then later and repetitively, write 0x320 (decimal 800 - in bytes) into address 3 for the length of the transaction write 0x0 OR 0xC8 into address 2 of the DMA (on-chip write address, depending on which page I want to overwrite) write 0x8C into the control register at address 6 (LEEN, GO, and WORD high) It uses waitrequest and does not violate that timing. However, looking at the waveform in ModelSim, the control register shows that it never changes from 0x84 (LEEN and WORD); in other words, it never performs any transaction. Any suggestions? Thanks, --Dan Healy