How to use the eDMA for circular buffer delay-lines?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the eDMA for circular buffer delay-lines?

100 Views
jla
Contributor I

In relation to implementing an audio reverb algorithm on an i.MX RT Crossover MCU system, I would like to use the eDMA to implement a number of Schroeder Allpass sections, where the eDMA should transfer data between a double buffer in the on-chip RAM and a number of delay-lines implemented as circular buffers in an external SDRAM. I would like to collect a number of sample periods into blocks (for example using minor loops in the eDMA), in order to have efficient SDRAM access.
I expect to set up a scatter/gather type TCD for every write point and every read point in the delay-lines (where each each TCD handles a block of sample periods at a time), based on information in the AN4765 application note, example 2.
But how to remember the updated offset / starting point from one block access to the next for each TCD? (I guess that it is related to the SOFF and the DOFF fields). I would like not to let the core spend cycles for every new block of sample periods updating the SADDR or DADDR field in TCDs of every writing point and reading point of all the delay-lines.

Description of Schroeder Allpass sections:
https://www.dsprelated.com/freebooks/pasp/Late_Reverberation_Approximations.html
NXP / Freescale, AN4765 Application Note, MPC57xx: Configuring and Using the eDMA Controller
https://www.nxp.com/docs/en/application-note/AN4765.pdf

Tags (1)
0 Kudos
1 Reply

61 Views
jla
Contributor I

Update:
I have also asked NXP Support about this and they send me following for inspiration:
Technical Information Center, What and how to configure the eDMA scatter/gather feature, Freescale Semiconductor.
However this assumes that the buffer access always begin at the same address in the circular buffer, so long delaylines used in reverb algorithms are not comparable. As SOFF and DOFF cannot be used when using scatter/gather for updating or modifying SADDR and DADDR and remembering this for next run of the TCD list, the eDMA cannot be used for the described problem.

0 Kudos