Introduction to
Embedded Systems
Objectives
• Introduction to embedded systems
• Embedded system components
• Hardware
• Software
• Embedded system programming
Introduction to Embedded Systems Setha Pan-ngum 2
Contents
• Introduction to embedded systems
• Software engineering
• Computer architecture
• Operating systems
• Digital systems
• Programming practice
• Theory for practical works
Introduction to Embedded Systems Setha Pan-ngum 3
Wireless Communications
Telematics System for Automobiles
Hand-held GPS Units
Y. Williams Csci-339, Spring 2002 20
Slide credit Y Williams, GWU
Introduction to Embedded Systems Setha Pan-ngum 4
Robotics Control
Spider robot – constructed with LEGO Mindstorms Components
Y. Williams Csci-339, Spring 2002 22
Slide credit Y Williams, GWU
Introduction to Embedded Systems Setha Pan-ngum 5
More examples
Smart Toys
Y. Williams Csci-339, Spring 2002 24
Slide credit Y Williams, GWU
Introduction to Embedded Systems Setha Pan-ngum 6
Cruise Missile Guidance
Y. Williams Csci-339, Spring 2002 21
Slide credit Y Williams, GWU
Introduction to Embedded Systems Setha Pan-ngum 7
Slide credit S. Kowalewski Aachen University
Introduction to Embedded Systems Setha Pan-ngum 8
Slide credit P Koopman, CMU
Introduction to Embedded Systems Setha Pan-ngum 9
Definition
• “Any sort of device which includes a
programmable computer but itself is not
intended to be a general-purpose
computer”
– Wayne Wolf
Introduction to Embedded Systems Setha Pan-ngum 10
Definition
Slide credit P Koopman, CMU
Introduction to Embedded Systems Setha Pan-ngum 11
Embedded systems overview
• Computing systems are everywhere
• Most of us think of “desktop” computers
– PC’s
– Laptops
– Mainframes
– Servers
• But there’s another type of computing system
– Far more common...
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded Systems Setha Pan-ngum 12
Embedded systems overview
• Embedded computing systems
Computers are in here...
– Computing systems embedded
and here...
within electronic devices
– Hard to define. Nearly any and even here...
computing system other than a
desktop computer
– Billions of units produced yearly,
versus millions of desktop units
– Perhaps 50 per household and per
automobile Lots more of these,
though they cost a lot
less each.
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified
Hardware/Software Introduction, 2000
Introduction to Embedded Systems Setha Pan-ngum 13
A “short list” of embedded systems
Anti-lock brakes Modems
Auto-focus cameras MPEG decoders
Automatic teller machines Network cards
Automatic toll systems Network switches/routers
Automatic transmission On-board navigation
Avionic systems Pagers
Battery chargers Photocopiers
Camcorders Point-of-sale systems
Cell phones Portable video games
Cell-phone base stations Printers
Cordless phones Satellite phones
Cruise control Scanners
Curbside check-in systems Smart ovens/dishwashers
Digital cameras Speech recognizers
Disk drives Stereo systems
Electronic card readers Teleconferencing systems
Electronic instruments Televisions
Electronic toys/games Temperature controllers
Factory control Theft tracking systems
Fax machines TV set-top boxes
Fingerprint identifiers VCR’s, DVD players
Home security systems Video game consoles
Life-support systems Video phones
Medical testing systems Washers and dryers
And the list goes on and on
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded Systems Setha Pan-ngum 14
How many do we use?
• Average middle-class American home has 40 to
50 embedded processors in it
– Microwave, washer, dryer, dishwasher, TV, VCR,
stereo, hair dryer, coffee maker, remote control,
humidifier, heater, toys, etc.
• Luxury cars have over 60 embedded processors
– Brakes, steering, windows, locks, ignition, dashboard
displays, transmission, mirrors, etc.
• Personal computers have over 10 embedded
processors
– Graphics accelerator, mouse, keyboard, hard-drive,
CD-ROM, bus interface, network card, etc.
- Mike Schulte
Introduction to Embedded Systems Setha Pan-ngum 15
Types of Embedded Systems
Slide credit P Koopman, CMU
Introduction to Embedded Systems Setha Pan-ngum 16
Types of Embedded Systems
Slide credit S. Kowalewski Aachen University
Introduction to Embedded Systems Setha Pan-ngum 17
Typical Embedded Systems
• Are designed to observed (through sensors)
and control something (through actuators)
E.g. air condition senses room temperature and
maintains it at set temperature via thermostat.
Introduction to Embedded Systems Setha Pan-ngum 18
Embedded System Block Diagram
Control
(Output) Motor/Light
System Bus
Observe Temperature
Processor (Input) Sensor
mem
Slide credit Y Williams, GWU
Introduction to Embedded Systems Setha Pan-ngum 19
Processors
• Microprocessors for PCs
• Embedded processors or Microcontrollers for
embedded systems
– Often with lower clock speeds
– Integrated with memory and
– I/O devices e.g. A/D D/A PWM CAN
– Higher environmental specs
Introduction to Embedded Systems Setha Pan-ngum 20
Microcontrollers dominates processor market
Introduction to Embedded Systems Setha Pan-ngum 21
There are so many microcontrollers in the world
Introduction to Embedded Systems Setha Pan-ngum 22
Types of Embedded Processors
• Computational micros (32- or 64-bit datapaths)
– CPU of workstations, PCs, or high-end portable devices (PDAs)
– x86, PA-RISC, PowerPC, SPARC, etc.
• Embedded general purpose micros (32-bit datapaths)
– Designed for a wide range of embedded applications
– Often scaled-down version of computational micros
– ARM, PowerPC, MIPS, x86, 68K, etc.
• Microcontrollers (4-, 8-, or 16-bit datapaths)
– Integrate processing unit, memory, I/O buses, and peripherals
– Often low-cost, high-volume devices
• Domain-specific processors (datapath size varies greatly)
– Designed for a particular application domain
– Digital signal processors, multimedia processors, graphics
processors, network processors, security processors, etc.
Slide credit - Mike Schulte
Introduction to Embedded Systems Setha Pan-ngum 23
Processor Sales Data
Slide credit - Mike Schulte
Introduction to Embedded Systems Setha Pan-ngum 24
Processor Market
• 2001 processor market by volume:
– Computational micros: 2%
– Embedded general-purpose micros: 11%
– DSPs: 10%
– Microcontrollers: 80%
• 2001 processor market by revenue:
– Computational micros: 51%
– Embedded general-purpose micros: 8%
– DSPs: 13%
– Microcontrollers: 28%
• Higher growth expected for embedded micros, DSPs, and
microcontrollers
Slide credit - Mike Schulte
Introduction to Embedded Systems Setha Pan-ngum 25
Growing Demand
• Embedded
processors account
for
– Over 97% of total
processors sold
– Over 60% of total
sales from processors
• Sales expected to
increase by roughly
15% each year
Slide credit - Mike Schulte
Introduction to Embedded Systems Setha Pan-ngum 26
Moore’s Law
Slide credit – W Fornaciari
Introduction to Embedded Systems Setha Pan-ngum 27
Number of Transistors on Chips
Slide credit – T Givargis
Introduction to Embedded Systems Setha Pan-ngum 28
Graphical illustration of Moore’s law
1981 1984 1987 1990 1993 1996 1999 2002
10,000 150,000,000
transistors transistors
Leading edge Leading edge
chip in 1981 chip in 2002
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded Systems Setha Pan-ngum 29
Some common characteristics of embedded
systems
• Single-functioned
– Executes a single program, repeatedly
• Tightly-constrained
– Low cost, low power, small, fast, etc.
• Reactive and real-time
– Continually reacts to changes in the system’s
environment
– Must compute certain results in real-time
without delay
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded Systems Setha Pan-ngum 30
Characteristics of Embedded Systems
• Application-specific functionality – specialized for one or one
class of applications
• Deadline constrained operation – system may have to perform
its function(s) within specific time periods to achieve successful
results
• Resource challenged – systems typically are configured with a
modest set of resources to meet the performance objectives
• Power efficient – many systems are battery-powered and must
conserve power to maximize the usable life of the system.
• Form factor – many systems are light weight and low volume to
be used as components in host systems
• Manufacturable – usually small and inexpensive to manufacture
based on the size and low complexity of the hardware.
Slide credit Y William, GWU
Introduction to Embedded Systems Setha Pan-ngum 31
Design Constraints
Slide credit – P Koopman, CMU
Introduction to Embedded Systems Setha Pan-ngum 32
Hardware vs Software
• Many functions can be done by software on a
general purpose microprocessor OR by
hardware on an application specific ICs (ASICs)
• For examples: game console graphic, PWM,
PID control
• Leads to Hardware/Software Co-design
concept
Introduction to Embedded Systems Setha Pan-ngum 33
Hardware or Software?
• Where to place functionality?
– ex: A Sort algorithm
• Faster in hardware, but more expensive.
• More flexible in software but slower.
• Other examples?
• Must be able to explore these various trade-offs:
– Cost.
– Speed.
– Reliability.
– Form (size, weight, and power constraints.)
Slide credit - W. McUmber, MSU
Introduction to Embedded Systems Setha Pan-ngum 34
Hardware vs Software
Workstations
Personal Computers
Graphics Processors
Power/Performance
DSP Processors
Network Processors
FFT Processors General-Purpose
MPEG Processors Processors
FIR Processors Embedded
Domain-Specific
Processors
Embedded
Application-Specific
Processors
Programmability and Flexibility
Slide credit - Mike Schulte
Introduction to Embedded Systems Setha Pan-ngum 35
Hardware vs Software
Slide credit – Ingo Sander
Introduction to Embedded Systems Setha Pan-ngum 36
General-purpose processors
Programmable device used in a variety of
applications Controller Datapath
– Also known as “microprocessor”
Control Register
Features logic and file
State
– Program memory register
– General datapath with large register file and General
IR PC ALU
general ALU
User benefits Program Data
– Low time-to-market and NRE costs memory memory
– High flexibility Assembly code
for:
“Pentium” the most well-known, but
there are hundreds of others total = 0
for i =1 to …
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded Systems Setha Pan-ngum 37
Single-purpose processors
Digital circuit designed to execute exactly Controller Datapath
one program Control index
logic
– a.k.a. coprocessor, accelerator or peripheral
total
Features State
register +
– Contains only the components needed to
execute a single program Data
– No program memory memory
Benefits
– Fast
– Low power
– Small size
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded Systems Setha Pan-ngum 38
Application-specific processors
Programmable processor optimized for a Controller Datapath
particular class of applications having Control Registers
logic and
common characteristics State
register
– Compromise between general-purpose and Custom
ALU
single-purpose processors IR PC
Features Data
Program memory
– Program memory memory
– Optimized datapath Assembly code
– Special functional units for:
total = 0
Benefits for i =1 to …
– Some flexibility, good performance, size and
power
DSP จัดอยู่ในประเภทนี้ด้วย
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded Systems Setha Pan-ngum 39
FPGA Architecture
IOB IOB IOB IOB
IOB
CLB CLB
IOB
Wiring Channels
IOB
Programmable switch at wiring intersection
CLB CLB (credit: [Link])
IOB
FPGA layout with Configurable Logic Blocks (CLB) and I/O Blocks (IOB) (credit: Katz’s Contemporary Logic Design)
Typical CLB (credit: [Link])
Introduction to Embedded Systems Setha Pan-ngum 40
• Highly constrained products tend to use
application specific processors
– Many mobile phones (power&size constrained)
contain ARM chips
– Hi-Fi (high performance&time constrained)
contain DSP chips
Introduction to Embedded Systems Setha Pan-ngum 41