Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau FH .

Uploaded on:
Category: General / Misc
Continuous Operating Systems (RTOS). Specific class of working frameworks for advanced processor systemsCapable of serving numerous client errands at one time (
Slide 1

Module 12 : Real Time OS: DSP/BIOS 32-Bit-Digital Signal Controller TMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)

Slide 2

Real Time Operating Systems (RTOS) Particular class of working frameworks for advanced processor frameworks Capable of serving different client undertakings at one time ( "multi-errand OS") For all assignments in a running framework it is ensured, that arbitrary outer occasions in nature of every individual assignment will be overhauled in a given time ( "Most pessimistic scenario Response Time"). All errands must be served at the same time ("multi-undertaking OS") AND opportune ("RTOS") RTOS are extremely prevalent in implanted control What is a RTOS?

Slide 3

Real Time Operating Systems (RTOS) A running or executable program protest, that: is controlled by a bit of machine code "possesses" a given arrangement of working assets to begin/continue its course of activities is described by an arrangement of state factors ( registers, program counter, nearby stack factors, semaphores, letter boxes) Tasks are customized and fixed autonomously from each different Accesses to peripherals or information exchanges between errands are performed by RTOS - framework capacities calls. What is a Task?

Slide 4

Real Time Operating Systems (RTOS) Each undertaking can dwell in one of the accompanying states: existent 1 prepared 7 5 2 3 blocked finished 4 6 8 running not existent What is a Task-State - Model? For clarification of bolts 1-8 see next slide

Slide 5

Real Time Operating Systems (RTOS) An assignment is made by an introduction capacity An undertaking is chosen by the scheduler to utilize the CPU The scheduler plays out an errand change as per the booking guidelines of the RTOS The running assignment is sitting tight for an outer occasion , a message from another assignment or for a flag The occasion that was hindering an undertaking has happened The undertaking has finished its program The undertaking is re-initiated by another errand or by an occasion The undertaking will never be utilized again ( the length of the implanted framework is not turned off) All other assignment state moves are illicit. At the point when does the assignment – state change?

Slide 6

Real Time Operating Systems (RTOS) A critical part of the RTOS that calendars the grouping of errand execution stages and the change of undertaking states Two fundamental working modes for schedulers: time cut mode - registering time is allocated to undertakings in a predefined measure of processor time need mode – figuring time is doled out to assignments as indicated by the need of every undertaking in the framework. On the off chance that an assignment with higher need gets into status "prepared" the running errand will be pre-empted. joined forms between pre-emptive and time cut schedulers are likewise conceivable What is a Task - Scheduler?

Slide 7

Texas Instruments DSP/BIOS = "Work In Operating System" Texas Instruments firm product RTOS bit for the TMS320 group of DSP\'s A full-included, adaptable continuous portion System setup apparatuses Preemptive multi-threading scheduler Real-time investigation devices What is DSP/BIOS?

Slide 8

Texas Instruments DSP/BIOS Helps oversee complex C28x framework assets Allows to create and test assignments in a different undertaking control environment freely Reduces programming venture improvement time Eases programming upkeep & documentation Integrated with Code Composer Studio IDE Requires no runtime permit expenses Fully bolstered by TI and is a key segment of TI\'s eXpressDSP™ ongoing programming innovation Uses negligible MIPS and memory (2-8K) Why utilize DSP/BIOS?

Slide 9

DSP/BIOS Configuration Tool (record .cdb) System Setup Tools Handles memory arrangement (constructs .cmd document), run-time bolster libraries, intrude on vectors, framework setup and reset, and so forth. Constant Analysis Tools Allows application to run continuous while showing troubleshoot information Real-Time Scheduler Preemptive tread chief piece Real-Time I/O Allows two route correspondence between strings or amongst target and PC have

Slide 10

Design Problem: Add another Function TI DSP Existing Function 1 New Function Issues: Do we have enough residual registering energy to include another capacity? Are there conceivable asset clashes between the new capacity and the current framework? Will the new framework meet untouched confinements in a continuous installed control framework? Work 2 What are some conceivable arrangements?

Slide 11

Solution 1: augment the fundamental circle Main() { while(1) { } } Call every capacity from an unending circle inside primary Potential Problems: What if Algorithms keep running at various rates: - engine current circle at 20 kHz - react to keypad enter at 2 Hz What in the event that one calculation devours enough MIPS to drive the other calculation to miss its ongoing due dates/defers its reaction? Work 1 Function 2

