/
TI BIOS Static Systems TI BIOS Static Systems

TI BIOS Static Systems - PowerPoint Presentation

faustina-dinatale
faustina-dinatale . @faustina-dinatale
Follow
343 views
Uploaded On 2019-12-09

TI BIOS Static Systems - PPT Presentation

TI BIOS Static Systems GCONF TCONF 8 March 2011 Dr Veton Këpuska 1 Introduction In this chapter the details of setting up a static DSP system will be considered 8 March 2011 Dr Veton Këpuska ID: 769789

march puska 2011 veton puska march veton 2011 bios mem sections system static iram prog memory file stack short

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "TI BIOS Static Systems" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

TI BIOS Static Systems(GCONF, TCONF) 8 March 2011 Dr. Veton Këpuska 1

Introduction In this chapter the details of setting up a static DSP system will be considered. 8 March 2011 Dr. Veton Këpuska 2

Objectives 8 March 2011 Dr. Veton Këpuska 3 2

Static System Modules 8 March 2011 Dr. Veton Këpuska 4 3

Static System Modules 8 March 2011 Dr. Veton Këpuska 5 3

What is a static system? One in which all components remain in place during the life of the systemNo components are created or deleted There is no ‘ heap ’ or use of the C malloc () or free() functions The converse is a ‘dynamic’ system, which is the opposite of all the above Static System Concepts 8 March 2011 Dr. Veton Këpuska 6

Static System Concepts Benefits of static systems: Reduced code size – create functions are replaced by BIOS declarations, there is no delete function, no inclusion of malloc /free functions or heap management Reduced MIPs consumption for environment creation – no time spent in create/delete , malloc ()/free() , etc Deterministic performance – malloc () is non-deterministic Optimal when most resources are required concurrently 8 March 2011 Dr. Veton Këpuska 7

Static System Concepts Limitations of static systems: Fixed allocation of memory usage Unable to create new components or modify existing ones at runtime Bottom Line: Some systems are best served with a static configuration, others may benefit from a dynamic solution DSP/BIOS fully supports both methodologies, even allowing easy migration between the two 8 March 2011 Dr. Veton Këpuska 8

