Title: Message
Hi all, I have serveral questions about memory map setting on davinci platfrom.
 
(1).
 i want to locate the stacks of DSP algorithms running on DAVINCI DSP to a specific memory segment. How should i do?
as you know, I use the DVSDK examples software shipped with DVEVM6446 board as my development template.
I found that in $(EXAMPLE_ROOTDIR)/servers/video_copy/video_copy.cfg file, there is some stack-related configurations:
 
Server.threadAttrs.stackSize = 2048;
Server.threadAttrs.priority = Server.MINPRI;
Server.algs =
[
    {name: "viddec_copy", mod: VIDDEC_COPY, threadAttrs: {
        stackSize: 4096, stackMemId: 0, priority: Server.MINPRI + 1}
    },
    {name: "videnc_copy", mod: VIDENC_COPY, threadAttrs: {
        stackSize: 4096, stackMemId: 0, priority: Server.MINPRI + 1}
    },
];
In my opinion, stackMemId should be the memory segmenet ID for each DSP algorithm. But how could i know which ID is correspondin to my target memory segment? For example, i have 3 memory segments in my *.tcf file:
 
var mem_ext = [
{
    comment:    "L1DSRAM: L1 SRAM for dynamic algmem allocation and task stack",
    name:       "L1DSRAM",
    base:       0x11F04000,  
    len:        0x10000,      // 64k
    space:      "data"
},
{
    comment:    "IRAM: L2 SRAM for dynamic algmem allocation",
    name:       "IRAM",
    base:       0x11800000,  
    len:        0x8000,       // 32k
    space:      "data"
},
{
    comment:    "DDR: off-chip memory for application code and data",
    name:       "DDR",
    base:       0x8F000000,   // 240MB
    len:        0xE00000,     // 14 MB 
    space:      "code/data"
},
...
}
 
i want to map stack of a DSP algorithm to L1DSRAM,  then, which segment id does L1SDRAM correspond to?
 
(2).
 another question, besides the setting in the above file, there are some 
 stack-related configuration in $(EXAMPLE_ROOTDIR)/servers/video_copy/video_copy.tcf file as well:
 
/*  ===========================================================================
 *  MEM : startup and SWI stack size
 *  ===========================================================================
 */
prog.module("MEM").STACKSIZE = 0x1000;
/*  ===========================================================================
 *  TSK : Global
 *  ===========================================================================
 */
prog.module("TSK").STACKSEG = bios.DDR;
I want to know the difference between  the stack in *.tcf file  and the stack in *.cfg file.
Does they point to the same stack?
maybe, i need more detail information about all possible stack types in DSP/BIOS. as far, i know there are 4 types of stacks in DSP/BIOS:
       system stack ( == global stack???);    task stacks(each task have its indepedent stack); SWI stack; HWI stack;
but i am not very clear about the system stack. Anyone can give me a more detailed explanation?
 
(3)
in $(EXAMPLE_ROOTDIR)/servers/video_copy/video_copy.tcf file,
             bios.setMemDataNoHeapSections (prog, bios.DDR);
            bios.setMemDataHeapSections (prog, bios.DDRALGHEAP_CACHEABLE);
            prog.module("MEM").MALLOCSEG  = bios.DDR;
 
what is the MemDataNoHeapSections???  what is the MemDataHeapSections??  what is the difference between of MemDataHeapSections and ".sysmem" section?
and does the "prog.module("MEM").MALLOCSEG  = bios.DDR" setting mean that, if i use malloc() ( not MEM_alloc() ) function to allocate memory, DSP/BIOS will map the ".sysmem" section to  "bios.DDR" segment, i.e., DSP/BIOS will get memory from the heap located in "bios.DDR" segment? 
 
 
 
 
Any opinion is appreriated!
 
 
BR,
ZhouXiao
This message (including any attachments) is for the named addressee(s)'s use only. It may contain
sensitive, confidential, private proprietary or legally privileged information intended for a
specific individual and purpose, and is protected by law. If you are not the intended recipient,
please immediately delete it and all copies of it from your system, destroy any hard copies of it
and notify the sender. Any use, disclosure, copying, or distribution of this message and/or any
attachments is strictly prohibited.


_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to