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.

MAR bits for DM6446



Hello

 

I am porting my application to a device based on DM6446 with 128MB of external memory. When I set all MAR bits to 0, my code works correctly. However, when I set them to 1, it does not work as it is supposed to. I suppose that some sections should not be placed in cacheable memory, but I do not know which. Could you help me with this?

  • I forgot to add that I am using only DSPLink, without Codec Engine.

  • Here's my current tcf file


    /*  ============================================================================
     *  Load base TCI file.
     *  ============================================================================
     */
    utils.loadPlatform("ti.platforms.evmDM6446");

    /*  ============================================================================
     *  Enable common BIOS features used by all examples
     *  ============================================================================
     */
    bios.enableMemoryHeaps(prog);
    bios.enableTskManager(prog);

    /*  ============================================================================
     *  GBL
     *  ============================================================================
     */
    prog.module("GBL").ENABLEALLTRC    = false ;
    prog.module("GBL").PROCID          = 0;

    prog.module("GBL").C64PLUSCONFIGURE   = true ;
    prog.module("GBL").C64PLUSL2CFG       = "32k" ;
    prog.module("GBL").C64PLUSL1DCFG      = "32k" ;
    prog.module("GBL").C64PLUSMAR128to159 = 0x00000000 ;

    /*  ============================================================================
     *  MEM
     *  ============================================================================
     */
    prog.module("MEM").STACKSIZE = 0x1000 ;

    /*  ============================================================================
     *  MEM : RESET_VECTOR
     *  ============================================================================
     */
    var RESET_VECTOR = prog.module("MEM").create("RESET_VECTOR");
    RESET_VECTOR.base        = 0x86400000;
    RESET_VECTOR.len         = 0x00000080;
    RESET_VECTOR.space       = "code/data";
    RESET_VECTOR.createHeap  = false;
    RESET_VECTOR.comment     = "RESET_VECTOR";

    /*  ============================================================================
     *  MEM : DDR2
     *  ============================================================================
     */
    var DDR2 = prog.module("MEM").instance("DDR2");
    DDR2.base             = RESET_VECTOR.base + RESET_VECTOR.len;
    DDR2.len              = 0x1A00000;
    DDR2.space            = "code/data";
    DDR2.createHeap       = true;
    DDR2.heapSize         = 0xD00000;
    DDR2.comment          = "DDR2";

    /*  ============================================================================
     *  MEM : DSPLINKMEM
     *  ============================================================================
     */
    var DSPLINKMEM = prog.module("MEM").create("DSPLINKMEM");
    DSPLINKMEM.base             = DDR2.base + DDR2.len;
    DSPLINKMEM.len              = 0x30000;
    DSPLINKMEM.createHeap       = false;
    DSPLINKMEM.comment          = "DSPLINKMEM";

    /*  ============================================================================
     *  MEM : POOLMEM
     *  ============================================================================
     */
    var POOLMEM = prog.module("MEM").create("POOLMEM");
    POOLMEM.base        = DSPLINKMEM.base + DSPLINKMEM.len ;
    POOLMEM.len         = 0xD0000 ;
    POOLMEM.createHeap  = false;
    POOLMEM.comment     = "POOLMEM";

    /*  ============================================================================
     *  MEM : IRAM
     *  ============================================================================
     */
    var IRAM    = prog.module("MEM").instance("IRAM");
    IRAM.len    = 0x8000 ;


    /*  ============================================================================
     *  UDEV : DSP/BIOS LINK
     *  ============================================================================
     */
    var dsplink = prog.module("UDEV").create("dsplink");
    dsplink.initFxn      = prog.decl("ZCPYDATA_init");
    dsplink.fxnTable     = prog.decl("ZCPYDATA_FXNS");
    dsplink.fxnTableType = "IOM_Fxns";
    dsplink.comment      = "DSP/BIOS LINK  - IOM Driver";

    /*  ============================================================================
     *  SWI : ZCPYLINK_SWI_OBJ
     *  ============================================================================
     */
    var ZCPYLINK_SWI_OBJ      = prog.module("SWI").create("ZCPYDATA_SWI_OBJ");
    ZCPYLINK_SWI_OBJ.comment  = "This swi handles the data transfer in DSPLINK";
    ZCPYLINK_SWI_OBJ.fxn      = prog.decl("ZCPYDATA_SWI");
    ZCPYLINK_SWI_OBJ.priority = 14;
    ZCPYLINK_SWI_OBJ.arg0     = prog.decl("ZCPYDATA_devObj");

    /*  ============================================================================
     *  DIO : DSP/BIOS LINK DIO Driver object
     *  ============================================================================
     */
    var dio_dsplink = prog.module("DIO").create("dio_dsplink");
    dio_dsplink.comment = "DSP/BIOS LINK  - DIO Driver";
    dio_dsplink.deviceName = prog.get("dsplink");

    /*  ============================================================================
     *  Set all code and data sections to use DDR2
     *  ============================================================================
     */
    bios.setMemCodeSections(prog, DDR2);
    bios.setMemDataNoHeapSections(prog, DDR2);
    bios.setMemDataHeapSections(prog, DDR2);

    bios.POOL.ENABLEPOOL = true;
    prog.module("MEM").ARGSSIZE = 50;

    /*  ============================================================================
     *  MEM : Global
     *  ============================================================================
     */
    prog.module("MEM").BIOSOBJSEG = DDR2;
    prog.module("MEM").MALLOCSEG  = DDR2;

    /*  ============================================================================
     *  TSK : Global
     *  ============================================================================
     */
    prog.module("TSK").STACKSEG = DDR2;
    prog.module("TSK").STACKSIZE = 0x8000;

    /*  ============================================================================
     *  Specify runtime lib.
     *  ============================================================================
     */
    bios.GBL.SPECIFYRTSLIB = true;
    bios.GBL.RTSLIB = "rts64plus_eh.lib";

    /*  ============================================================================
     *  Generate cdb file...
     *  ============================================================================
     */
    if (config.hasReportedError == false) {
        prog.gen();
    }

     

  • I think this is a Cache coherence problem, you may refer to http://tiexpressdsp.com/index.php/Cache_Management for help. And the C64x+ Cache user guide also give the rules for cache coherence. You'd better check if you use DMA or other periperial to transfer data for DSP to read or write.

  • I am not using any external devices. I am only passing some data between DSP and ARM using DSPLink.

    I was rather thinking if this could be due to placing some things like BIOSOBJSEG in cached DDR2?