Download as pdf or txt
Download as pdf or txt
You are on page 1of 115

INTRODUCTION TO EMBEDDED SYSTEM

1
CONTENT:
 Introduction to embedded system with examples.
 Characteristics of embedded system.

 Design metrics-challenges in embedded system


design.
 embedded design life cycle.

2
EXAMPLES IN YOUR DAILY LIFE

• …wake up …

• …have breakfast …

3
EXAMPLES IN YOUR DAILY LIFE
CONT….

• …get into your car …

• A latest model car can have as many as 65+


processors for Engine control, Transmission
Control, A/C control, Cruise control, ABS, Audio,
etc
• More than 30% of the cost of a car is now in
electronics
• 90% of all innovations will be based on
4
electronic systems
EXAMPLES IN YOUR DAILY LIFE
CONT….

• …on our way to office…

5
EXAMPLES IN YOUR DAILY LIFE
CONT….

• …in our office…

6
EXAMPLES IN YOUR DAILY LIFE
CONT….

• …back at home…

7
MORE EXAMPLES

Mission critical controls


• Nuclear plant control, aircraft navigation ,military
equipment
• Medical equipment
• Communication
• Toy, etc

8
PARTS IN A TYPICAL EMBEDDED SYSTEMS

FPGA/ Software Memory


ASIC

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

 A way of working, organizing or performing


one or many tasks according to a fixed set of
rules, program or plan.

 Example
 Time display system – A watch
 Automatic cloth washing system – A washing
machine 18
WHAT IS AN EMBEDDED SYSTEM?

 “Anembedded system is a system that has


software embedded into computer-hardware,
which makes a system dedicated for an
application (s) or specific part of an application
or product or part of a larger system.”

19
WHAT IS AN EMBEDDED SYSTEM?

 An Embedded system is computing system


other than a desktop computers- Frank
Vahid/Tony
 An embedded system is the one that has
computer hardware with software embedded in
it as one of its most important component.
 It is any device that includes a programmable
computer but is not itself intended to be a
general purpose computer-Wayne Wolf
20
WHAT IS AN EMBEDDED SYSTEM?....
 Embedded System are electronics systems
that contain a Microprocessor,
Micro Controller, but we don’t think of
them as computer. The computer is
hidden in the system- Todd D.Mortan
 An embedded system is a System whose
principle function is not computational,
but which is controlled by computer
embedded with in it. – Tim Wilmshurst
21
Some of the main characteristics:
 Dedicated (not general purpose)
 Contains a programmable component
 Interacts (continuously) with the environment

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

 Sophisticated Embedded System

29
SMALL SCALE EMBEDDED SYSTEM

 Processor - 8 or 16 bit micro controller


 Hardware complexity – Little

 Software complexity – Little

 Power – Battery operated

 Programming tools – Editor, assembler, cross


compiler , C programming
 Example
 Telephone with memory
 Smart Cards
 Spectrum Analyzer

30
MEDIUM SCALE EMBEDDED SYSTEM
 Processor - 16 0r 32 bit micro controller , DSP ,RISC
 Hardware complexity – More

 Software complexity – More

 Programming tools – RTOS ,Source code Engineering


Tools, Simulator, Debugger, IDE, Assembler
 ASIC – readily available ASSP and IP for various
