DSP/BIOS System Integration Workshop Copyright © 2004 Texas Instruments. All rights reserved. T TO Technical Training Organization 1.Introduction 2.Real-Time.

Slides:



Advertisements
Similar presentations
Introduction to HT-IDE3000 Micro-C development System Department.
Advertisements

Yaron Doweck Yael Einziger Supervisor: Mike Sumszyk Spring 2011 Semester Project.
Products Training -- DGUS LCM
Chapter 3 Loaders and Linkers
9.0 EMBEDDED SOFTWARE DEVELOPMENT TOOLS 9.1 Introduction Application programs are typically developed, compiled, and run on host system Embedded programs.
SYSTEM PROGRAMMING & SYSTEM ADMINISTRATION
1 Starting a Program The 4 stages that take a C++ program (or any high-level programming language) and execute it in internal memory are: Compiler - C++
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Overheads adapted from those provided by the authors of the textbook.
Protected Mode. Protected Mode (1 of 2) 4 GB addressable RAM –( to FFFFFFFFh) Each program assigned a memory partition which is protected from.
Software Development and Software Loading in Embedded Systems.
C6713 DSK Diagnostic Utility included with DSK....
Introduction Purpose Objectives Content Learning Time
Copyright © 2008 Texas Instruments. All rights reserved. 1.Introduction 2.Real-Time System Design Considerations 3.Hardware Interrupts (HWI) 4.Software.
The 6713 DSP Starter Kit (DSK) is a low-cost platform which lets customers evaluate and develop applications for the Texas Instruments C67X DSP family.
Renesas Technology America Inc. 1 M16C/Tiny SKP Tutorial 2 Creating A New Project Using HEW4.
DSP/BIOS System Integration Workshop Copyright © 2004 Texas Instruments. All rights reserved. D SP TEXAS INSTRUMENTS TECHNOLOGY 1.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training course describes how to configure the the C/C++ compiler options.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Project Management November.
Enabling the ARM Learning in INDIA ARM DEVELOPMENT TOOL SETUP.
DSP/BIOS System Integration Workshop Copyright © 2004 Texas Instruments. All rights reserved. T TO Technical Training Organization 1 1.Introduction 2.Real-Time.
Upgrade to Real Time Linux Target: A MATLAB-Based Graphical Control Environment Thesis Defense by Hai Xu CLEMSON U N I V E R S I T Y Department of Electrical.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Purpose  This training module provides an overview of optimization techniques used in.
Copyright © 2004 Texas Instruments. All rights reserved. T TO Technical Training Organization 1 1.Introduction 2.Real-Time System Design Considerations.
Copyright © 2004 Texas Instruments. All rights reserved. T TO Technical Training Organization 1.Introduction 2.Real-Time System Design Considerations 3.Hardware.
Copyright © 2004 Texas Instruments. All rights reserved. 1.Introduction 2.Real-Time System Design Considerations 3.Hardware Interrupts (HWI) 4.Software.
DSP/BIOS System Integration Workshop Copyright © 2004 Texas Instruments. All rights reserved. T TO Technical Training Organization 1 1.Introduction 2.Real-Time.
Introduction Purpose This training course covers debugging an application on an SH target in the Renesas HEW (High-performance Embedded Workshop) development.
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
UBI >> Contents Chapter 2 Software Development tools Code Composer Essentials v3: Code Debugging Texas Instruments Incorporated University of Beira Interior.
Topic 2d High-Level languages and Systems Software
The Functions of Operating Systems Desktop PC Operating Systems.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
2003 Dominic Swayne1 Microsoft Disk Operating System and PC DOS CS-550-1: Operating Systems Fall 2003 Dominic Swayne.
TMS320C6000 DSP Optimization Workshop Chapter 10 Advanced Memory Management Copyright © 2005 Texas Instruments. All rights reserved. Technical Training.
Writing a Run Time DLL The application loads the DLL using LoadLibrary() or LoadLibraryEx(). The standard search sequence is used by the operating system.
32-Bit-Digital Signal Controller Texas Instruments Incorporated
This material exempt per Department of Commerce license exception TSU Address Management.
Renesas Technology America Inc. 1 M16C Seminars Lab 3 Creating Projects Using HEW4 14 March 2005 M16C Seminars Lab 3 Creating Projects Using HEW4 Last.
DSP/BIOS System Integration Workshop Copyright © 2004 Texas Instruments. All rights reserved. T TO Technical Training Organization Introduction.
How to write a MSGQ Transport (MQT) Overview Nov 29, 2005 Todd Mullanix.
Differences Training BAAN IVc-BaanERP 5.0c: Application Administration, Customization and Exchange BaanERP 5.0c Tools / Exchange.
Renesas Technology America Inc. 1 SKP8CMINI Tutorial 2 Creating A New Project Using HEW.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course explains how to use section setting and memory.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
Basic Memory Management Chapter 3 C6000 Integration Workshop Copyright © 2005 Texas Instruments. All rights reserved. Technical Training Organization T.
Chapter – 8 Software Tools.
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  This training course demonstrates the Project Generator function.
DSP/BIOS Real Time Operating system using DSP /ARM processor.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
C Copyright © 2009, Oracle. All rights reserved. Using SQL Developer.
1 Module 3: Processes Reading: Chapter Next Module: –Inter-process Communication –Process Scheduling –Reading: Chapter 4.5, 6.1 – 6.3.
Chapter 4 DSP/BIOS. DSP/BIOS Part 1 - Introduction.
Lecture 3 Translation.
Muen Policy & Toolchain
Processes and threads.
Process concept.
Chapter 9: Virtual Memory
Software Development with uMPS
An Embedded Software Primer
Topic 2e High-Level languages and Systems Software
Static Systems (GCONF, TCONF)
Chapter 9: Virtual-Memory Management
Loaders and Linkers: Features
9.0 EMBEDDED SOFTWARE DEVELOPMENT TOOLS
Lecture Topics: 11/1 General Operating System Concepts Processes
Lab. 4 – Part 2 Demonstrating and understanding multi-processor boot
Computer System Laboratory
COMP755 Advanced Operating Systems
Topic 2b ISA Support for High-Level Languages
Presentation transcript:

DSP/BIOS System Integration Workshop Copyright © 2004 Texas Instruments. All rights reserved. T TO Technical Training Organization 1.Introduction 2.Real-Time System Design Considerations 3.Hardware Interrupts (HWI) 4.Software Interrupts (SWI) 5.Task Authoring (TSK) 6.Data Streaming (SIO) 7.Multi-Threading (CLK, PRD) 8.BIOS Instrumentation (LOG, STS, SYS, TRC) 9.Static Systems (GCONF, TCONF) 10.Cache (BCACHE) 11.Dynamic Systems (MEM, BUF) 12.Flash Programming (HexAIS, Flashburn) 13.Inter-Thread Communication (MSGQ,...) 14.DSP Algorithm Standard (XDAIS) 15.Input Output Mini-Drivers (IOM) 16.Direct Memory Access (DMA) 17.Review 1

Objectives  List the advantages and limitations of static systems  Demonstrate how to define target memory in CCS  Demonstrate how to route software components into desired hardware memory  Describe the files created in a CCS project build  Observe the results of a built project  Describe the startup sequence of a BIOS based system T TO Technical Training Organization 2

Static System Considerations 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 ProgData EPROM SRAM T TO Technical Training Organization  Concepts  Hardware Segments  Software Sections  Files Created  Observe Results  Startup Sequence  Lab 3

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  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  What is a static system?  One in which all components remain in place during the life of the system  No 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 T TO Technical Training Organization 4

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? 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 ProgData EPROM SRAM  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? T TO Technical Training Organization 5

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  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 T TO Technical Training Organization 6

Static System Considerations 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 ProgData EPROM SRAM T TO Technical Training Organization  Concepts  Hardware Segments  Software Sections  Files Created  Observe Results  Startup Sequence  Lab 7

Defining Memory Segments 1. right click on MEM mgr 2. select “insert MEM” 3. type MEM name 4. right click on new MEM 5. select “properties” 6. indicate desired Base Address Length Space (Code, Data, both) Heap: usage described later – leave this box unchecked in static systems Note: Suppression of heap support is via: MEM manager | Properties | General | No Dynamic Memory Heaps  Identify all hardware segments to CCS  Each discontinuity requires a new segment  A continuous block may be defined as separate sub-blocks if desired T TO Technical Training Organization 8

