You are on page 1of 44

Design of Embedded Systems

UNIT I EMBEDDED DESIGN LIFE CYCLE

Product specification – Hardware / Software partitioning – Detailed


hardware and software design – Integration – Product testing – Selection
Processes – Microprocessor Vs Micro Controller – Performance tools –
Bench marking – RTOS Micro Controller – Performance tools – Bench
marking – RTOS availability – Tool chain availability – Other issues in
selection processes.
A “short” list of Embedded Systems
 Auto focus cameras Network cards
 ATMs  Pagers
 Avionic systems  PDAs
 Automatic transmission  Photocopiers
 Battery Chargers  Portable Video games
 Camcorders  Pont of Sales terminals
 Cell phones  Printers
 Cordless Phones  Scanners
 Digital Cameras  Satellite phones
 DVD players  Teleconferencing
 Electronic Toys/Games systems
 Fax machines  Televisions

 Medical Equipment  Set-top boxes

 Microwave ovens  VCR’s

 Modems  Video phones


and many more ….  Washers and dryers
Embedded systems from real life
Mobile Phones and Base Stations
 Multiprocessor
 8-bit/32-bit for UI; DSP for signals

 32-bit in IR port; 32-bit in Bluetooth

 8-100 MB of memory
 All custom chips

 Massive signal processing


 Several processing tasks per connected
call
 Based on DSPs
 Standard or custom
 100s of processors
Embedded systems from real life
Sewing Machine
 User interface
 Embroidery patterns
 Touch-screen control
 ”Smart”
 Sets pressure of foot depending
on task
 Raise foot when stopped
 New functions added by
upgrading the software
Embedded systems from real life
 Multiple  Multiple networks
Cars processors  Body, engine,
 Up to 100
telematics, media,
 Networked
safety
together
 Functions by embedded
 Large diversity in processor processing:
types:  ABS: Anti-lock braking

 8-bit – door locks, lights, etc. systems


 16-bit – most functions  ESP: Electronic stability

 32-bit – engine control, control


airbags  Airbags

 Efficient automatic
gearboxes
 Theft prevention with smart

keys
 Blind-angle alert systems
Embedded systems from real life
Smart Beer Glass Capacitive
sensor for fluid
level
8-bit, 8-pin
PIC processor
Contact less
transmission Inductive coil for
of power and RF ID activation &
readings power
CPU and reading coil in the
table. Reports the level of
fluid in the glass, alerts
servers when close to empty
Embedded systems from real life
Extremely Large
 Functions requiring
computers:
 Radar
 Weapons
 Damage control
 Navigation
 basically everything
 Computers:
 Large servers
 1000s of processors
Embedded systems from real life
Inside Your PC
 Custom processors
 Graphics, sound
 32-bit processors
 IR, Bluetooth
 Network, WLAN
 Harddisk
 RAID controllers
 8-bit processors
 USB
 Keyboard, mouse
Characteristics of Embedded Systems (1)

 Must be dependable,
• Reliability R(t) = probability of system working correctly
provided that is was working at t=0
• Maintainability M(d) = probability of system working
correctly d time units after error occurred.
• Availability A(t): probability of system working at time t
• Safety: no harm to be caused
• Security: confidential and authentic communication
Even perfectly designed systems can fail if the assumptions
about the workload and possible errors turn out to be wrong.
Making the system dependable must not be an after-thought,
it must be considered from the very beginning
Characteristics of Embedded Systems (2)
 Must be efficient
 Energy efficient
 Code-size efficient
(especially for systems on a chip)
 Run-time efficient
 Weight efficient
 Cost efficient
 Dedicated towards a certain application
Knowledge about behavior at design time can be used
to minimize resources and to maximize robustness
 Dedicated user interface
(no mouse, keyboard and screen)
 Hybrid systems (analog + digital parts).
Characteristics of Embedded Systems (3)
 Many ES must meet real-time constraints
 A real-time system must react to stimuli from the
controlled object (or the operator) within the time interval
dictated by the environment.
 For real-time systems, right answers arriving too late are
wrong.
 „A real-time constraint is called hard, if not meeting
that constraint could result in a catastrophe“
[Kopetz, 1997].
 All other time-constraints are called soft.
 A guaranteed system response has to be explained
without statistical arguments
 Frequently connected to physical environment
through sensors and actuators,
Characteristics of Embedded Systems (4)
 Typically, ES are reactive systems:
„A reactive system is one which is in continual
interaction with is environment and executes at a
pace determined by that environment“ [Bergé, 1995]
Behavior depends on input and current state.
 automata model appropriate,
model of computable functions inappropriate.

Not every ES has all of the above characteristics.


Def.: Information processing systems having most
of the above characteristics are called embedded
systems.
Why Embedded Systems Are
Different?
 Embedded systems are dedicated to specific
tasks, whereas PCs are generic computing
platforms.
 Embedded systems are supported by a wide
array of processors and processor architectures.
 Embedded systems are usually cost sensitive.
 Embedded systems have real-time constraints.
Why Embedded Systems Are
Different?
 If an embedded system is using an operating
system at all, it is most likely using a real-time
operating system (RTOS), rather than
Windows 9X, Windows NT, Windows 2000,
Unix, Solaris, or HP- UX.
 The implications of software failure are much
more severe in embedded systems than in
desktop systems.
 Embedded systems often have power
constraints.
 Embedded systems often must operate under
extreme environmental conditions.
Why Embedded Systems Are
Different?
 Embedded systems have far fewer system
resources than desktop systems.
 Embedded systems often store all their
object code in ROM.
 Embedded systems require specialized
tools and methods to be efficiently
designed.
 Embedded microprocessors often have
