You are on page 1of 40

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 Data
ROM 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 MODELS

Sequential 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
Devices
In 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 DRIVERS

Device 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 TOOLS

1. 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

SIMULATOR
A 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 EMBEDDEDSYSTEM DESIGN

Abstraction
Each 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 architecture


Assumed to consists multiple layers
Each architectural layer be well understood
before a design
Extra functional Properties
Extra 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 Design
Decomposition 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

Modules
Be 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

MAPPING

Mapping 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 entity
Transform and transaction mapping
For 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 DESIGN

Designed 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

REFINEMENTS

Each component and module design needs to


be refined iteratively till it becomes the
most appropriate for implementation by the
software team

DESIGN METRICS

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

ABSTRACTION OF DESIGN
PROCESS STEPS

A 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 PROCESS

Requirements
Specifications

Architecture

Components

System Integration

REQUIREMENTS
Complete clarity of
required purpose,

inputs,
outputs,
functioning,
design metrics and
Validation requirements for finally
developed systems specifications.
Consistency in the requirements

SPECIFICATIONS
Clear 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 SPECIFICATIONS

Expected 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.

ARCHITECTURE

data flow graphs


program models
software architecture layers and
hardware architecture
interfaces design
system integration

SOFTWARE ARCHITECTURAL
LAYERS

How 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 COMPONENTS

Processor, 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

You might also like