Slide 12

Solution 2: utilize intrudes on 0 1 2 3 4 5 6 7 A hinder driven framework puts every capacity in its own ISR TI DSP principle { while(1); } Function1_ISR { } Function2_ISR { } Period Compute CPU Usage Function 1: 0.05 ms 1  s 2% Function 2: 500 ms 3  s ~ 0% 2% Function 1 running Function 1 sit without moving Function 2 Function 2 Time Only one ISR can keep running at once: Function 1 will be postponed, inevitably missing its due date…

Slide 13

Solution 3: settled equipment interferes (HWI) Nested hinders permit equipment hinders to appropriate each other primary { return; } Function1_ISR { } Function2_ISR { } running inert Function 1 Time 0 1 2 3 4 5 6 7 Use DSP/BIOS HWI dispatcher for setting save/reestablish, and permit seizure Reasonable approach in the event that you have predetermined number of interferes with/capacities one HWI work for every interfere with Function 2

Slide 14

DSP/BIOS - HWI Dispatcher for ISRs For non-BIOS code, we utilize the intrude on catchphrase to pronounce an ISR advises the compiler to perform setting save/reestablish intrude on void MyHwi(void) { } For DSP/BIOS code, the dispatcher will play out the spare/reestablish Remove the intrude on watchword from the MyHwi() Check the "Utilization Dispatcher" box when you design the intrude on vector in the DSP/BIOS config devices

Slide 15

DSP/BIOS - Software Interrupts (SWI) Make every calculation a free programming intrude on SWI booking is taken care of by DSP/BIOS HWI work activated by equipment SWI work activated by programming e.g. a call to SWI_post() Why utilize a SWI? No restriction on number of SWIs, and needs for SWIs are client characterized SWI can be booked by equipment or programming event(s) Relocate assignment handling from HWI to SWI principle { …/come back to O/S; } DSP/BIOS Function 1 Function 2

Slide 16

DSP/BIOS - Periodic Functions tick DSP/BIOS CLK period LED Periodic capacities keep running at a particular rate in your framework: - e.g. Driven squint requires 0.5 Hz Use the CLK Manager to determine the DSP/BIOS CLK rate in microseconds per "tick" Use the PRD Manager to indicate the period (for the capacity) in ticks Allows numerous occasional capacities with various rates

Slide 17

Creating a Periodic Function tick DSP/BIOS CLK period func1

Slide 18

Enabling BIOS – Return from fundamental() principle { …/come back to BIOS } DSP BIOS Must erase the interminable while() circle primary() comes back to BIOS IDLE string, permitting BIOS to timetable occasions, exchange information to have, and so forth. A perpetual while() circle in primary() won\'t permit BIOS to initiate Function 1 Function 2

Slide 19

Built-in Real-Time Analysis Tools Gather information on target (3-10 CPU cycles) Send information amid BIOS IDL (100s of cycles) Format information on host (1000s of cycles) Data gathering does NOT stop target CPU Execution Graph Software rationale analyzer Debug occasion timing and need CPU Load Graph Shows measure of CPU-power being expended

Slide 20

DSP/BIOS - API Modules TSK Communication/Synchronization SEM Semaphores director MBX Mailboxes administrator LCK Resource bolt supervisor Device-Independent Input/Output PIP Data pipe chief HST Host input/yield director SIO Stream I/O director DEV Device driver interface Memory and Low-Level Primitives MEM Memory administrator SYS System administrations administrator QUE Queue administrator ATM Atomic capacities GBL Global setting director Instrumentation/Real-Time Analysis LOG Message log director STS Statistics gatherer supervisor TRC Trace administrator RTDX Real-Time Data eXchange director Thread Types HWI Hardware intrude on chief SWI Software interfere with supervisor TSK Multi-entrusting supervisor IDL Idle work & prepare circle chief Clock and Periodic Functions CLK System clock administrator PRD Periodic work chief

Slide 21

Lab 12: Modify Lab 2 to utilize BIOS Use your answer for Lab2 in any case Modify the venture to utilize DSP/BIOS usefulness Let DSP/BIOS make the vital Linker Command Files Replace the product postpone circle from Lab2 by an intermittent capacity ("PRD") of DSP/BIOS Create another capacity "led_runner()" that will actuate the following condition of the LED-line Call this capacity each 500ms with a PRD-work out of DSP/BIOS For a point by point technique see course reading!

View more...