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.

How to assign arrays in LL2 memory of muliple cores in single image case?

Hi 

I'm developing a program on C6678 platform. The application is in a single image. Depending on the core number, the program branches to each core's specific function. Core 0 only processes data in array A and Core 1 only processes data in array B. To accelerate the data access, I want to put array A in Core 0's LL2 memory and put array B on Core 1's  LL2 memory. However, if I use #pragma data_section(A, LL2MEM) and #pragma data_section(B, LL2MEM). It seems I have A and B both in every Core's LL2 memory. Do you know how to put the two arrays in different Core's LL2 memory? Can you give an example?

Thanks 

  • Hi,

    Welcome to the TI E2E forum. I hope you will find many good answers here and in the TI.com documents and in the TI Wiki Pages (for processor issues). Be sure to search those for helpful information and to browse for the questions others may have asked on similar topics (e2e.ti.com). Please read all the links below my signature.

    If you want to run single application to multiple cores and also want to have global variables on L2 which is independent among cores, my recommendation is to use "core local address(core 0 - 0x10800000 )" instead of "global address(0x00800000)."

    For example, talking about TMS320C6678 multicore DSP, when a core (e.g. core #0) access 0x00800000, it is different from the same address 0x00800000 which is seen to a different core (e.g. core #1). The local address of 0x00800000 of the core #0 is mapped on the global address 0x10800000 but the same local address of the core #1 is mapped on the global address 0x11800000. By this way, we can share the same .out file for different cores but the cores can have independent L2 memory each other.

  • Hi Raja

    Thanks a lot for your answer. That's really quick. I try to interpret your suggestion. Below is my understanding. Correct me if I'm wrong. Your suggestion means I should create a .cmd file which map each core's LL2 memory to their core local address. And then assign the array to its LL2 memory. The .cmd file is like below:

    MEMORY
    {

    /* Local L2, 1MB*/
    CORE0_LL2_RW: o = 0x10800000 l = 0xBFE00

    CORE1_LL2_RW: o = 0x11800000 l = 0xBFE00

    }

    SECTIONS
    {

    .far:core0_ll2           >    CORE0_LL2_RW

    .far:core1_ll2           >    CORE1_LL2_RW

    }

    Then in the c program, I declare the array A and array B like below. 

    #pragma DATA_SECTION(A,".far:core0_ll2")

    int A[512];

    #pragma DATA_SECTION(B,".far:core1_ll2")

    int B[512];

    Do I interpret your answer correctly? 

    Thanks