dsp/bios real time operating system using dsp /arm processor
DESCRIPTION
DSP/BIOS Real Time Operating system using DSP /ARM processor. Learning Objectives. Introduce DSP/BIOS and its components. Introduce the software tools for managing DSP/BIOS components and objects. Real time embededd system. - PowerPoint PPT PresentationTRANSCRIPT
DSP/BIOSDSP/BIOS
Real Time Operating system using DSP Real Time Operating system using DSP /ARM processor/ARM processor
Ajay Patil
Chapter 4, Slide 2
Learning ObjectivesLearning Objectives
Introduce DSP/BIOS and its Introduce DSP/BIOS and its components.components.
Introduce the software tools for Introduce the software tools for managing DSP/BIOS components and managing DSP/BIOS components and objects.objects.
Ajay Patil
Chapter 4, Slide 3
Real time embededd systemReal time embededd system
The system in which some specific work has The system in which some specific work has to be done in specific time period are called to be done in specific time period are called real time embedded systems.real time embedded systems.
The embedded software consists of the The embedded software consists of the operating system and application software. operating system and application software.
Ajay Patil
Chapter 4, Slide 4
The services provided by Operating The services provided by Operating system are accessed through the system are accessed through the Application Programming Interface Application Programming Interface (API) to develop application software.(API) to develop application software.
The API is a set of function calls using The API is a set of function calls using which you can access the various kernal which you can access the various kernal objects and service provided by kernal.objects and service provided by kernal.
Ajay Patil
Chapter 4, Slide 5
DSP/BIOSDSP/BIOS The DSP/BIOS is an operating system (scalable real The DSP/BIOS is an operating system (scalable real
time kernal) that can provide:time kernal) that can provide: A graphical interface for static system setup.A graphical interface for static system setup. Real-time scheduling and synchronization.Real-time scheduling and synchronization. Real-time analysis (RTA)Real-time analysis (RTA) Real-time data exchange (RTDX).Real-time data exchange (RTDX). DSP/BIOS provides preemptive multi-threading, DSP/BIOS provides preemptive multi-threading,
hardware abstraction, and configuration tools.hardware abstraction, and configuration tools.
Ajay Patil
Chapter 4, Slide 6
DSP/BIOS - API ModulesDSP/BIOS - API Modules
Instrumentation/Real-Time AnalysisInstrumentation/Real-Time Analysis
LOGLOG Message Log mangerMessage Log mangerSTSSTS Statistics accumulator manager Statistics accumulator manager TRCTRC Trace manager Trace manager RTDXRTDX Real-Time Data Exchange manager Real-Time Data Exchange manager
Thread Types Thread Types
HWIHWI Hardware interrupt manager Hardware interrupt manager SWISWI Software interrupt manager Software interrupt manager TSKTSK Multitasking manager Multitasking manager IDLIDL Idle function & processing loop manager Idle function & processing loop manager
Clock and Periodic Functions Clock and Periodic Functions
CLKCLK System clock manager System clock manager PRDPRD Periodic function manger Periodic function manger
Comm/Synch between threadsComm/Synch between threads
SEMSEM Semaphores manager Semaphores manager MBXMBX Mailboxes manager Mailboxes manager LCKLCK Resource lock manager Resource lock manager
Input/OutputInput/Output
PIPPIP Data pipe manager Data pipe manager HSTHST Host input/output manager Host input/output manager SIOSIO Stream I/O manager Stream I/O manager DEVDEV Device driver interface Device driver interface
Memory and Low-level PrimitivesMemory and Low-level Primitives
MEMMEM Memory manager Memory manager SYSSYS System services manager System services manager QUEQUE Queue manager Queue manager ATMATM Atomic functions Atomic functions GBLGBL Global setting manager Global setting manager
Ajay Patil
Chapter 4, Slide 7
DSP/BIOS module features and BenefitsDSP/BIOS module features and Benefits
DSP/BIOS API provides programming number DSP/BIOS API provides programming number of TI devices and easy program development of TI devices and easy program development tooltool
All DSP/BIOS objects can be configured All DSP/BIOS objects can be configured statically and bound into an executable program statically and bound into an executable program image. image.
Instrumentation data can be formatted on host.Instrumentation data can be formatted on host. The APIs are modularized so only those APIs The APIs are modularized so only those APIs
that are used by the program need to bound into that are used by the program need to bound into executable module.executable module.
Ajay Patil
Chapter 4, Slide 8
A program can dynamically create and A program can dynamically create and delete objects that are used in special delete objects that are used in special situations.situations.
The threading provides thread types for The threading provides thread types for variety of situations. variety of situations.
Hardware interrupts, software interrupts, Hardware interrupts, software interrupts, tasks, idle functions ,and periodic functions tasks, idle functions ,and periodic functions all are supported. all are supported.
Ajay Patil
Chapter 4, Slide 9
Structure to support communication and Structure to support communication and synchronization between threads are synchronization between threads are provided.provided.
These includesThese includes Semaphores, Semaphores, mailboxes, and mailboxes, and resource locks. resource locks.
Ajay Patil
Chapter 4, Slide 10
Two I/O models are supported for Two I/O models are supported for maximum flexibility and power.maximum flexibility and power.
Pipes are used for target/host Pipes are used for target/host communication and two support simple communication and two support simple cases in which one thread writes to the cases in which one thread writes to the pipes and another reads from pipes. pipes and another reads from pipes.
Streams are used for more complex I/O Streams are used for more complex I/O and to support device driver.and to support device driver.
Ajay Patil
Chapter 4, Slide 11
DSP/BIOS ComponentsDSP/BIOS Components
Ajay Patil
Chapter 4, Slide 12
Files created By DSP/ BIOSFiles created By DSP/ BIOS .cdb. Stores configuration settings.cdb. Stores configuration settings .cmd. Linker command file.cmd. Linker command file .h. Includes DSP/BIOS module header .h. Includes DSP/BIOS module header
files and declares external variables for files and declares external variables for objects created in the configuration fileobjects created in the configuration file
.s67. Assembly language source file for .s67. Assembly language source file for DSP/BIOS settingsDSP/BIOS settings
.h67. Assembly language header file .h67. Assembly language header file included by programincluded by program
.c. Code for Chip Support Library (CSL) .c. Code for Chip Support Library (CSL) structures and settingsstructures and settings
Ajay Patil
Chapter 4, Slide 13
LOG (Event Log Manager).
Log objects capture information about events in real time. System events are captured in the system log. We can configure additional logs. Your program can add messages to any log.
Ajay Patil
Chapter 4, Slide 14
LOG module functionLOG module function
FunctionFunction DescriptionDescriptionLOG_disableLOG_disable Disable A LOGDisable A LOG
LOG_enableLOG_enable Enable A LOGEnable A LOG
LOG_error LOG_error //lOG_messagelOG_message
Write a message to system logWrite a message to system log
LOG_eventLOG_event Append a unformatted message to a Append a unformatted message to a loglog
LOG_printfLOG_printf Append a formatted message to a logAppend a formatted message to a log
LOG_resetLOG_reset Reset a logReset a log
Ajay Patil
Chapter 4, Slide 15
TaskTask
Task- Any real time operating system Task- Any real time operating system consists number of tasks, it include consists number of tasks, it include operating system tasks and Application operating system tasks and Application specific tasks.specific tasks.
Each task in an embedded is implemented Each task in an embedded is implemented as an infinite loopas an infinite loop
The tasks consists of its name, a unique The tasks consists of its name, a unique ID, a priority, a stack and task control ID, a priority, a stack and task control block that contain all information related block that contain all information related to the task.to the task.
Ajay Patil
Chapter 4, Slide 16
Task schedulerTask scheduler
Only one processor has to handle Only one processor has to handle multiple tasks, the tasks have to share multiple tasks, the tasks have to share the CPU time in a disciplined manner so the CPU time in a disciplined manner so that one task tasks does not get lot of that one task tasks does not get lot of time while others are waiting forever.time while others are waiting forever.
Therefore each task has to be assigned Therefore each task has to be assigned priority , and a mechanism for deciding priority , and a mechanism for deciding which task will get CPU time next has to which task will get CPU time next has to be worked out. This is known as task be worked out. This is known as task scheduler.scheduler.
Ajay Patil
Chapter 4, Slide 17
SemaphoreSemaphore Semaphore is like a key to house.Semaphore is like a key to house. Semaphore –it is kernel Object that is Semaphore –it is kernel Object that is
used for both resource synchronization used for both resource synchronization and task synchronization.and task synchronization.
Each Module has its Specific Each Module has its Specific Management Function Calls.Management Function Calls.
When multiple task are running , two or When multiple task are running , two or more task may need to share the same more task may need to share the same resource.resource.
Ajay Patil
Chapter 4, Slide 18
Semaphore functionSemaphore function
FunctionFunction DescriptionDescription
SEM_createSEM_create Create a SEMAPHORECreate a SEMAPHORE
SEM_deleteSEM_delete Delete a SEMAPHOREDelete a SEMAPHORESEM_pendSEM_pend wait for a semaphorewait for a semaphoreSEM_postSEM_post Signal a semaphoreSignal a semaphoreSEM_ipostSEM_ipost Signal a semaphore (interrupt only)Signal a semaphore (interrupt only)
SEM_resetSEM_reset Reset a semaphoreReset a semaphoreSEM_newSEM_new Initialize a semaphoreInitialize a semaphoreSEM_countSEM_count Get current semaphore countGet current semaphore count
Ajay Patil
Chapter 4, Slide 19
Mailboxes- it is just like a postal box.A Mailboxes- it is just like a postal box.A task can have a mailbox into which others task can have a mailbox into which others can post a mail. A task or ISR sends the can post a mail. A task or ISR sends the message to mailbox. message to mailbox.
Message queues (Queue manager) can be Message queues (Queue manager) can be considered as an array of mailboxes.considered as an array of mailboxes.
Ajay Patil
Chapter 4, Slide 20
MailBox functionMailBox function
FunctionFunction DescriptionDescription
MBX_createMBX_create Create a mailboxCreate a mailbox
MBX_deleteMBX_delete Delete a mailboxDelete a mailbox
MBX_pendMBX_pend wait for a message from wait for a message from mailboxmailbox
MBX_postMBX_post Post a message to mailboxPost a message to mailbox
Ajay Patil
Chapter 4, Slide 21
PipesPipes
Pipes can be used for inter task Pipes can be used for inter task communicationcommunication
One task may send data packets One task may send data packets through one pipe and other taskk may through one pipe and other taskk may send acknowledge through other pipessend acknowledge through other pipes
Task 1Task 1 Task 2Task 2
Ajay Patil
Chapter 4, Slide 22
Naming conventionsNaming conventions
Each DSP/BIOS module has a unique Each DSP/BIOS module has a unique name that is used as a prefix for name that is used as a prefix for operations (functions), header files, and operations (functions), header files, and objects for the module.objects for the module.
The name is comprised of 3 or more The name is comprised of 3 or more uppercase alphanumerics.uppercase alphanumerics.
All identifiers beginning with upper-All identifiers beginning with upper-case letters followed by an underscore case letters followed by an underscore (XXX_*) should be treated as reserved (XXX_*) should be treated as reserved words.words.
Ajay Patil
Chapter 4, Slide 23
Module header NamesModule header Names
Each DSP/BIOS module has two Each DSP/BIOS module has two header files containing declarations of header files containing declarations of all constants, types, and functions made all constants, types, and functions made available through that module’s available through that module’s interface.interface.
xxx.h xxx.h DSP/BIOS APIs header files DSP/BIOS APIs header files for C programs. Our C source files for C programs. Our C source files should include std.h and the header files should include std.h and the header files for any modules the C functions use.for any modules the C functions use.
Xxx.h67 Xxx.h67 DSP/BIOS API header files DSP/BIOS API header files for Assembly programs.for Assembly programs.
Ajay Patil
Chapter 4, Slide 24
Object NamesObject Names
System objects that are included in the System objects that are included in the configuration by default typically have configuration by default typically have names with a 3 or 4-letter code for the names with a 3 or 4-letter code for the module that defines or uses the objects.module that defines or uses the objects.
for e.g , the default configuration for e.g , the default configuration includes a LOG object Called includes a LOG object Called LOG_system.LOG_system.
Ajay Patil
Chapter 4, Slide 25
Operation namesOperation names
The format for the DSP/BIOS API The format for the DSP/BIOS API operation name is MOD_action, where operation name is MOD_action, where MOD is the letter code for the module MOD is the letter code for the module that contains the operation ,and action that contains the operation ,and action is the Action performed by the moduleis the Action performed by the module
For e.g SWI_postFor e.g SWI_post
Ajay Patil
Chapter 4, Slide 26
The user writes code (‘C’/assembly) The user writes code (‘C’/assembly) using the DSP/BIOS library.using the DSP/BIOS library.
The user can use the configuration tools The user can use the configuration tools to setup the system.to setup the system.
All the files generated constitute a All the files generated constitute a project.project.
Ajay Patil
Chapter 4, Slide 27
Calling DSP/BIOS API from MainCalling DSP/BIOS API from Main
DSP/BIOS initialization takes place in DSP/BIOS initialization takes place in two placetwo place
During BIOS_init which runs before During BIOS_init which runs before mains and BIOS_start which runs after mains and BIOS_start which runs after your program returns from mainyour program returns from main
Ajay Patil
Chapter 4, Slide 28