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.

OMAP35x EVM DSPLINK Memory Map & about POOL

Other Parts Discussed in Thread: OMAP3530

Hi all,

I have read many discussion, websites, documents, but I still don't understand DSPLINK Memory Map in detail, espectially about POOL, CHANNEL. Can anybody help me to understand it much more. In my config/all/CFG_OMAP3530_SHMEM.c:

#define  CODEENTRYID        1u
#define  CODEMEMORYADDR     (RESETCTRLADDR + RESETCTRLSIZE)
#define  CODEMEMORYSIZE     0xFFF80u

#define  SHAREDENTRYID0     2u
#define  SHAREDMEMORYADDR0  (CODEMEMORYADDR + CODEMEMORYSIZE)
#define  SHAREDMEMORYSIZE0  0x5000u

#define  SHAREDENTRYID1     3u
#define  SHAREDMEMORYADDR1  (SHAREDMEMORYADDR0 + SHAREDMEMORYSIZE0)
#define  SHAREDMEMORYSIZE1  0x2B000u

#define  POOLENTRYID        4u
#define  POOLMEMORYADDR     (SHAREDMEMORYADDR1 + SHAREDMEMORYSIZE1)
#define  POOLMEMORYSIZE     0x000D0000u

STATIC LINKCFG_Pool  LINKCFG_poolTable_00 [] =
{
    {
        "SMAPOOL",             /* NAME           : Name of the pool */
        SHAREDENTRYID1,        /* MEMENTRY       : Memory entry ID (-1 if not needed) */
        (Uint32) 0x70000,      /* POOLSIZE       : Size of the pool (-1 if not needed) */
        (Uint32) -1,           /* IPSID          : ID of the IPS used */
        (Uint32) -1,           /* IPSEVENTNO     : IPS Event number associated with POOL */
        POOLENTRYID,           /* POOLMEMENTRY   : Pool memory region section ID  */
        0x0,                   /* ARGUMENT1      : First Pool-specific argument */
        0x0                    /* ARGUMENT2      : Second Pool-specific argument */
    }
} ;

What exactly are the MEMENTRY and the POOLENTRYID? When I call function POOL_open(), where will buffers will be allocated? by doing practice, I see that the total memory required by POOL_open() is limited by POOLMEMORYSIZE. So I guess that all buffers will be located in POOLENTRYID. Is that true? If that, I really don't understand the responsibility of the MEMENTRY (SHAREDENTRYID1)?

I also wonder about CHNL_allocateBuffer() function. When this function is called, where will the buffers be allocated? In POOL or in HEAP?

 

/dsp/inc/DspBios/5.XX/OMAP3530/dsplink-omap3530-base.tci

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

With this configuration, is Heap in DDR2 memory? What is the relation between DDR2.len and DDR2.heapSize?

Can anybody help me to figure out?

I deeply thank you! :)

(My English is not good. So, if there is anything bother you, please let me know, I will describe it more clearly. Sorry for any convinience! )

  • I have answers to one of your questions.  Someone else should jump in to help with the POOL questions.

    Tin Nguyen Thien said:
    /*  ============================================================================
     *  MEM : Adjust DDR2
     *  ============================================================================
    */
    var DDR2 = prog.module("MEM").instance("DDR2");
    DDR2.base             = RESET_VECTOR.base + RESET_VECTOR.len ;
    DDR2.len              = 0x000FFF80;
    DDR2.space            = "code/data";
    DDR2.createHeap       = true;
    DDR2.heapSize         = 0x10000;
    DDR2.comment          = "DDR2";

    With this configuration, is Heap in DDR2 memory? What is the relation between DDR2.len and DDR2.heapSize?

    Yes, this will be in DDR2.  The DDR2.len refers to the total size of this segment (for both statically and dynamically allocated memory).  The DDR2.heapSize is referring to a heap that will be created in this memory.  DDR2.heapSize must be smaller than DDR2.len.  As you increase DDR2.heapSize that will leave less memory available in the DDR2 memory segment for statically allocated items (like code, etc.).

     

  • Dear Brad Griffs,

    Thank you so much for your answers. But I still have some trouble.

    In Dsplink samples/loop sample, when CHNL_allocateBuffer() is called, are all buffers will be allocated in HEAP? And if the total size required is equal or greater than heapSize, what will the program act? I ran the loop sample, I called CHNL_allocateBuffer with total required size is 0x10000 (=HeapSize), the program jumped to LOOP_Create(), then it terminated without "Leaving LOOP". It seems, the loop is not run successful but there still is not any error notification. But if I set the total required size is smaller than 0x10000, everything is ok. Can you help me answer these question?

    Thank you so much!

    --Tin---