Forum Discussion

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

Newbies problem with DMA

I've started a new project based upon an older without SOPC/NIOS II, that means i have an already existing AHDL component reading data from a CMOS chip.

My problem is now to get this data into the NIOS II cpu.

At the moment, I save this data in an altsyncram outside SOPC and connect via avalon slave interface (Avalon slave template without write-signals, 0 read waitcycles, 2 read latencies). Then in the software I wait for a signal "data available" (polling PIO) and start DMA transfer.

But the time between getting the "data available" signal and the real DMA transfer is 2 µs (measured with PIO-outputs and scope), that means alt_dma_txchan_send() and alt_dma_rxchan_prepare() need 2 µs to execute?

I get every 4.4µs a new data packet, so 2 µs for starting DMA transfer is too long.

After the DMA transfer there are 2µs until my receive callback function is called, but that's not so important.

I'm afraid, that I have the wrong approach to the problem. How can I shorten the time to start DMA?

Or better, how can I feed my data directly into DMA? I did not found any examples for that.

Thanks in advance!

Environment:

DSP Development Board Stratix II EP2S60

Quartus and NIOS V 5.1, NIOS fast core