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.

DM6467 Codec Server build error

Other Parts Discussed in Thread: DM3730

As suggested by someone, I'm trying to integrate the deinterlacer codec from DM3730 DVSDK into the DM6467.  I copied the deinterlacer folder to DM6467 DVSDK (dvsdk_3_10_00_19/cs2dm6467_1_00_00_10/packages/ti/sdo/codecs).  I updated codec.cfg so the I2P deinterlacer package is included in the server.  When I build the server, I get the following error:

_DMAN3_heapExternal_undefined package/cfg/bin/cs_x64P.o64P
_DMAN3_heapInternal_undefined package/cfg/bin/cs_x64P.o64P

After doing some research, the deinterlacer appears to be using DMAN3 for DMA resource allocation instead of IRES/RMAN which is used by the DM6467.  How do I modify the deinterlacer to use IRAS/RMAN?

  • It maybe easiest to just add some memory assignments for DMAN3 to your .cfg file.  Here's an example from the Codec Engine all_servers.cfg file, which supports both DMAN3 and RMAN:

    /*
     *  ======== DMAN3 (DMA manager) configuration ========
     */
    var DMAN3 = xdc.useModule('ti.sdo.fc.dman3.DMAN3');

    /*  First we configure how DMAN3 handles memory allocations:
     *
     *  Essentially the configuration below should work for most codec combinations.
     *  If it doesn't work for yours -- meaning an algorithm fails to create due
     *  to insufficient internal memory -- try the alternative (commented out
     *  line that assigns "DDRALGHEAP" to DMAN3.heapInternal).
     *
     *  What follows is an FYI -- an explanation for what the alternative would do:
     *
     *  When we use an external memory segment (DDRALGHEAP) for DMAN3 internal
     *  segment, we force algorithms to use external memory for what they think is
     *  internal memory -- we do this in a memory-constrained environment
     *  where all internal memory is used by cache and/or algorithm scratch
     *  memory, pessimistically assuming that if DMAN3 uses any internal memory,
     *  other components (algorithms) will not get the internal memory they need.
     *
     *  This setting would affect performance very lightly.
     *
     *  By setting DMAN3.heapInternal = <external-heap>  DMAN3 *may not* supply
     *  ACPY3_PROTOCOL IDMA3 channels the protocol required internal memory for
     *  IDMA3 channel 'env' memory. To deal with this catch-22 situation we
     *  configure DMAN3 with hook-functions to obtain internal-scratch memory
     *  from the shared scratch pool for the associated algorithm's
     *  scratch-group (i.e. it first tries to get the internal scratch memory
     *  from DSKT2 shared allocation pool, hoping there is enough extra memory
     *  in the shared pool, if that doesn't work it will try persistent
     *  allocation from DMAN3.internalHeap).
     */
    DMAN3.heapInternal    = "L1DHEAP";       /* L1DHEAP is an internal segment */
    DMAN3.heapExternal    = "DDRALGHEAP";

    Best regards,

        Janet

  • Thanks for the help.  I updated server.cfg with your suggestion, but now when linking I get undefined symbol _L1DHEAP referenced in file package/cfg/bin/cs_x64P.o64P.  How do I fix this?

    Also, when viewing an example cfg file, I see that other DMAN3 paramters are being set, such as the ones below.  Do I need to set those to specific values for DM6467?

    DMAN3.idma3Internal   = false;
    DMAN3.scratchAllocFxn = "DSKT2_allocScratch";
    DMAN3.scratchFreeFxn  = "DSKT2_freeScratch";
    DMAN3.paRamBaseIndex     = 80;  // 1st EDMA3 PaRAM set available for DMAN3
    DMAN3.numQdmaChannels    = 8;   // number of device's QDMA channels to use
    DMAN3.qdmaChannels       = [0,1,2,3,4,5,6,7]; // choice of QDMA channels to use
    DMAN3.numPaRamEntries    = 48;  // number of PaRAM sets exclusively used by DMAN
    DMAN3.numPaRamGroup[0]   = 48;  // number of PaRAM sets for scratch group 0
    DMAN3.numTccGroup[0]     = 32;  // number of TCCs assigned to scratch group 0
    DMAN3.tccAllocationMaskL = 0;          // which TCCs  0..31 for DMAN3
    DMAN3.tccAllocationMaskH = 0xffffffff; // which TCCs 32..63 for DMAN3

  • You'll need to define the symbol L1DHEAP for the DMAN3 internal heap.  If you look at the all_codecs server example under ce/examples/servers/all_codecs, you'll see a .tci file specific to DM6467, called all_evmDM6467.tci (which is included by all.tcf).  Here is how the L1DHEAP symbol is defined in that file:

    bios.L1DSRAM.createHeap       = true;
    bios.L1DSRAM.enableHeapLabel  = true;
    bios.L1DSRAM["heapLabel"]     = prog.extern("L1DHEAP");
    bios.L1DSRAM.heapSize     = 0x1000;   // use 4k of L1DSRAM for heap

    So you will need to do something like this in your cs.tcf file.

    You will also need to configure which PaRams and TCCs will be used by DMAN3.

    Best regards,

        Janet

  • After some struggle, I am able to build the server, which includes DMAN3 and the deinterlacer codec.  Now I have to figure out how to use it in the client app.  That might be a topic for another post.  Thanks for all the help!