Forum Discussion

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

Max throughput of SOPC DMA?

Hello,

Currently I have a system with DMA transfers and DDR2 SDRAM (and a lot of other stuff). I'm using the normal SOPC builder DMA controller. I run the system on 100 MHz, the DDR2 SDRAM runs on 125 MHz via a clock crossing bridge. If I transfer 32 megabytes at once I only get a transfer speed of 41.5670 megabyte/second.

i was wondering if these kinds of low speeds are normal for the dma controllers in the in the sopc builder?

The main issue for me is that I use the DMA controllers to send data to my Serial RapidIO core. But if I send data to the core(from either on-chip memory or the DDR2 memory, the latter being slower ofcourse), I get a throughput of around 10 megabytes/second, but I want this to be more like 1000 megabytes/second.

I know I could try the SG-DMA, which should be faster, but I don't see why it would be THAT much faster for only one transfer. Since the SG-DMA should be able to maintain speeds of up to 10 Gbps.

tx_data=(void*)ALTMEMDDR_1_BASE;

rx_data=(void*)ALTMEMDDR_1_BASE+0x1FFFFF8;

length = 0x1FFFFF8;

txchan = alt_dma_txchan_open(DMA_TESTER_NAME);

rxchan = alt_dma_rxchan_open(DMA_TESTER_NAME);

PERF_BEGIN (PERFORMANCE_COUNTER_BASE, SECTION_TO_MONITOR_3); //Start timing section

txrx_done=0;

alt_dma_txchan_send (txchan, tx_data, length, null, null);

alt_dma_rxchan_prepare (rxchan, rx_data, length, txrxDone, null);

while (!txrx_done);

PERF_END (PERFORMANCE_COUNTER_BASE, SECTION_TO_MONITOR_3); //End timing section

alt_dma_txchan_close(txchan);

alt_dma_rxchan_close(rxchan);

--Performance Counter Report--

Total Time: 20.8909 seconds (2089086210 clock-cycles)

+---------------+-----+-----------+---------------+-----------+

| Section | % | Time (sec)| Time (clocks)|Occurrences|

+---------------+-----+-----------+---------------+-----------+

|DDR2 to DDR2 | 3.69| 0.76984| 76983631| 1|

+---------------+-----+-----------+---------------+-----------+

Transfer speed DDR2 to DDR2 = 31.9999885559082/0.76984=41.5670 megabyte/second

Thanks in advance.

21 Replies