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.

CCS: how to copy data to L2SRAM from DDR quickly

Tool/software: Code Composer Studio

Hi TI,

i am now doing performance optimization with C66 core by CCS

my code runs very fast on L2SRAM, but very slow on DDR

i have more 2M bytes data , but L2SRAM is only 288k,

so my data residents on DDR,

how should i do to balance this problem

1,should i copy data from DDR to L2SRAM several times?

2,shuold i do pipeline?

i need your suggestion

thanks very much

  • Hi,

    What you need to do:

    1. Use L1D as cache

    2. Use part of L2 as cache

    3. Make DDR cache-able by setting MAR 128-255 registers (depending on how big the DDR region is used)

    4. Using EDMA is the right approach to fast copy data from DDR to L2.

    Regards, Eric

  • Hi lding


    my job is to do image preprocess, to convert RGB to RRR..GGG..BBB


    1. Use L1D as cache
    this L1D only 32k, it is very small, my data is about 2M

    2. Use part of L2 as cache
    yes i use L2

    3. Make DDR cache-able by setting MAR 128-255 registers (depending on how big the DDR region is used)
    yes, i did this, and the prefetch improve the performance, but it still need access DDR many times, so it cost about 18ms to do my job

    4. Using EDMA is the right approach to fast copy data from DDR to L2.
    yes, i am using TDA4, and so i am using UDMA
    i developed my project based on the example "udma_memcpy_test.c"
    and the UDMA cost just below:
    DDR ->  L2 (128K) 0.25ms
    L2  ->  DDR(128K) 0.15ms
    so it means that each 128k data will cost 0.4ms
    my 2M data will do 16 times ,and will cost 6.4ms
    i think this is still a slow operation

    Is there a more fast way to do this job?



    best regards

  • Hi,

    As you are using TDA4 with UDMA, I asked expert familiar with that for help.

    Regards, Eric

  • thanks very much

    I am  using  tda4 with udma

    regards

  • You can use DRU channels instead of the normal UDMA channel for the memcpy operation. This should give a better performance.

    Kindly refer the UDMA DRU memcpy test app.

    Regards

    Sivaraj R