40
SOFTWARE ASPECTS OF EMBEDDED SYSTEMS

ESD SoftwarepowerPoint Presentation

Embed Size (px)

DESCRIPTION

design metrics

Citation preview

Software aspects of Embedded Systems

Software aspects of Embedded Systems

Software for embedding in System ROM Image Final stage software also called ROM image** (Just as an image is a unique sequence and arrangement of pixels, embedded software is also a unique placement and arrangement at each ROM address of bytes for instructions and data. )

Final machine software Bytes at each address defined for creating the ROM image. By changing this image, the same hardware platform work differently and can be used for entirely different applications or for new upgrades of the same system

Distinct ROM image in a distinct Embedded System Hardware elements between the distinct systems can be identical but it is the software that makes a system unique and distinct from the other.Compressed Codes and DataROM image may alternatively be compressed software (for example, the zip format) and data (for example, the pictures in jpg format) along with the software required for decompression algorithm

Machine Language Coding Programmer defines the addresses and the corresponding bytes or bits at each address.

Used in configuring some specific physical device or subsystem like transceiver, the machine code-based coding is used

Assembly Language Coding Needed for Invoking Processor Specific Instructions Requires understanding of the processor and instruction set.

A program or a small specific part coded in the assembly language using an Assembler (software used for developing codes in assembly).

Three steps when using assembly language

'Assembler',

'Linker' and

'Locator' before finally burned at the ROM

ASSEMBLY TO ROM IMAGE

Programming language C or C++ or Visual C++ or Java .

Program various layers processor commands, main function, task functions and library functions, interrupt service routines and kernel (scheduler).

Compiler

Generates an object file. Using linker and locator, the file for ROM image is created for the targeted hardware. C++ and Java are other languages used for software coding.

Program ModelsSequential Programming Model Object Oriented Programming Model Control and Data flow graphs or Synchronous Data Flow (SDF) Graph or Multi Thread Graph (MTG) Model Finite State Machine for data path Multithreaded Model Concurrent Processing of processes or thread or tasks

Device drivers, Device manager, Software tools DevicesIn an embedded system, there are number of physical devices.Physical devices keypad, LCD display or touch screen, memory stick (flash memory), wireless networking device, parallel port and networkcard

Devices In an embedded system, there are number of virtual devices. Virtual devices pipe, file, RAM disk, socket Device Driver A device driver is software for controlling (configuring), receiving and sending a byte or a stream of bytes from or to a device.

Device Drivers A set of generic functions, such as create ( ), open ( ), connect ( ), listen ( ), accept ( ), read ( ), write ( ), close ( ), delete ( ) for use by high level programmers

Each generic function calls a specific software (interrupt service routine), which controls a device function or device input or output

Device controls and functions by 1. Calling an ISR (also called Interrupt Handler Routine) on hardware or software interrupt 2. Placing appropriate bits at the control register or word. 3. Setting status flag(s) in the status register for interrupting, therefore running (driving) the ISR, Resetting the status flag after interrupt service

Device Manager for the devices and driversDevice Management software (usually a part of the OS) provide codes for detecting the presence of devices, for initializing (configuring) these and for testing the devices that are present. Also includes software for allocating and registering port(s) or device codes and data at memory addresses for the various devices at distinctly different addresses, including codes for detecting any collision between the allocated addresses , if any

Development Tools1. Editor, 2. Interpreter, 3. Compiler, 4. Assembler and Cross Assembler, IDE, 5. Prototyper

Application Software Development Tools Source Code Engineering Tools Stethoscope (tracks the switching from one task to another as a function of time, stores beats) Trace Scope (traces changes in a parameter(s) as a function of time

SimulatorA Simulator... To simulate the target processor and hardware elements on a host PC and to run and test the executable module Project Manager To manage the files that associates with a design stage project and keep several versions of the source file(s) in an orderly fashion.

DESIGN PROCESSES AND DESIGN METRIC FOR EMBEDDED-SYSTEM DESIGN AbstractionEach problem component first abstracted. For example, Display picture and text as an abstract class.Robotic system problem abstraction in terms of control of motors in different degrees of freedoms.

Hardware and Software architectureAssumed to consists multiple layers Each architectural layer be well understood before a design

Extra functional PropertiesExtra functionalities required in the system being developed be well understood from the design

System Related Family designs

Families of related systems developed earlier taken into consideration during designing Modular DesignDecomposition of software into modules that are to be implemented. Modules should be such that they can be composed (coupled or integrated) later. Effective Modular design should ensure effective (i) function independence, (ii) cohesion and (iii) coupling

ModulesBe clearly understood and maintain continuity. Appropriate protection strategies are necessary for each module.

A module is not permitted to change or modify another module functionality.

For example, protection from a device driver modifying the configuration of another device

MappingMapping into various representations done considering the software requirements. For example, data flow in the same path during the program flow can be mapped together as a single entityTransform and transaction mappingFor example, an image is input data to a system; it can have a different number of pixels and colors of each pixel. The system has to store or process each pixel and color Transform mapping of image is done by appropriate compression and storage algorithms. Transaction mapping is done to define the sequence of the images

User Interfaces DesignDesigned as per user requirements, analysis of the environment and system functions. For example, in an ACVM, the user interface is a LCD matrix display. It can display a welcome message as well as specify the coins needed to be inserted into the machine for each type of chocolate. Same ACVM may be designed with touch screen GUI. Same ACVM may be designed with VUIs. A GUI or VUI or user interface or LCD matrix display

Interface design validation Customer validation For example, the customer must validate messages language, screen logo, screen icons and background color, wall paper, menus and dialogs before an interface design can proceed to the implementation stage

RefinementsEach component and module design needs to be refined iteratively till it becomes the most appropriate for implementation by the software team

Design MetricsPower Dissipation Performance Process Deadlines User Interfaces Size Engineering cost Manufacturing costFlexibility Prototype development Time Time-to-market System and User safety Maintenance

Abstraction of Design Process StepsA design process bottom-to-top design if it builds starting from the components. A design process top-to-down design if it first starts with abstraction of the process and then after abstraction the details are created. Top-to-down design approach is most favoured approach

Software Design Cycle

Five levels of abstraction from top level to bottom level in the design processRequirements

Specifications

Architecture

Components

System Integration

RequirementsComplete clarity of required purpose, inputs, outputs, functioning, design metrics and Validation requirements for finally developed systems specifications. Consistency in the requirements

SpecificationsClear specifications of Customer expectations from the product. Needs specifications for hardware, for example, peripherals, devices processor and memory specifications data types and processing specifications

Needed specificationsExpected system behavior specifications, constraints of design, expected life cycle specifications of the product. Process specifications analysed by making lists of inputs on events list, outputs on events, processes activated on each event.

Architecturedata flow graphs program models software architecture layers and hardware architecture interfaces design system integration

Software architectural layersHow the different elements data structures, databases, algorithms, control functions, state transition functions, process, data and program flow are to be organized What shall be design of data structures and databases that would be most appropriate for the given problem? Whether data organised as a tree-like structure will be appropriate? What will be the design of the components in the data?

Hardware ComponentsProcessor, ASIP and single purpose processors in the system Memory RAM, ROM or internal and external flash or secondary memory in the system Peripherals and devices internal and external to the system Ports and buses in the system Power source or battery in the system