SDMA M2M script is very slow, is it not using the BURST DMA Unit?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SDMA M2M script is very slow, is it not using the BURST DMA Unit?

830 Views
Morten_
Contributor I

When performing M2M transfers using the ROM SDMA script on a i.mx8mn the transfer bandwidth seems really low. This is the case for both SDMA2 and SDMA3 running with AHB and IPG clocks at 400MHz (default AUDIO_IPG and AUDIO_AHB using the default EVM device tree).

The transfers that are performed for the benchmark are structured as an array of descriptors with each descriptor transferring 96 32 bit words from one  area in DDR to another area in DDR. As we increase the number of descriptors the benchmark converges to 55ns per word. For comparison, a memcpy between cached regions with full cache invalidation comes out to 3.4ns per word and a memcpy between non-cached strongly ordered DDR comes out around 55ns. This indicates that the SDMA script is not using the Burst DMA Unit.

This issue does not seem to have been brought up specifically on the NXP Community, but this one  (https://community.nxp.com/t5/i-MX-Processors/How-to-Disable-Memory-Barrier-in-SDMA/m-p/433829) could indicate that the memory script is a simple loop with similar performance to what the person in this post is indicating.

0 Kudos
5 Replies

557 Views
ceggers
Contributor V

Hi Morton,

sorry for being late on this topic.

This indicates that the SDMA script is not using the Burst DMA Unit.

The ap_2_ap script (located at 0x284 on i.MX7/8) uses (only) the BurstDMA unit. The performance of the script mainly depends on whether source and destination addresses are 32 bit aligned. Under ideal conditions, it uses the COPY flag of the BurstDMA in order copy multiple word within a single instruction.

regards,
Christian

0 Kudos

743 Views
Morten_
Contributor I

Perhaps i wasn't clear,  am not asking asking what the SDMA is doing, as stated in my post i am doing benchmark tests already. My question is why the M2M transfers are performed at the speed of roughly 20MHz.

I have also noticed that in the Reference Manual all the "SDMA Scripts" hyper links are dead. If would probably help if i could see the RISK code but since that is not available I can't really tell why the M2M scripts are so slow.

 

 

0 Kudos

788 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

SDMA scripts library is to perform point-to-point data transfers in a multi-core silicon system on a chip. The library supports data transfer from core memory space to dedicated core memory space (DSP), from core memory space to peripherals and vice-versa.

For more information on SDMA you may refer to the Linux Reference Manual chapter 3.7 Smart Direct Memory Access (SDMA) API.

Best regards,
Aldo.

0 Kudos

658 Views
Morten_
Contributor I

Perhaps i wasn't clear, am not asking asking what the SDMA is doing, as stated in my post i am doing benchmark tests already. My question is why the M2M transfers are performed at the speed of roughly 20MHz.

I have also noticed that in the Reference Manual all the "SDMA Scripts" hyper links are dead. If would probably help if i could see the RISK code but since that is not available I can't really tell why the M2M scripts are so slow.

0 Kudos

639 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Unfortunately we do not have any information related to performance using SDMA Mem-2-Mem available.

Regarding SDMA script in the reference manual, indeed seems like hyperlinks are not linked correctly, but the examples that should link to are available in chapter 7.2.5.2 Typical Data Transfer Supported by SDMA DMA Units.

Best regards,
Aldo.

0 Kudos