functions (TCP/IP Protocol Stacking and network
connection functions
 Example

 Video game, Music System


 Target Tracker
 Computer Networking systems 31
SOPHISTICATED EMBEDDED SYSTEM
 Processor - Scalable processors, configuration
processors, programmable logic arrays
 Hardware complexity – High

 Software complexity – High

 Software functions are implemented in hardware


to speed up
 Programming tools – May not be available
 Compilers or retargetable compilers need to be developed.
 Example
 Mobile smart Phone
 High speed networks

32
CHARACTERISTICS OF A EMBEDDED
SYSTEM

33
 Single Functioned
 Time constraints

 Tightly Constraint

 Real Time & Reactive

 Complex Algorithms

 User Interface

 Multirate

 Manufacturing Cost

 Power

34
SINGLE FUNCTIONED

An Embedded System usually executes a specific


functions repeatedly
Eg.
pager
Exceptions
Cell phones
Several programs are swapped in & out due to size
limitation

35
TIME CONSTRAINTS:

 Embedded systems have to perform in real-time:


if data is not ready by a certain deadline, the
system fails to perform correctly.
- Hard deadline: failure to meet leads to
major hazards.
- Soft deadline: failure to meet can be
tolerated but quality of service is reduced.

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

 Many Embedded Systems must continually react


to changes in the systems environment and must
compute certain results in real time without
delay

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

 Amount of memory required

 Type Of I/O

44
POWER
 Power consumption affects
 Battery life
 Heat Consumption

45
AN EMBEDDED SYSTEM EXAMPLE -- A
DIGITAL CAMERA

Digital camera chip

46
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
DESIGN CHALLENGES
DESIGN CHALLENGE – OPTIMIZING DESIGN
METRICS

 Obvious design goal:

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,

excluding NRE cost


 Size:
 The physical space required by the system.
 Software - Bytes

 Hardware – gates and transistors

 Performance:
 The execution time or throughput of the system
DESIGN CHALLENGE – OPTIMIZING DESIGN
METRICS
 Common metrics (continued)

Power: The amount of power consumed by the system

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

DMA controller Display ctrl


choose the best for a given
Hardwar
application
e and constraints
Memory controller ISA bus interface UART LCD ctrl

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 ($)

 Period during which


the product would have
highest sales
Time (months)
 Average time-to-
market constraint is
about 8 months
 Delays can be costly
LOSSES DUE TO DELAYED MARKET ENTRY

Simplified revenue model

53

Peak revenue
 Product life = 2W, peak at
Peak revenue from W
delayed entry
Revenues ($)

On-time  Time of market entry


Market rise Market fall defines a triangle,
Delayed representing market
penetration
 Triangle area equals
revenue
D W 2W
On-time Delayed Time
entry entry  Loss
 The difference between the
on-time and delayed
triangle areas
LOSSES DUE TO DELAYED MARKET ENTRY
(CONT.)  Area = 1/2 * base * height
 On-time = 1/2 * 2W * W
 Delayed = 1/2 * (W-D+W)*(W-

54
Peak revenue D)
Peak revenue from  Percentage revenue loss =
delayed entry
(D(3W-D)/2W2)*100%
Revenues ($)

On-time

Market rise Market fall  Try some examples


Delayed

– Lifetime 2W=52 wks, delay D=4


D W 2W
wks
On-time Delayed Time
– (4*(3*26 –4)/2*26^2) = 22%
entry entry – Lifetime 2W=52 wks, delay D=10
wks
– (10*(3*26 –10)/2*26^2) = 50%
– Delays are costly!
NRE AND UNIT COST METRICS
 Costs:
Unit cost: the monetary cost of manufacturing each copy of the

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

 Compare technologies by costs -- best depends on


quantity
Technology A: NRE=$2,000, unit=$100

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)

• But, must also consider time-to-market


THE PERFORMANCE DESIGN METRIC
 Widely-used measure of system, widely-abused
 Clock frequency, instructions per second – not good measures
 Digital camera example – a user cares about how fast it processes
images, not clock speed or instructions per second

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

 Short time to market

 Safety critical systems

 In order to achieve all these requirements,


systems have to be highly optimized.
 Both hardware and software aspects have to be
considered simultaneously!

58
 How much hardware do we need ?
 How do we meet deadlines ?

 How do we minimize power consumption?

 How do we design for upgradeability?

 Does it really works?

 How does the nature of ES make their design more


difficult?
 Does it optimize the design metrics?

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?

 Excessive power consumption increases heat


dissipation

62
HOW DOES THE NATURE OF ES
MAKE THEIR DESIGN MORE
DIFFICULT?

 Limited Observation
 Complex Testing

 Limited Development Environment

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

 Most of the design metrics are heavily constrained


in Embedded System
 Time to Market design metric

 NRE Cost & Unit Cost

 Performance design Metric

65
TIME TO MARKET DESIGN METRIC

 Introducing an embedded system to the market place


early can make a big difference in the system
profitability ,since market window for products are
becoming very short ,with such windows are often
measured in months

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

400 # of units 2400


Technology Optimum volume
A Low volume (1 – 400)
B Medium(400 – 2400)
C High Volume(Above 2400)

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

 Speed Up is a common method of comparing the


performance of two systems.

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?

 How do we work on the system?


 Observability, controllability?
 What is our development platform?
DESIGN METHODOLOGIES

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.

 Other requirements (physical size, etc.)


EMBEDDED DESIGN LIFE CYCLE
LEVELS OF ABSTRACTION

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.

 May include functional and non-functional


elements.
 May be executable or may be in mathematical
form for proofs.
GPS SPECIFICATION

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

 Partitioning of the design into its software and hardware


components

 Iteration and refinement of the partitioning

 Independent hardware and software design tasks

 Integration of the hardware and software components

 Product testing and release


105
 On-going maintenance and upgrading
MOBILE PHONE - DESIGN

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

Communication with PC’s serial PORT


 ISA Bus Interface

Enables with faster connection with PC’s ISA Bus

114
 LCD Control & Display Control
Controls the display on the camera LCD Display
 Multiplier/Accumulator

Performs a particular frequently executed compution


faster than the µc could

115

You might also like