Challenges in Embedded System Design EDLC
Challenges in Embedded System Design EDLC
1
CONTENT:
Introduction to embedded system with examples.
Characteristics of embedded system.
2
EXAMPLES IN YOUR DAILY LIFE
• …wake up …
• …have breakfast …
3
EXAMPLES IN YOUR DAILY LIFE
CONT….
5
EXAMPLES IN YOUR DAILY LIFE
CONT….
6
EXAMPLES IN YOUR DAILY LIFE
CONT….
• …back at home…
7
MORE EXAMPLES
8
PARTS IN A TYPICAL EMBEDDED SYSTEMS
SENSORS A/D
Conversion CPU D/A
Conversion ACTUATORS
Auxiliary
Human Diagnostic Systems
Interface Port (Power,
Cooling)
ELECTROMECHANICAL
Backup & Safety
EXTERNAL
ENVIRONMENT 9
PERIPHERALS
Peripheral is something which is NOT part of the
computer
Peripheral is a hardware element used to perform a
defined functionality
Why?
CPU cannot do all the required functionality
Required functionality is not common for all systems
Allows to choose the best required for the system
Runs independently, but Controlled by the CPU
Master-Slave
Most common?
Timers/Counters, RTC
UART, I2C, SPI
MICROCONTROLLERS
Also called MCUs
Includes the CPU, Memories (ROM/FLASH,
RAM)
And common peripherals
GPIO, Timers, Interrupt Controller, Timers and
UART
And even more
ADC, DAC, LCD Drivers or I2C bus
Popular MCUs
8-bit: 8051, PIC, ATMEGA, Hitachi etc.
16-bit: MSP430, 80251 and DSPs
24-bit: Mostly DSPs
32-bit: Several ARM core based controllers
THAT’S HOW WE USE MICROPROCESSORS
12
13
14
15
16
17
WHAT IS A SYSTEM?
System Definition
Example
Time display system – A watch
Automatic cloth washing system – A washing
machine 18
WHAT IS AN EMBEDDED SYSTEM?
19
WHAT IS AN EMBEDDED SYSTEM?
22
23
24
MAJOR COMPONENTS OF
EMBEDDED SYSTEM
Hardware
Software
RTOS
25
HARDWARE
26
HARDWARE COMPONENTS OF AN
EMBEDDED SYSTEM
Power supply and reset Ckt
i/p device interfacing and driver ckts
o/p device interfacing and driver ckts
System application specific ckts
Processor
Timer
Interrupt controller
Program memory
Data Memory
Serial communication Port
Parallel communication Port
27
Application Software
Perform concurrently a series of task
RTOS
Defines the way the system works
Supervises the application software
Provides a mechanism to let the processor to run a process
as per scheduling (Process scheduling)
Perform Context switching between the processes
28
CLASSIFICATION OF EMBEDDED
SYSTEM
Small scale Embedded System
Medium scale embedded system
29
SMALL SCALE EMBEDDED SYSTEM
30
MEDIUM SCALE EMBEDDED SYSTEM
Processor - 16 0r 32 bit micro controller , DSP ,RISC
Hardware complexity – More
32
CHARACTERISTICS OF A EMBEDDED
SYSTEM
33
Single Functioned
Time constraints
Tightly Constraint
Complex Algorithms
User Interface
Multirate
Manufacturing Cost
Power
34
SINGLE FUNCTIONED
35
TIME CONSTRAINTS:
36
TIGHTLY CONSTRAINT
All Computing systems have constraints on
design Metrics
Embedded Systems are more tight
A design metric is a measure of an
implementation’s features .
Cost
Size
Performance
37
REALTIME & REACTIVE
Eg.
Cars Cruise controller
Missile Target System
38
MISSILE TARGET SYSTEM
39
CAR CRUISE CONTROL
40
COMPLEX ALGORITHMS
The operations
performed by
the processor
may be more
Complex
Eg.
Automobile
engine Control
Mobile Phone
41
USER INTERFACE
Microprocessor are frequently used to control
complex user interfaces that may include
multiple menus and many options
42
MULTIRATE
ES have several real time activities at the same
time.
They need to control some operations run at slow
rate and some at high rate
Eg. Optimizing Design Matrices
Multimedia
43
MANUFACTURING COST
Depends on
Processor Used
Type Of I/O
44
POWER
Power consumption affects
Battery life
Heat Consumption
45
AN EMBEDDED SYSTEM EXAMPLE -- A
DIGITAL CAMERA
46
CCD
lens
48
Construct an implementation with desired
functionality
Key design challenge:
Simultaneously optimize numerous design metrics
Design metric
A measurable feature of a system’s implementation
Optimizing design metrics is a key challenge
DESIGN CHALLENGE – OPTIMIZING DESIGN
METRICS
Common metrics
NRE cost (Non-Recurring Engineering cost):
49
The one-time monetary cost of designing the system. Once the
system is designed, any no of units can be manufactured without
incurring any additional design cost.
Unit cost:
the monetary cost of manufacturing each copy of the system,
Performance:
The execution time or throughput of the system
DESIGN CHALLENGE – OPTIMIZING DESIGN
METRICS
Common metrics (continued)
50
Flexibility:
The ability to change the functionality of the system
without incurring heavy NRE cost
Time-to-prototype:
The time needed to build a working version of the system
Time-to-market:
The time required to develop a system to the point that it
can be released and sold to customers
Maintainability:
The ability to modify the system after its initial release.
Correctness, safety
DESIGN METRIC COMPETITION --
IMPROVING ONE MAY WORSEN OTHERS
Power Expertise with both
software and
51
Performance Size
hardware is needed to
optimize design metrics
Not just a hardware or
NRE cost software expert, as is
common
CCD
Digital camera chip A designer must be
A2D
CCD
preprocessor
Pixel coprocessor D2A
comfortable with various
technologies in order to
lens
JPEG codec Microcontroller Multiplier/Accum
Software
TIME-TO-MARKET: A DEMANDING DESIGN
METRIC
Time required to
develop a product to
52
the point it can be sold
to customers
Market window
Revenues ($)
53
Peak revenue
Product life = 2W, peak at
Peak revenue from W
delayed entry
Revenues ($)
54
Peak revenue D)
Peak revenue from Percentage revenue loss =
delayed entry
(D(3W-D)/2W2)*100%
Revenues ($)
On-time
55
system, excluding NRE cost
NRE cost (Non-Recurring Engineering cost): The one-time monetary
cost of designing the system
total cost = NRE cost + unit cost * # of units
per-product cost = total cost / # of units
= (NRE cost / # of units) + unit cost
• Example
– NRE=$2000, unit=$100
– For 10 units
– total cost = $2000 + 10*$100 = $3000
– per-product cost = $2000/10 + $100 = $300
Amortizing NRE cost over the units results in
an additional $200 per unit
NRE AND UNIT COST METRICS
56
Technology B: NRE=$30,000, unit=$30
Technology C: NRE=$100,000, unit=$2
$200,000 $200
A A
B B
$160,000 $160
C C
tota l c ost (x1000)
p er p rod uc t c ost
$120,000 $120
$80,000 $80
$40,000 $40
$0 $0
0 800 1600 2400 0 800 1600 2400
Numb er of units (volume) Numb er of units (volume)
57
Latency (response time)
Time between task start and end
e.g., Camera’s A and B process images in 0.25 seconds
Throughput
Tasks per second, e.g. Camera A processes 4 images per second
Throughput can be more than latency seems to imply due to
concurrency, e.g. Camera B may process 8 images per second (by
capturing a new image while previous image is being stored).
Speed up is a common method of comparing the
performance of two systems.
Speedup of B over A = B’s performance / A’s performance
Throughput speedup = 8/4 = 2
WHY IS DESIGN OF EMBEDDED SYSTEMS
DIFFICULT?
High Complexity
Strong time and power constraints
Low cost
58
How much hardware do we need ?
How do we meet deadlines ?
59
HOW MUCH HARDWARE DO WE
NEED ?
Selection of µP ,Memory, Peripheral etc..
ES have to meet
1. Performance deadlines
2. Minimum manufacturing cost
Little hardware – fails to meet deadlines
More hardware - Makes it expensive
60
HOW DO WE MEET DEADLINES ?
Speed up the hardware results in faster
execution
Speed may be limited by Memory system
61
How do we minimize power consumption?
62
HOW DOES THE NATURE OF ES
MAKE THEIR DESIGN MORE
DIFFICULT?
Limited Observation
Complex Testing
63
DOES IT OPTIMIZE THE DESIGN METRICS?
NRE Cost
Unit Cost
Size
Performance
Flexibility
Time to prototype
Time to Market
Maintainability
Correctness
Safety
64
CONSTRAINT
65
TIME TO MARKET DESIGN METRIC
66
Reve
nues
67
Time In Months
Market window reveals during which time
a product would have highest sales
Missing this window , which means that
the product begins being sold further to
the right on the time scale can mean
significant loss in sales
Each day of delay results in million
dollars loss
Average time to market constraint – 8
Months 68
Assume Peak
Revenue at time W
Market
Market
rise
Fall
On time Delayed 2W
W 69
entry Entry
Revenue on time entry = area of bigger triangle
Revenue on delayed entry = area of smaller
triangle
% Revenue Loss =
( (Ontime – delayed)/Ontime)*100
Peak Revenue =
Rs.100
Calculate the % Revenue loss
for the following products Revenue = Rs.60
shown in the graph.
2 8 70
months months 16
months
NRE & UNIT COST METRICS
Assume Three technologies are available
for developing a product
Tech NRE Cost Unit cost
A 2000 100
B 30,000 30
C 100000 2
Total cost = NRE Cost + Unit cost*# of units
Per product cost = (NRE cost/#of Units) + Unit cost
71
TOTAL COST VS # OF UNITS
PRODUCED
A
T
o
t
B
a
l
C
C
o
s
t
72
73
More Volume Less Per product
Cost
P
e
r
p A
r
o
d
u
c C
t
c B
o
s
t
74
Number of units
PERFORMANCE DESIGN METRIC
Performance of a system is a measure of how long the
system takes to execute our desired task
Main measures of performance
Latency Time b/w start of task of task execution to end
Through put No of task that can be processed per unit
time
75
EMBEDDED DESIGN CHALLENGES
WHAT DOES “PERFORMANCE” MEAN?
8/14/2023
In general-purpose computing, performance often
means average-case, may not be well-defined.
77
In real-time systems, performance means
meeting deadlines.
Missing the deadline by even a little is bad.
Finishing ahead of the deadline may not help.
CHARACTERIZING PERFORMANCE
8/14/2023
We need to analyze the system at several levels
of abstraction to understand performance:
78
CPU.
Platform.
Program.
Task.
Multiprocessor.
CHALLENGES IN EMBEDDED SYSTEM
DESIGN
8/14/2023
How much hardware do we need?
How big is the CPU? Memory?
79
How do we meet our deadlines?
Faster hardware or cleverer software?
How do we minimize power?
Turn off unnecessary logic? Reduce memory accesses?
CHALLENGES, ETC.
8/14/2023
Does it really work?
Is the specification correct?
80
Does the implementation meet the spec?
How do we test for real-time characteristics?
How do we test on real data?
8/14/2023
A procedure for designing a system.
Understanding your methodology helps you
81
ensure you didn’t skip anything.
Compilers, software engineering tools, computer-
aided design (CAD) tools, etc., can be used to:
help automate methodology steps;
keep track of the methodology itself.
DESIGN GOALS
8/14/2023
Performance.
Overall speed, deadlines.
82
Functionality and user interface.
Manufacturing cost.
Power consumption.
8/14/2023
requirements
84
specification
architecture
component
design
system
integration
TOP-DOWN VS. BOTTOM-UP
8/14/2023
Top-down design:
start from most abstract description;
85
work to most detailed.
Bottom-up design:
work from small components to big system.
Real design uses both techniques.
STEPWISE REFINEMENT
8/14/2023
At each level of abstraction, we must:
analyze the design to determine characteristics of the
current state of the design;
86
refine the design to add detail.
REQUIREMENTS
8/14/2023
Plain language description of what the user
wants and expects to get.
87
May be developed in several ways:
talking directly to customers;
talking to marketing representatives;
providing prototypes to users for comment.
FUNCTIONAL VS. NON-FUNCTIONAL
REQUIREMENTS
8/14/2023
Functional requirements:
output as a function of input.
88
Non-functional requirements:
time required to compute output;
size, weight, etc.;
power consumption;
reliability;
etc.
OUR REQUIREMENTS FORM
8/14/2023
name
purpose
inputs • Type of data
outputs • Data character tics
• Types of IO devices
functions
performance
manufacturing cost
power
physical size/weight
89
EXAMPLE: GPS MOVING MAP
REQUIREMENTS
8/14/2023
Moving map obtains
position from GPS,
90
I-78
paints map from local
database.
Scotch Road
lat: 40 13 lon: 32 19
GPS MOVING MAP NEEDS
8/14/2023
Functionality: For automotive use. Show
major roads and landmarks.
91
User interface: At least 400 x 600 pixel
screen. Three buttons max. Pop-up menu.
Performance: Map should scroll smoothly.
Lock onto GPS within 15 seconds.
Cost: $120 street price = approx. $30 cost
of goods sold.
GPS MOVING MAP NEEDS, CONT’D.
8/14/2023
Physical size/weight: Should fit in hand.
Power consumption: Should run for 8 hours on
92
four AA batteries.
GPS MOVING MAP REQUIREMENTS FORM
8/14/2023
93
SPECIFICATION
8/14/2023
A more precise description of the system:
should not imply a particular architecture;
94
provides input to the architecture design process.
8/14/2023
Should include:
What is received from GPS;
95
map data;
user interface;
operations required to satisfy user requests;
background operations needed to keep the system
running.
ARCHITECTURE DESIGN
8/14/2023
What major components go satisfying the
specification?
96
Hardware components:
CPUs, peripherals, etc.
Software components:
major programs and their operations.
Must take into account functional and non-
functional specifications.
GPS MOVING MAP BLOCK DIAGRAM
8/14/2023
97
GPS search display
renderer
receiver engine
user
database interface
GPS MOVING MAP HARDWARE
ARCHITECTURE
8/14/2023
98
display frame CPU
buffer
GPS
receiver
memory
panel I/O
GPS MOVING MAP SOFTWARE
ARCHITECTURE
8/14/2023
99
position pixels
database
renderer
search
user
timer
interface
DESIGNING HARDWARE AND SOFTWARE
COMPONENTS
8/14/2023
Must spend time architecting the system before
you start coding.
100
Some components are ready-made, some can be
modified from existing designs, others must be
designed from scratch.
SYSTEM INTEGRATION
8/14/2023
Put together the components.
Many bugs appear only at this stage.
101
Have a plan for integrating components to
uncover bugs quickly, test as much functionality
as early as possible.
102
103
104
A PHASE REPRESENTATION OF THE
EMBEDDED DESIGN LIFE CYCLE:
Time flows from the left and proceeds through
seven phases:
Product specification
106
DESIGN OF MOBILE PHONES
S.No Parameters Customer Expectation
1. Name Hand held device
2. Functionality For communication during travel
3. Input Keypad
4. Output LCD
5. power Battery operated
6. Other features Games
Music player
Bluetooth
GPRS support
Camera support
107
BLOCK DIAGRAM
Power
Module
Antenna Microcontroller
LED Panel
Bluetooth
Keypad
108
CIRCUIT DIAGRAM (H/W)
109
AN EXAMPLE EMBEDDED SYSTEM
Digital camera
110
BLOCK DIAGRAM
111
CCD
Charge couple device
Contains an array of light senitive photocells that capture
Image
A2D
Analog images to digital
D2A
Digital images to analog
112
CCP Preprocessor
Commands CCD to read Image
JPEG Codec
Compress and decompress the image using JPEG
Compression standard
Pixel Coprocessor
For rapid Display of an image
Memory Controller
Controls access to memory chip found in camera
113
DMA controller
Enables direct memory access by other devices
while the Microcontroller is performing other functions
UART
114
LCD Control & Display Control
Controls the display on the camera LCD Display
Multiplier/Accumulator
115