AnsweredAssumed Answered

Maximize speed of MDMA moving data from L2 to L1(BF707)

Question asked by vic.wu@honeywell.com on May 5, 2015
Latest reply on May 28, 2015 by JoeT

Hi,

 

I am trying to move 6K data from L2 to L1 using MDMA (BF707).

 

I started from the example code provided by CCES "Mem DMA Copy using one-shot 1D mode", made some change:

  1. Change the source address from L1 to L2, that made no difference on the copying speed.
  2. Changed the DMA stream from ADI_DMA_MEMDMA_S0 to ADI_DMA_MEMDMA_S1, that doubled the speed;
  3. Changed the BYTES_TO_COPY from 1k to 6k, which also improved speed a little (more than 10%);
  4. Changed the word transfer size from 1 byte to 4 bytes. Speed improved, but not 4X.
  5. Tried to use wider word size (8 bytes, 16 bytes, 32 bytes), but made no difference.
  6. Tried to let *pREG_SCB0_MST30_SYNC = 0, but that made no difference.
  7. My src address is :0x08002050 and dst address is 0x119000b0. I tried to change the address to 0x08002060 & 0x119000c0 to avoid address alignment issue, but that made no difference.

 

In the end, I achieved a maximum copying speed about 192M/s. However, I think it is far below the MDMA capability.

 

The core clock is 400M and system clock is 200M.

I use clock() function to measure the time before & after the while (bMemCopyInProgress) loop.

 

So my question is:

  1. What is the max speed of L2 to L1 copying? And how can I calculate it theoretically? How can I achieve it in practice?
  2. Why the size of BYTES_TO_COPY can affect the copying speed?

 

Attached is my testing project.

 

Regards,

Vic

Attachments

Outcomes