MDMA throughput with DMA service

I tested EE-401 "SC58x_MDMA_Throughput" with the following settings on ADZS-SC584-EZLITE.
 1) MDMA2
 2) SYSCLK = 225 MHz
 3) DMA count = 16384 bytes
 4) MSIZE = 32
 5) PSIZE = 4
 6) from C1L1S1 to C1L1S1

The measured throughput is 893.9 MB/s.

I changed the code to use the DMA Service "adi_mdma_Copy1D" instead of "MDMA_CONFIG".
The throughput is degraded to 224.7 MB/s.
Does the DMA Service support maximum theoretical throughput?

I think it is caused by setting DMA_CFG.PSIZE=0 and DMA_CFG.EN=1 simultaneously in the DMA service (MDmaUpdateXferStatus()).
I modified the code as shown below, the throughput changed to 895.6 MB/s.
====
before:
 adi_mdma_Copy1D(hStream, pMemDest, pMemSrc, ADI_DMA_MSIZE_32BYTES, Bytes/32);
after:
 adi_mdma_Copy1D(hStream, pMemDest, pMemSrc, 0x520, Bytes/32);

Parents Reply Children
  • 0
    •  Analog Employees 
    on Nov 8, 2018 7:39 AM over 2 years ago in reply to amsk

    Sorry for the delay. Somehow I missed this update, were you able to get going?

  • As I already uploaded the project, run it on the EZKIT and check the bug of the ADI peripheral driver (or system service) "adi_mdma_Copy1D".
    ADI should fix the bug or let me know a proper workaround.

    Regards
    amsk

  • 0
    •  Analog Employees 
    on Feb 5, 2019 9:14 AM over 1 year ago in reply to amsk
  • 0
    •  Analog Employees 
    on Feb 20, 2019 10:52 AM over 1 year ago in reply to amsk

    Hello,

    Apologies for the delay in response. We would suggest you put the below workaround in the "adi_mdma_Copy1D" API. Then you will find the exact throughput at any MSIZE.

    As per our suggestion please use the below API (ADI_DMA_MSIZE parameter) configuration in the code instead of old.

    adi_mdma_Copy1D (hMemDmaStream, dst, src, ADI_DMA_MSIZE_32BYTES|ADI_DMA_PSIZE_1BYTE, buffer_size >> 5);

    Please note that customer manually needs to set the PSIZE as 1Byte(ADI_DMA_PSIZE_1BYTE) in the "adi_mdma_Copy1D" API.  The same information as already mentioned in the comment lines of  "adi_mdma_Copy1D" definition(Line No :2608) on "adi_mdma_bf60x.c" file.
    The comment is " Append MSize, keep PSize to zero (1 byte) ". So please follow as per comments in the driver file.

    Please let us know if you need any further clarification on this.

    Best regards,
    Santha kumari.K

  • Hi

    Thank you for responding.
    I tested the workaround but the throughput is still low.

    adi_mdma_Copy1D (hMemDmaStream, dst, src, ADI_DMA_MSIZE_32BYTES|ADI_DMA_PSIZE_1BYTE, buffer_size >> 5);

    This is actually same as the following because  "ADI_DMA_PSIZE_1BYTE" is defined as 0 on "adi_mdma_bf60x.h".

    adi_mdma_Copy1D (hMemDmaStream, dst, src, ADI_DMA_MSIZE_32BYTES, buffer_size >> 5);


    The same information as already mentioned in the comment lines of  "adi_mdma_Copy1D" definition(Line No :2608) on "adi_mdma_bf60x.c" file.

    If PSize is zero at this line no 2608, pMDmaChannel->DescRegCache.Config.PSize is set to zero.
    So DMA_CFG.PSIZE is set to zero finally.
    According to HRM, DMA_CFG.PSIZE can be 2 (4 bytes) or 3 (8 bytes), but PSIZE=0 is undefined.

    Best Regards

    amsk