Embedded Systems Software 2014

21
3/30/2014 1 Embedded systems software Cursul IV-ESA

Transcript of Embedded Systems Software 2014

Page 1: Embedded Systems Software 2014

3/30/2014 1

Embedded systems software

Cursul IV-ESA

Page 2: Embedded Systems Software 2014

3/30/2014 2

Software Unit includes:

•Operating system •Real Time & Embedded

•Application Software •The embedded system should run for years without manual intervention; •Designers are continuously trying to put more computing power in smaller housings, using cheaper CPUs, with on-board digital and/or analog IO

Presenter
Presentation Notes
The Operating System must be: Real Time (RTOS) Embedded Real-time and embedded operating systems are in most respects similar to general purpose operating systems: they manage the interface between application programs and the system hardware. What is a real-time operating system? A real-time operating system is able to execute all of its tasks without violating specified timing constraints. Real-time computing systems are systems in which it is possible to predict and control when different computations are handled. Some caracteristics of RTOS: •Predictably fast response to urgent events. •High degree of schedulability: The timing requirements of the system must be satisfied at high degrees of resource usage. •Stability under transient overload: When the system is overloaded by events and it is impossible to meet all the deadlines, the deadlines of selected critical tasks must still be guaranteed. The basic responsibilities of an RTOS are: (i) scheduling, (ii) interrupt servicing, (iii) inter-process communication and synchronization, (iv) memory management, and (v) task management. What is an embedded operating system? Embedded systems are being installed in tremendous quantities (an order of magnitude more than desktop PCs!): they control lots of functions in modern cars; they show up in household appliances and toys; they control vital medical instrumentation; they make remote controls and GPS (Global Position Systems) work; etc. The most important features of an embedded OS are: Small footprint. Designers are continously trying to put more computing power in smaller housings, using cheaper CPUs, with on-board digital and/or analog IO; and they want to integrate these CPUs in all kinds of small objects. A small embedded OS also often uses only a couple of kilobytes of RAM and ROM memory. The embedded system should run for years without manual intervention. This means that the hardware and the software should never fail. Hence, the system should preferably have no mechanical parts, such as floppy drives or hard disks. Not only because mechanical parts are more sensitive to failures, but they also take up more space, need more energy, take longer to ommunicate with, and have more complex software drivers (e.g., due to motion control of the mechanical parts).
Page 3: Embedded Systems Software 2014

3/30/2014 3

Embedded Software – Introduction

The importance of software is increasing dramatically in nearly all sectors of industry;

In automotive industry a rapidly increasing number of innovations are based on electronics and software to enhance the safety of the vehicles, to improve the comfort of the passengers and to reduce the fuel consumption and emissions;

In modern upper-class and luxury cars (25-30)% of the cost is on electronics and software and is estimated to increase to up to 40% in the next 10 years

Software has a substantial influence on the quality of products as well as the productivity of a company

Page 4: Embedded Systems Software 2014

3/30/2014 4

The embedded software of the system is stored in any kind of non-volatile memory: ROM, flash cards, hard disk or CD-ROM, and downloaded via a network or satellite

The embedded software is compiled for a particular target processor, the processing unit (requires a certain amount of RAM to operate)

The processing unit can only process digital signals and handles all inputs and outputs of signals through a dedicated layer

The embedded systems interacts with the plants and possibly other embedded systems through specific interfaces;

Embedded systems may draw power from a general source or have their own dedicated power supply (batteries)

Embedded Software – Introduction

Page 5: Embedded Systems Software 2014

3/30/2014 5

Designed Real-Time Software Involves several steps: Software architecture definition; Co-Design (software functionality to hardware

modules); Defining Software Subsystems (determine

and groups the features); Feature Design (defines the software

features); Task design (select the task type and the

state machine design).

Page 6: Embedded Systems Software 2014

3/30/2014 6

Software architecture

First stage of real-time software design; Review the proposed hardware

architecture and develops a basic software architecture;

Use cases to analyze the system

Page 7: Embedded Systems Software 2014

3/30/2014 7

Co-design Once the software architecture has been defined, the

hardware and software teams should work together to associate software functionality to hardware modules;

The software handling is partitioned between different processors and other hardware resources with the following key consideration: The software functionality should be partitioned. This

involves simulating the system with the proposed hardware & software architecture;

The system should be designed scalable architecture. System capacity can be increased by adding new hardware modules;

Software modules that interact very closely with each other should be placed on the same processor to reduce delays

Page 8: Embedded Systems Software 2014

3/30/2014 8

Defining Software Subsystems Determine all the features that the system

needs to support; Groups the various features based on the type

of work they perform. Identify various subsystems in function of types of features;

Identify the tasks that will implement the software features;

Classify and group the features appropriately & associate the various tasks.

Page 9: Embedded Systems Software 2014

3/30/2014 9

Feature design Defines the software features in terms of message

interactions between tasks (detailed specification of message interfaces);

A typical real-time system is composed of various tasks entities distributed across different processors;

Steps: Specify the message interactions between different tasks; Identify the tasks that would be controlling the feature

(achieved by running timers); The message interfaces are defined in detail.

Page 10: Embedded Systems Software 2014

3/30/2014 10

Task Design Required all the interfaces that the task

needs to support to be defined; Verified that all the message parameters

and timers values have been finalized; Selecting the task type (single or multiple

state machine); Selecting the state machine design

Page 11: Embedded Systems Software 2014

3/30/2014 11

Multi -Target Modelling for Embedded Software Development forAutomotive Applications

Multi-target modeling provides a basis for software development for multiple targets.

A multi-target model is a model which is independent of data type (a hardware-independent model);

Multiple target source code can be generated from a single model.

