This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IDMA1 working very slow

Other Parts Discussed in Thread: SYSBIOS

Hi there,

I got a problem with IDMA1 throughput, in my project critical section of code - transmitting of ping-pong buffers from L2 to L1. (C6678evm)

Code:

....

#define DOUBLE_BUFFER_L1_LEN 4096

.......

time[0]=CSL_tscRead();

RUR_IDMA1_memcpy((Uint8*)&buf_L1_A[0][0], (Uint8*)(buf_L2_B[0][0], DOUBLE_BUFFER_L1_LEN, coreID);

time[1]=CSL_tscRead();
RUR_IDMA1_wait();

time[2]=CSL_tscRead();

....

time[2]-time[0] = 1230 cycles

time[1]-time[0] = ~100 cycles

so, average speed about 0.30 byte/sec, but it should be 4096/16 = 256 cycles + overheads = ~400 cycles

other definitions

#pragma DATA_ALIGN(buf_L1_A, 32);
#pragma DATA_SECTION(buf_L1_A, "L1mem");
unsigned char buf_L1_A[1][DOUBLE_BUFFER_L1_LEN*2];

#pragma DATA_ALIGN(buf_L2_B, 32);
#pragma DATA_SECTION(buf_L2_B, "L2mem");
unsigned char buf_L2_B[2][DOUBLE_BUFFER_L1_LEN*2];

PS: data allingment does'nt influence on the result

#pragma CODE_SECTION(RUR_IDMA1_memcpy, "fast_code");
void RUR_IDMA1_memcpy(Uint8 *dst, Uint8 *src, Uint16 len, Uint16 coreID)
{
    CSL_IDMA_IDMA1CONFIG    idmaChan1Config;

    idmaChan1Config.source    = (Uint32*)src;
    idmaChan1Config.destn     = (Uint32*)dst;
    idmaChan1Config.intEnable = 1;
    idmaChan1Config.priority  = IDMA_PRI_0;
    idmaChan1Config.count     = len;

    CSL_IDMA_chan1TransferData (&idmaChan1Config, 0);
}

#pragma CODE_SECTION(RUR_IDMA1_wait, "fast_code");
void RUR_IDMA1_wait(void)
{
    CSL_IDMA_chan1Wait();
}

......

SYSBIOS cfg:

Program.sectMap["fast_code"]            = "L2SRAM";

Program.sectMap["L1mem"] = new Program.SectionSpec();
Program.sectMap["L1mem"].loadSegment = "L1DSRAM";
Program.sectMap["L2mem"] = new Program.SectionSpec();
Program.sectMap["L2mem"].loadSegment = "L2SRAM";
Program.sectMap["L3mem"] = new Program.SectionSpec();
Program.sectMap["L3mem"].loadSegment = "MSMCSRAM";

1. Does anybody know what the problem?

Ivan