Teb6416_ddk.tci
上传用户:dahaojd
上传日期:2008-01-29
资源大小:14357k
文件大小:3k
- /*
- * ======== Teb6416_ddk.tci ========
- * This script simply sets up the board-specific parameters that are needed
- * for the assorted DDK examples.
- */
- /*
- * Create an empty object and call it with the getProgObjs method to
- * create global variables for every Module and Instance object.
- * For example, instead of
- * prog.module("LOG").instance("LOG_system").buflen = <some value>;
- * we can simply say
- * tibios.LOG_system.buflen = <value>;
- */
- tibios = {};
- utils.getProgObjs(prog, tibios);
- /*
- * enable assorted BIOS features
- */
- bios.enableMemoryHeaps(prog)
- bios.enableRealTimeAnalysis(prog);
- /* bios.enableRtdx(prog); -- v1.0 Si did not support RTDX */
- bios.enableTskManager(prog);
- /*
- * initialize LOG objects for user trace and system log
- */
- var trace = tibios.LOG.create("trace");
- trace.bufLen = 1024;
- trace.logType = "circular";
- tibios.LOG_system.bufLen = 1024;
- tibios.LOG_system.logType = "circular";
- /*
- * Memory segments, their sizes, heaps, and heap sizes
- * ISRAM is internal program & data memory
- * SDRAM is external program & data memory,
- *
- * In internal and external memory, we create heaps with names
- * INTERNALHEAP and EXTERNALHEAP, respectively, and platform-independent
- * portions of the application refer to these heaps by their names
- * rather than the names of memory segments they are created in
- */
- /* Enable heap creation */
- bios.enableMemoryHeaps(prog);
- /* define comments of the data memory segments (Temporary fix for SDSsq28652) */
- tibios.SDRAM.comment ="This object defines space for the DSP's off-chip memory";
- tibios.GBL.C641XCONFIGUREL2 = true; /* Enable L2 configuration */
- tibios.GBL.C641XCCFGL2MODE = "4-way cache (0k)"; /* No L2 cache */
- /* allocate heap named "INTERNALHEAP" of size 0x02000 in internal memory */
- tibios.ISRAM.createHeap = true;
- tibios.ISRAM.heapSize = 0x02000; /* 8K */
- tibios.ISRAM.enableHeapLabel = true;
- tibios.ISRAM.heapLabel = prog.extern( "INTERNALHEAP" );
- /* allocate heap named "EXTERNALHEAP" of size 0x08000 in external memory */
- tibios.SDRAM.createHeap = true;
- tibios.SDRAM.heapSize = 0x08000; /* 32K */
- tibios.SDRAM.enableHeapLabel = true;
- tibios.SDRAM.heapLabel = prog.extern( "EXTERNALHEAP" );
- /*
- * Set the size of the application stack. Must be large
- * enough to accomodate worst-case of nested priorities, if any.
- */
- tibios.MEM.STACKSIZE = 0x1000;
- /*
- * Set the default segment for the stack allocated by TSK_create().
- */
- tibios.TSK.STACKSEG = tibios.SDRAM;
- /*
- * Overriding default section placement
- * Assign listed sections to specified memory segments.
- */
- /* General */
- /* Set dynamic heap allocation into ISRAM */
- tibios.MEM.BIOSOBJSEG = tibios.ISRAM; /* Segment for DSP/BIOS Objects */
- tibios.MEM.MALLOCSEG = tibios.ISRAM; /* Segment for malloc()/free() */
- /* BIOS data */
- /* BIOS code */
- /* Compiler Sections */
- /*
- * .bss and .far segments should be in internal memory to avoid cache
- * consistency problems with EDMA-ed data (it is by default,
- * so this is more of a reminder)
- */
- tibios.MEM.BSSSEG = tibios.ISRAM; /* C variables section (.bss) */
- tibios.MEM.FARSEG = tibios.ISRAM; /* C Variables Section (.far) */