This capability allows a single model to be used to generate code for multiple target hardware architectures.

The advantage is faster and lower cost implementation by "re-using" the control algorithms or models.

A target-specific code can be auto-generated with an appropriate target data dictionary

Page 12: Embedded Systems Software 2014

3/30/2014 12

Figure shows a single generic model with two different target data dictionaries;

One of the advantages of using a data dictionary is to have a generic model with different data dictionary files;

Automatic code can be generating for both floating-point and fixed-point code from the target specific models;

No additional operations are required to pass from/to floating-point to fixed-point;

To change attributes for a data item can also use a GUI

Page 13: Embedded Systems Software 2014

3/30/2014 13

Testing embedded software Testing constitutes the most important analysis

technique, besides reviews and inspections; Testing is a process centered around the goal of

finding defects in the system (debugging and acceptance reasons);

Testing is an essential element in system development: it helps to improve the quality of the system;

When testing embedded software, not only the software has to be considered but also the close connection to the hardware components, the frequently severe timing constraints and real-time requirements, and other performance-related aspects

Page 14: Embedded Systems Software 2014

3/30/2014 14

Developing and testing embedded systems-examples

Minimizing energy consumption of Hydrogen Generators using an embedded controller (25 % reduce energy consumption and lower CO2 emissions)

Designing control schemes for a next-generation washing machine (Whirlpool developed an advanced algorithms and models the behavior of a washing machine with MATLAB & Simulink)

Delivering a compliance test system using MATLAB on an Tektronix Oscilloscope

Developing, designing and debugging TI DSP Software for a 30 kW Electrodynamics Power Generator Controller

Auto-calibrating Embedded algorithms on automotive production ECUs

Page 15: Embedded Systems Software 2014

3/30/2014 15

Creating Automotive Embedded Software using a general-purpose prototyping Electronic

Controller Unit (ECU): develop embedded software for automotive transmission, driver entertainment and body systems. Design an algorithm in Simulink and Stateflow,

modeling the I/O using Simulink blocks from the Embedded Target (for Motorola MPC555);

After validation the algorithm in simulation use real-time workshop to automatically generate C code

Download the code over CAN bus into RAM or flash memory on the target ECU

Page 16: Embedded Systems Software 2014

3/30/2014 16

Verify, debug, visualize and validate Embedded Software on TI-DSP

Real-time bidirectional data transfer links among MATLAB, the Texas Instruments (TI) software development environment, and TI DSP hardware;

Support high speed transfer data between MATLAB and embedded application in real time without stopping the hardware target;

Running hardware-in-the-loop or Processor-in-the loop simulations

Page 17: Embedded Systems Software 2014

3/30/2014 17

Working with the Link for Code Composer Studio Development Tools

The Link for Code Composer Studio enables you to visualize, test, debug, and verify your embedded software application on a TI DSP at an algorithmic level and at a system level.

In particular, you can: Analyze and debug your code Perform real-time analysis and instrumentation

with Real Time Data exchange between DSP and emulators

Run hardware-in-the-loop or processor-in the-loop simulations

Page 18: Embedded Systems Software 2014

3/30/2014 18

Analyzing and Debugging Code The Link for Code Composer Studio:

provides methods for automatically controlling, testing, and debugging Code Composer Studio applications using MATLAB.

It enables you to perform register and memory exchange for programming and debugging control.

For example, you can transfer data from memory locations in Code Composer Studio to the MATLAB workspace to:

Create plots Calculate statistics Fit curves to data Perform signal processing operations to analyze and visualize your data

You can then transfer data into Code Composer Studio and run your algorithm on the processor.

The Link for Code Composer Studio lets you automate or activate the link.

Page 19: Embedded Systems Software 2014

3/30/2014 19

Running hardware-in-the-loop or Processor-in-the loop simulations

MATLAB and the Link for Code Composer Studio let you compare the output of the embedded application directly against your original MATLAB specification in real time or by using the same test inputs that you used during system design.

As a result, it is possible to identify and rectify discrepancies between the original design and the final implementation.

You can then implement your design by using the Embedded Target for TI C6000™ DSP and the Embedded Target for TI C2000™ DSP (each available separately) with the Link for Code Composer Studio

Page 20: Embedded Systems Software 2014

3/30/2014 20

The Embedded Target for TI C2000™ DSP Integrates MATLAB and Simulink with Texas Instruments eXpress DSP

tools and C2000 DSP processors. Together, these products let you perform automatic code generation,

prototyping, and embedded system deployment on TI C2000 processors. you can develop and validate control designs and digital signal

processing algorithms from concept through code. By using the Embedded Target for TI C2000 DSP and your TI

development tools together with Real-Time Workshop and Real-Time Workshop Embedded Coder (both available separately), you can generate a real-time C language real-time implementation of your Simulink model.

The Embedded Target for TI C2000 DSP supports Texas Instruments (TI) C281x and C280x 32-bit fixed-point DSPs and C240x 16-bit fixed-point DSPs.

You can automatically compile, link, download, and execute the generated code on the F2808 eZdsp, F2812 eZdsp, or the F2407 eZdsp evaluation boards.

Onboard DSP peripherals are directly supported. The generated code is readable and editable.

Page 21: Embedded Systems Software 2014

3/30/2014 21

The MathWorks in the Automotive Industry The Automotive Industry uses MathWorks products

throughout their design, development, analysis, calibration and test processes;

MATLAB & Simulink are used to explore and analyze ideas, model and simulate systems, rapidly prototype concepts in the vehicle and automatically generate code for deployment to production hardware;

The MathWorks tools are used to design and test intelligent vehicle systems, including power train systems, chassis and safety controls, comfort and convenience systems and driver systems.