Static System Configuration Management Segments – memory blocks present in the target hardware: Properties : base address, length, usage ( code/data) How are these defined in CCS? 8 March 2011 Dr. Veton Këpuska 9 short m = 10; short b = 2; short *y; extern LOG_obj trace; main() { short x = 0; scanf (x); LOG_printf (&trace... y = malloc (short); *y = m * x; *y = *y + b; } Hardware DSP Prog Data EPROM SRAM

Static System Configuration Management Sections – software component blocks, including: System sections – eg : stack C sections – eg : code, BIOS sections – eg : code, objects, ... User-defined sections - ex. #pragma CODE_SECTION How are these routed to the desired memory segment? 8 March 2011 Dr. Veton Këpuska 10

GCONF & TCONF Which One to Use? GCONF (pre BIOS 5.x) – Graphical Configuration Tool TI’s historical system setup method – created a .CDB file Easy to use visual system design / wizard-like interface Projects don’t directly transfer to new board, ISA, BIOS rev TCONF (BIOS 5.0 – 5.1) – Text-based Configuration Java Script language; Write in any desired text editor Produces smaller, more concise output Output is printable – better documenting Designed for easy transport to new board, ISA, BIOS revs Runs under Linux, Solaris, Windows User’s guide: SPRU007 8 March 2011 Dr. Veton Këpuska 11

GCONF & TCONF Which One to Use? GCONF (BIOS 5.2 +) – Graphical to Text Config Tool Set up a system as per GCONF See TCONF components generated as you go Outputs a TCONF resultant CDB2TCF – CDB to TCF conversion utility or CDBCMP Converts existing GCONF .CDB files to TCONF .TCF format Provided in BIOS 5.0 and greater 8 March 2011 Dr. Veton Këpuska 12

Static System Modules 8 March 2011 Dr. Veton Këpuska 13 3

Defining Memory Segments Identify all hardware segments to CCSEach discontinuity requires a new segment A continuous block may be defined as separate sub-blocks if desired 8 March 2011 Dr. Veton Këpuska 14

Defining Memory Segments right click on MEM mgr select “insert MEM ” type MEM name right click on new MEM select “properties ” indicate desired Base Address Length Space (Code, Data, both) Heap : usage described later – leave this box unchecked in static systems 8 March 2011 Dr. Veton Këpuska 15 Note: Suppression of heap support is via: MEM manager | Properties | General | No Dynamic Memory Heaps

TCONF Memory Segment Setup 8 March 2011 Dr. Veton Këpuska 16 var myMem = MEM.create(“IRAM"); myMem.comment = “internal RAM"; myMem.base = 0x00000000; myMem.len = 0x00100000; myMem.space = “both"; myMem.createHeap = “false"; /* myMem.heapSize = 0x08000; */ /* myMem.enableHeapLabel = "false"; */ /* myMem.heapLabel = prog.extern("seg_name", "asm"); */ MEM.NOMEMORYHEAPS = “true"; /* disable heap support */ /* load platform */ utils . load Platform ( “ti.platforms.dsk5510” );

TCONF Memory Segment Setup Typical Memory Segments 8 March 2011 Dr. Veton Këpuska 17 Name Memory Segment Type IPRAM Internal program memory IDRAM Internal data memory SBSRAM External SBSRAM on CE0 SDRAM0 External SDRAM on CE2 SDRAM1 External SDRAM on CE3

Static System Modules 8 March 2011 Dr. Veton Këpuska 18 3

Software Sections 8 March 2011 Dr. Veton Këpuska 19 3

Software Sections 8 March 2011 Dr. Veton Këpuska 20 3

DSP System Stack Stack is used forLocal variables in HWI and SWIs ( not TSKs)Calling arguments for functions, Context save. Configuration tool sets stack size and location at link timeSize: MEM.STACKSIZE or MEM->Properties->General->Stack Size Location: MEME.STACKSEG or MEM->Properties->BIOS Data->Stack Size 8 March 2011 Dr. Veton Këpuska 21

DSP System Stack 8 March 2011 Dr. Veton Këpuska 22 0xBEBE 0xBEBE 0xBEBE 0xBEBE 0xBEBE 0xBEBE 0xBEBE 0xBEBE 0xBEBE 0xBEBE 0xBEBE 0xBEBE Create a large stack Fill with a known (non-zero) value Halt system, look for key value No key values found? Increase stack size Lots of key values left? Decrease stack size Alternate method Use HWI monitor option on highest HWI(s) Monitor SP Look at max value(s) of SP Run system to exercise all likely usage SWI 2 0xBEBE 0xBEBE 0xBEBE HWI 1 HWI 3 SWI 4

Managing Stack Size via GCONF, TCONF 8 March 2011 Dr. Veton Këpuska 23 Minimum estimated stack size is shown at top of GCONF display. Stack size is set via: Memory Section Manager | Properties | General Main( argv,argc ) MEM.STACKSIZE = 0x0400; MEM.ARGSSIZE = 0x0004;

Software Sections 8 March 2011 Dr. Veton Këpuska 24 3

C Program Sections 8 March 2011 Dr. Veton Këpuska 25 short m = 10; short b ; short x[10]; main() { short x = 0; scanf (x); y = malloc (short); *y = m * x; *y = *y + b; } Dynamic Variables Global Variables Code Local Variables Initial values .sysmem . bss , .far .cinit .stack .text

8 March 2011 Dr. Veton Këpuska 26 .text code .switch Switch tables for case statements .const Global and static string literals . cinit Initial values for global/static vars .pinit C++ table of constructors (startup) . bss Global and static variables .far Global and static variables .stack Stack (local variables) . sysmem malloc memory draw (heap) .cio Buffers for stdio functions Initialized sections Uninitialized sections

C components are routed to desired destinations via Memory Section Manager | Properties | Compiler Sections Routing C Sections via GCONF 8 March 2011 Dr. Veton Këpuska 27

Routing C Sections via =TCONF 8 March 2011Dr. Veton Këpuska 28 MEM.TEXTSEG = prog.get ("IRAM"); MEM.SWITCHSEG = prog.get ("IRAM"); MEM.BSSSEG = prog.get ("IRAM"); MEM.FARSEG = prog.get ("IRAM"); MEM.CINITSEG = prog.get ("IRAM"); MEM.PINITSEG = prog.get ("IRAM"); MEM.CONSTSEG = prog.get ("IRAM"); MEM.DATASEG = prog.get ("IRAM"); MEM.CIOSEG = prog.get ("IRAM"); MEM.MALLOCSEG = prog.get ("IRAM");

Software Sections 8 March 2011 Dr. Veton Këpuska 29 3

BIOS Sections 8 March 2011 Dr. Veton Këpuska 30 BIOS Objects BIOS Functions Hardware DSP Prog Data EPROM SRAM short m = 10; short b = 2; short *y; extern LOG_obj trace; main() { short x = 0; scanf (x); LOG_printf (&trace... y = malloc (short); *y = m * x; *y = *y + b; }

BIOS Sections 8 March 2011 Dr. Veton Këpuska 31 BIOS Init .sysinit BIOS Code .bios Buffers .logname$buf ... Objects .log . sts ... Initialized sections RAM resident sections

Routing BIOS Sections via GCONF 8 March 2011 Dr. Veton Këpuska 32 BIOS components are routed to desired destinations via Memory Section Manager | Properties | BIOS Data + BIOS Code

Routing BIOS Sections via TCONF 8 March 2011 Dr. Veton Këpuska 33 MEM.BIOSSEG = prog.get ("IRAM"); MEM.SYSINITSEG = prog.get ("IRAM"); MEM.HWISEG = prog.get ("IRAM"); MEM.HWIVECSEG = prog.get (“VECS"); MEM.RTDXTEXTSEG = prog.get ("IRAM"); MEM.ARGSSEG = prog.get ("IRAM"); MEM.STACKSEG = prog.get ("IRAM"); MEM.GBLINITSEG = prog.get ("IRAM"); MEM.TRCDATASEG = prog.get ("IRAM"); MEM.SYSDATASEG = prog.get ("IRAM"); MEM.OBJSEG = prog.get ("IRAM");

Vector Setup via GCONF 9 March 2011 Dr. Veton Këpuska 34 Hardware Interrupt Vectors are routed via Memory Section Manager | Properties | BIOS Code | . hwi_vec to a segment defining the Vector range Note: new seed files do not use separate VECS segment; . hwi_vec is first to link in IRAM

Software Sections 9 March 2011 Dr. Veton Këpuska 35 3

User Defined Sections Use the memory segments created by the Configuration Tool Require a separate linker command file to place sections Place user defined sections using the SECTIONS directive Use CCS “Link Order” capability to link the Config . Tool generated file then the user linker command file Put the user defined linker command file in the project (along with the BIOS command file) 9 March 2011 Dr. Veton Këpuska 36 #pragma DATA_SECTION(x, “ mysect ”); Int x[1024]; user.c SECTIONS { mysect :> IRAM } user.cmd Defined in the Config Tool

Link Order Link Order is the fourth tab under Build Optons The . cmd files are read in the order listed audiocfg.cmd is the Config . Tool’s . cmd file MEM segments are declared here user.cmd must be added to the project 9 March 2011 Dr. Veton Këpuska 37

Static System Modules 9 March 2011 Dr. Veton Këpuska 38 3

Files Generated by the Config Tool 9 March 2011Dr. Veton Këpuska 39 myWork.tcf Textual configuration script file myWorkcfg.cmd Linker command file myWorkcfg_c.c C file to s/u BIOS obj’s , etc myWorkcfg.s ## ASM init file for series ## DSP myWorkcfg.h ## Header file for above myWork.cdb I/F to GCONF display myWorkcfg.h header file for config inclusions

File Extensions 9 March 2011 Dr. Veton Këpuska 40 audio.c Compiler/ Assembler audiocfg.h## audiocfg.s## audiocfg.cmd audio.h audio.cmd (optional) audiocfg.obj mod.h Linker audio.asm audio.obj audio.tcf (audio.cdb) *.lib audio.out Audiocfg_c.c audio.map

Static System Modules 9 March 2011 Dr. Veton Këpuska 41 3

Post-Build Memory Usage Examination sectti.exe filename.out Displays length and starting address of program sections in hex of COFF filename.map Report generated by linker and specified in the build options ofd6x.exe Object File Display (version for each ISA) Provides a more detailed XML report than map file 9 March 2011 Dr. Veton Këpuska 42 P roject | Build O p tions | G eneral tab : Final Build Steps box : sectti Lab.out

Static System Modules 9 March 2011 Dr. Veton Këpuska 43 3

Startup Sequence 9 March 2011 Dr. Veton Këpuska 44 interrupt enable bits OFF “other” initialization c_int00() User Init function called interrupt flag bits OFF vector table pointer initialized BIOS_init() do hardware initialization enable individual interrupts return main() HWI_startup() enables HWI start DSP/BIOS scheduler BIOS_start () IER C6000 interrupt enables interrupt flags global int enable IFR GIE IMR IFR INTM C5000 system code user code Reset -> vector –> Boot Loader (option )

Startup Sequence Initialize the DSP and the hardware The software stack pointer, memory wait states, memory configuration registersThis is part of the boot.c file that is part of the DSP/BIOS libraryBIOS_init( ) is called automatically Initializes DSP/BIOS modules main() System initialization that needs to be performed Enable selected interrupts before interrupts are enabled globally Must return to complete the program initialization !!! BIOS_start ( ) is called automatically Start DSP/BIOS Enables interrupts globally Drops into the DSP/BIOS “background loop” Initializes communication with the host for real-time analysis 9 March 2011 Dr. Veton Këpuska 45

Static System Modules 9 March 2011 Dr. Veton Këpuska 46 3

Lab 9: Static System Goals: Open the map file genereated by building the project and determine where the stream buffers were placed originally – and note how much IRAM was consumed in the project Redirect the output buffers to external DDR2 (via pragma and user linker command file) and observe their new locations in the map file, and the amount of IRAM consumed this time Run the code to see if performance is maintained when using this lower speed memory 9 March 2011 Dr. Veton Këpuska 47

Static System Repeat the above experiment on the input buffers . This time, if exposure to the text based interface to the TCF file is desired, make the changes via the text edit option for the file Again, run the code to determine if performance is sustained Load a given solution found in C:\BIOS\Sols\09d to observe the performance a cache compliant solution will offer when off-chip resources are involved 9 March 2011 Dr. Veton Këpuska 48

BIOS Instrumentation: Static SystemsEND 8 March 2011 49 Dr. Veton Këpuska