TCONF Memory Segment Setup var myMem = MEM.create(“IRAM"); myMem.comment = “internal RAM"; myMem.base = 0x ; myMem.len = 0x ; 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.loadPlatform(“ti.platforms.dsk5510”); NameMemory 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 Typical Memory Segments T TO Technical Training Organization 9

Static System Considerations T TO Technical Training Organization  Concepts  Hardware Segments  Software Sections  Files Created  Observe Results  Startup Sequence  Lab 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 ProgData EPROM SRAM  System Stack  C Sections  BIOS Sections  User Sections 10

DSP System Stack T TO Technical Training Organization  Stack is used for  Local variables in HWIs and SWIs (not TSKs)  Calling arguments for functions, Context save  Configuration tool sets stack size and location at link time  Size: MEM.STACKSIZE or MEM -> Properties -> General -> Stack Size  Location: MEM.STACKSEG or MEM -> Properties -> BIOS Data -> Stack Section 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 HWI 1 HWI 3 SWI 4 11

Managing Stack Size via GCONF, TCONF  Minimum estimated stack size is shown at top of GCONF display.  Stack size is set via: Memory Section Manager | Properties | General MEM.STACKSIZE = 0x0400; MEM.ARGSSIZE = 0x0004; Main(argv,argc) T TO Technical Training Organization 12

Static System Considerations 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 ProgData EPROM SRAM  System Stack  C Sections  BIOS Sections  User Sections T TO Technical Training Organization  Concepts  Hardware Segments  Software Sections  Files Created  Observe Results  Startup Sequence  Lab 13

C Program Sections short m = 10; short b ; short x[10]; main() { short x = 0; scanf(x); y = malloc(short); *y = m * x; *y = *y + b; }.textcode.switchSwitch tables for case statements.constGlobal and static string literals.cinitInitial values for global/static vars.pinitC++ table of constructors (startup).bssGlobal and static variables.farGlobal and static variables.stackStack (local variables).sysmemmalloc memory draw (heap).cioBuffers for stdio functions Initialized sectionsUninitialized sections Dynamic Variables Global Variables Code Local Variables Initial values.sysmem.bss,.far.cinit.stack.text T TO Technical Training Organization 14

Routing C Sections via GCONF C components are routed to desired destinations via Memory Section Manager | Properties | Compiler Sections T TO Technical Training Organization 15

T TO Technical Training Organization Routing C Sections via = TCONF 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"); 16

Static System Considerations 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 ProgData EPROM SRAM  System Stack  C Sections  BIOS Sections  User Sections T TO Technical Training Organization  Concepts  Hardware Segments  Software Sections  Files Created  Observe Results  Startup Sequence  Lab 17

BIOS Sections 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 Init.sysinit BIOS Code.bios Buffers.logname$buf... Objects.log.sts... Initialized sectionsRAM resident sections BIOS Objects BIOS Functions Hardware DSP ProgData EPROM SRAM T TO Technical Training Organization 18

Routing BIOS Sections via GCONF BIOS components are routed to desired destinations via Memory Section Manager | Properties | BIOS Data + BIOS Code T TO Technical Training Organization 19

Routing BIOS Sections via = TCONF 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"); T TO Technical Training Organization 20

Vector Setup via GCONF Hardware Interrupt Vectors are routed via Memory Section Manager | Properties | BIOS Code |.hwi_vec to a segment defining the Vector range T TO Technical Training Organization Note: new seed files do not use separate VECS segment;.hwi_vec is first to link in IRAM 21

Static System Considerations 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 ProgData EPROM SRAM  System Stack  C Sections  BIOS Sections  User Sections T TO Technical Training Organization  Concepts  Hardware Segments  Software Sections  Files Created  Observe Results  Startup Sequence  Lab 22

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) #pragma DATA_SECTION(x, “mysect”); Int x[1024]; user.c SECTIONS { mysect :> IRAM } user.cmd Defined in the Config Tool T TO Technical Training Organization 23

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 T TO Technical Training Organization 24

Static System Considerations 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 ProgData EPROM SRAM T TO Technical Training Organization  Concepts  Hardware Segments  Software Sections  Files Created  Observe Results  Startup Sequence  Lab 25

Files Generated by the Config Tool T TO Technical Training Organization  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  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 26

File Extensions 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 T TO Technical Training Organization Audiocfg_c.c audio.map 27

Static System Considerations 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 ProgData EPROM SRAM T TO Technical Training Organization  Concepts  Hardware Segments  Software Sections  Files Created  Observe Results  Startup Sequence  Lab 28

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 Project | Build Options | General tab: Final Build Steps box: sectti Lab.out T TO Technical Training Organization 29

Static System Considerations 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 ProgData EPROM SRAM T TO Technical Training Organization  Concepts  Hardware Segments  Software Sections  Files Created  Observe Results  Startup Sequence  Lab 30

Startup Sequence 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 codeuser code Reset -> vector –> Boot Loader (option) T TO Technical Training Organization 31

Startup Sequence  Initialize the DSP and the hardware  The software stack pointer, memory wait states, memory configuration registers  This is part of the boot.c file that is part of the DSP/BIOS library  BIOS_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 T TO Technical Training Organization 32

Static System Considerations 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 ProgData EPROM SRAM T TO Technical Training Organization  Concepts  Hardware Segments  Software Sections  Files Created  Observe Results  Startup Sequence  Lab 33

Lab 9: Static System T TO Technical Training Organization The goals of this lab are to:  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  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 34

ti Technical Training Organization T TO Technical Training Organization 35

Static System Considerations  MainNormal 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 ProgData EPROM SRAM T TO Technical Training Organization  MainHighlight 36