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 use L2cache under davinci

Hi,all

        I used to use L2cache on dm642 like below:

//  In  cmd file I declare a section “Datatableblock”

SECTIONS
{
Datatableblock >L2
}

// Then in c source file I can use it

#pragma DATA_SECTION(Datatableblock,It.Datatableblock”)
Uint8 Datatableblock[64*64];

 

Now I turn to davinci dm6467T ,how can I declare my section “Datatableblock” .I add below text in dm6467.tcf file.

var device_regs = {
    l1DMode: "4k",
    l1DHeapSize: 0x1000,   // use 4k of L1DSRAM for heap
    l2DMode: "128k",
    l2DHeapSize: 0x20000,   // use 128k of L2DSRAM for heap
};
Can anyone tell me what to do next.Thanks in advance.
Regards,
-David
  • Hi David,

    Which version of BIOS are you using?

    Also, which version of XDC tools are you using?

    David said:
    var device_regs = {
        l1DMode: "4k",
        l1DHeapSize: 0x1000,   // use 4k of L1DSRAM for heap
        l2DMode: "128k",
        l2DHeapSize: 0x20000,   // use 128k of L2DSRAM for heap
    };

    This code actually won't work in your *.tcf file.  I recommend that you use the graphical configuration tool (gconf) to change you memory map.  E.g. in the global "GBL" module you can configure these things:

     

    This will result in the following config code:

    bios.GBL.C64PLUSL1DCFG = "4k";

    bios.MEM.instance("CACHE_L1D").space = "code/data";
    bios.MEM.instance("CACHE_L1D").createHeap = 1;
    bios.MEM.instance("CACHE_L1D").heapSize = 0x00001000;


    bios.GBL.C64PLUSL2CFG = "128k";
    bios.MEM.instance("CACHE_L2").space = "code/data";
    bios.MEM.instance("CACHE_L2").createHeap = 1;
    bios.MEM.instance("CACHE_L2").heapSize = 0x00020000;

    However, before doing the above, can you clarify on what you are trying to achieve with your memory map?

    Steve

  • Hi,Steven

         First thanks for your answer,my bios version is 5_41_00_06 and the xdc is xdctools_3_16_01_27.They are both in dvsdk_3_10 under unbuntu linux operating system,so I do all the work under linux system .

         I want to use edma between external  memory DDR2 and internal  memory L2. So I need to build a section like below:

    SECTIONS
    {
    Datatableblock >L2
    }

         My chip is dm6467T ,which has a dsp core with bios operating system and a arm core with linux operating system.If you have any other questions ,I will try to explain.

    Regards,

    -David

  • David,

    David said:

    SECTIONS
    {
    Datatableblock >L2
    }

    // Then in c source file I can use it

    #pragma DATA_SECTION(Datatableblock,It.Datatableblock”)
    Uint8 Datatableblock[64*64];

    So the above is what you had in your linker command file for the DM642?  Did you try that same linker command SECTIONS directive for your DM6467T?  I would expect that this should work combined with the #pragma C code.

    Again I'd recommend using the configuration tool to re-arrange your memory map if you need to.

    Steve