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.

memcpy from DDR to l2 ram is wrong!!

Hi,experts

I am using qdma under codec engine.When DMA is between two DDR address ,it work right.When between DDR and l2 RAM , it work wrong.

I wonder if the L2RAM can be access or not, then I use memcpy to do data copy transfer like this:

memcpy(L2RAM1,DDR,N);-->memcpy(L2RAM2,L2RAM1,N);-->memcpy(DDR,L2RAM2,N);

Then I check the final data compare with original data. The result is that final data is totally wrong!It is some repetitive data.

 

I check my cache configure registers,it should be right.I set L2 into 128K cache and 128K RAM.My board is C6A8168 evm.

what's the problem?

Thank you!!

Francis

  • peng wang said:

    I wonder if the L2RAM can be access or not, then I use memcpy to do data copy transfer like this:

    memcpy(L2RAM1,DDR,N);-->memcpy(L2RAM2,L2RAM1,N);-->memcpy(DDR,L2RAM2,N);

    It's a good idea to sanity check that L2RAM is accessible.  Also good to eliminate QDMA.  Can we further simplify your test above to just this?

    memcpy(L2RAM1, DDR, N);  /* copy a chunk of DDR into L2RAM1 */
    memcmp(L2RAM1, DDR, N);  /* compare it to make sure it got there */

    That would validate that L2RAM was writeable at all.  And/or can you connect to the DSP with CCS and read/write that memory from the CCS?

    Also, just curious, which version of CE and SysLink are you using?

    Chris

  • hi,Chris!sorry to reply so late..for I am just back.

    I have to state a fact:

    1, As long as  I place some of  my code into L2 RAM by .cmd file,  the program will halt at the certain code which was place into L2RAM. But when placed into DDR,it run well.

    2,If I create memory heap in the L2RAM by sysbois .cfg file,  so funny, the heap can be used well!

    3,memcpy(L2RAM1, DDR, N); memcmp(L2RAM1, DDR, N);  this way  also returns wrong result.

    my version of CE and syslink:

    codec engine:3.21.00.19

    syslink:2.00.02.80

    I use codec engine framework and run remote codec,so I can't connect to dsp with ccs when running linux app.

    Maybe I can write a simple dsp program to test dsp L2RAM using CCS to connect to the dsp core.

    francis

  • Francis,

    This appears to be the same issue as in your other thread with Ramsey (where I responded recently, sorry for addressing you as "Peng").  Is that correct?

    If so, please continue in that thread, and once we resolve the issue we can come back to this thread to close it out.

    Regards,

    - Rob