dedicated debugging circuitry.
An embedded system example -- a
digital camera
Digital camera chip
CCD

CCD preprocessor Pixel coprocessor D2A


A2D

lens

JPEG codec Microcontroller Multiplier/Accum

DMA controller Display ctrl

Memory controller ISA bus interface UART LCD ctrl

 Single-functioned -- always a digital camera


 Tightly-constrained -- Low cost, low power, small, fast
 Reactive and real-time -- only to a small extent
Embedded System – A simplified view

output analog

input analog
CPU

mem
embedded
computer
Computer (programmable part) is surrounded by other
sub-systems, sensors and actuators.

The computer is called the micro-controller.

Its main functions are to monitor the physical


parameters of the surrounding systems and to control
these processes whenever needed. In some cases the
CPU is a DSP.
Typical Embedded System

Source : Embedded System Design Issues, Philip J. Koopman, ICCD96


The Embedded Design Life Cycle

Phase 7 : Maintenance and Upgrade


Phase 5 : HW / SW Integration
Phase 1 : Product Specification

Phase 2 : HW / SW Partitioning
Cost to fix bugs

Phase 6 : Acceptance testing


Phase 3 : Iteration
Phase 4 : Detailed
HW / SW Design
System HW & SW Development / System
Specification Debug Test
Hardware Design
and Design
37% 51% 12%

Software Design Product Release


Source : Embedded Systems Design,
Arnold S. Berger
Tool-based view of the development cycle
Product Specification

 A common factor for the successful products


was that the design team (senior
management, marketing, sales, quality
assurance, and Engineering) shared a
common vision of the product they were
designing
 In-circuit emulators
Hardware/Software Partitioning
 Partitioning decision- to decide which portion of
the problem will be solved in hardware and which
in software
 It is possible to implement that algorithm purely
in software (the CPU without the FPU example),
purely in hardware (the dedicated modem chip
example), or in some combination of the two (the
video card example).
Laser Printer Design Algorithm

Data enters the printer and must be transformed into a legible ensemble of carbon
dots fused to a piece of paper

Concurrently, the processor services the data port and converts the incoming
data stream into a stream of modulation and control signals to a laser tube,
rotating mirror, rotating drum, and assorted paper-management “stuff.”
Iteration and Implementation
 This phase represents the early design work
before the hardware and software teams build “the
wall” between them
 The hardware designers might be using simulation
tools, such as architectural simulators, to model
the performance of the processor and memory
systems.
 The software designers are probably running code
benchmarks on self-contained, single-board
computers that use the target micro processor.
Hardware/Software Integration

 Big Endian/Little Endian Problem


Debugging an embedded or real-time
system
 Run control — The ability to start, stop, peak,
and poke the processor and memory.
 Memory substitution — Replacing ROM-
based memory with RAM for rapid and easy
code download, debug, and repair cycles.
 Real-time analysis — Following code flow in
real time with real-time trace analysis.
Product Testing and Release

 Testing is more than making sure the


software doesn’t crash at a critical moment
Maintaining and Upgrading Existing
Products
 The majority of embedded system designers
(around 60 percent) maintain and upgrade
existing products, rather than design new
products.
The Selection Process
The Selection Process

 Is it available in a suitable implementation?


 Is it capable of sufficient performance?
 Is it supported by a suitable operating
system?
 Is it supported by appropriate and adequate
tools?
Packaging the Silicon
Microprocessor versus Microcontroller
 Most embedded systems use microcontrollers instead of microprocessors
Microprocessor versus Microcontroller
 In a microprocessor-based system, the CPU and the various I/O
functions are packaged as separate ICs

 In a microcontroller-based system many, if not all, of the I/O


functions are integrated into the same package with the CPU

 The advantages of the microcontroller’s higher level of integration


are easy to see:
 Lower cost — One part replaces many parts.

 More reliable — Fewer packages, fewer interconnects.

 Better performance — System components are optimized for


their environment.
 Faster — Signals can stay on the chip.

 Lower RF signature — Fast signals don’t radiate from a large


PC board
Adequate Performance
Performance-Measuring Tools
 The Dhrystone benchmark is a simple C program that compiles to
about 2,000 lines of assembly code and is independent of operating
system services
Meaningful Benchmarking
 Real benchmarking involves carefully
balancing system requirements and variables
 it’s important to analyze the real-time
behavior of the processor
 Real-time performance can be generally
categorized into two buckets: interrupt
handling and task switching.
EEMBC
 The EEMBC benchmark consists of industry-specific tests
EEMBC
 EEMBC technical committee represent real-
world algorithms against which the processor
can be measured
 produces statistics on the number of times per
second the algorithm executes and the size of
the compiled code
RTOS Availability
RTOS Availability
Tool Chain Availability
 When evaluating the tool chain, integrated
coverage of these three broad categories:
 Compiler tools
 Hardware and software debugging tools
 Performance measuring tools
Compilers
 In-line assembly
 Interrupt function
 Assembly language list file generation
 Standard libraries
 Startup code
 RTOS support
 Tools integration
 Optimizations
 Support for Embedded C++ (EC++)
Hardware and Software Debugging
Tools
 An ICE
 An interface to on-chip hardware debugging
resources
 A ROM emulator
 A logic analyzer
 A performance analyzer
Other Issues in the Selection Process

 A prior commitment to a processor family


 A prior restriction on language
 Time-to-market factors
Summary
 Definition of Embedded Systems
 Real Life Examples
 ES Product Life Cycle in Design
 Hardware / Software partitioning
 Product testing
 Selection Processes – Microprocessor Vs Micro
Controller
 Performance tools – Bench marking
 RTOS Micro Controller
 Other issues in selection processes.

You might also like