Introduction to Introduction to Embedded Embedded
SystemsSystems
2
ObjectivesObjectives
• Introduction to embedded systemsIntroduction to embedded systems• Embedded system componentsEmbedded system components
• HardwareHardware• SoftwareSoftware
• Embedded system programmingEmbedded system programming• Hardware Description Language (HDL)Hardware Description Language (HDL)
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
3
ContentsContents
• Introduction to embedded systemsIntroduction to embedded systems• Software engineeringSoftware engineering• Computer architectureComputer architecture• Operating systemsOperating systems• Digital systemsDigital systems• Programming practiceProgramming practice• Theory for practical worksTheory for practical works
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
4
ContentsContents
• Lab: Software programming toolsLab: Software programming tools• Introduction to hardware systhesisIntroduction to hardware systhesis• Lab: External interfaceLab: External interface
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
5Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
Y. Williams Csci-339, Spring 2002 20
Wireless Communications
Hand-held GPS Units
Telematics System for Automobiles
Slide credit Y Williams, GWUSlide credit Y Williams, GWU
6Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
Y. Williams Csci-339, Spring 2002 22
Robotics Control
Spider robot – constructed with LEGO Mindstorms Components
Slide credit Y Williams, GWUSlide credit Y Williams, GWU
7
More examplesMore examples
Slide credit Y Williams, GWUSlide credit Y Williams, GWU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
Y. Williams Csci-339, Spring 2002 24
Smart Toys
8Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngumSlide credit Y Williams, GWUSlide credit Y Williams, GWU
Y. Williams Csci-339, Spring 2002 21
Cruise Missile Guidance
9Slide credit S. Kowalewski Aachen UniversitySlide credit S. Kowalewski Aachen University
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
10Slide credit P Koopman, CMUSlide credit P Koopman, CMUIntroduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
11
DefinitionDefinition
““Any sort of device which includes a Any sort of device which includes a programmable computer but itself is not programmable computer but itself is not intended to be a general-purpose intended to be a general-purpose computercomputer””
Wayne WolfWayne Wolf
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
12
DefinitionDefinition
Slide credit P Koopman, CMUSlide credit P Koopman, CMU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
13
Embedded systems overviewEmbedded systems overview Computing systems are everywhereComputing systems are everywhere Most of us think of “desktop” computersMost of us think of “desktop” computers
– PC’sPC’s– LaptopsLaptops– MainframesMainframes– ServersServers
But there’s another type of computing systemBut there’s another type of computing system– Far more common...Far more common...
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 20002000
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
14
Embedded systems overviewEmbedded systems overview Embedded computing systemsEmbedded computing systems
– Computing systems embedded Computing systems embedded within electronic deviceswithin electronic devices
– Hard to define. Nearly any Hard to define. Nearly any computing system other than a computing system other than a desktop computerdesktop computer
– Billions of units produced yearly, Billions of units produced yearly, versus millions of desktop unitsversus millions of desktop units
– Perhaps 50 per household and per Perhaps 50 per household and per automobileautomobile
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000Hardware/Software Introduction, 2000
Computers are in here...
and here...
and even here...
Lots more of these, though they cost a lot
less each.
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
15
A “short list” of embedded A “short list” of embedded systemssystems
And the list goes on and onAnd the list goes on and onSlide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Anti-lock brakesAuto-focus camerasAutomatic teller machinesAutomatic toll systemsAutomatic transmissionAvionic systemsBattery chargersCamcordersCell phonesCell-phone base stationsCordless phonesCruise controlCurbside check-in systemsDigital camerasDisk drivesElectronic card readersElectronic instrumentsElectronic toys/gamesFactory controlFax machinesFingerprint identifiersHome security systemsLife-support systemsMedical testing systems
ModemsMPEG decodersNetwork cardsNetwork switches/routersOn-board navigationPagersPhotocopiersPoint-of-sale systemsPortable video gamesPrintersSatellite phonesScannersSmart ovens/dishwashersSpeech recognizersStereo systemsTeleconferencing systemsTelevisionsTemperature controllersTheft tracking systemsTV set-top boxesVCR’s, DVD playersVideo game consolesVideo phonesWashers and dryers
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
16
How many do we use?How many do we use? Average middle-class American home has 40 to 50 Average middle-class American home has 40 to 50
embedded processors in it embedded processors in it – Microwave, washer, dryer, dishwasher, TV, VCR, Microwave, washer, dryer, dishwasher, TV, VCR,
stereo, hair dryer, coffee maker, remote control, stereo, hair dryer, coffee maker, remote control, humidifier, heater, toys, etc. humidifier, heater, toys, etc.
Luxury cars have over 60 embedded processorsLuxury cars have over 60 embedded processors– Brakes, steering, windows, locks, ignition, dashboard Brakes, steering, windows, locks, ignition, dashboard
displays, transmission, mirrors, etc. displays, transmission, mirrors, etc. Personal computers have over 10 embedded Personal computers have over 10 embedded
processors processors – Graphics accelerator, mouse, keyboard, hard-drive, CD-Graphics accelerator, mouse, keyboard, hard-drive, CD-
ROM, bus interface, network card, etc. ROM, bus interface, network card, etc. - Mike Schulte- Mike Schulte
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
17
Embedded Systems =Embedded Systems = ระบบระบบฝังตัวฝังตัว คิดถึงคอมพวิเตอร์ พซีี เรานึกถึง คิดถึงคอมพวิเตอร์ พซีี เรานึกถึง
– ProcessorProcessor, , Clock speedClock speed, , ROM/RAMROM/RAM พูดถึงเครื่องใชไ้ฟฟา้ทัว่ไป เรานึกถึง พูดถึงเครื่องใชไ้ฟฟา้ทัว่ไป เรานึกถึง
ทีวีทีวี - - ขนาดจอขนาดจอ, , เทคโนโลยกีารฉายภาพเทคโนโลยกีารฉายภาพ เครื่องซกัผ้า เครื่องซกัผ้า - - ขนาดความจุขนาดความจุ, , ระบบซกัระบบซกั
แอร ์แอร์ - - BTUBTU ลักษณะการติดตัง้ลักษณะการติดตัง้ โทรศัพท์มื่อถือ โทรศัพท์มื่อถือ - - จอ กล้อง ฟงัก์ชัน่ จอ กล้อง ฟงัก์ชัน่
รถยนต์ รถยนต์ - - ขนาดเครื่องยนต์ สมรรถนะ ขนาดเครื่องยนต์ สมรรถนะ
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
18
Types of Embedded SystemsTypes of Embedded Systems
Slide credit P Koopman, CMUSlide credit P Koopman, CMU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
19
Types of Embedded SystemsTypes of Embedded Systems
Slide credit S. Kowalewski Aachen UniversitySlide credit S. Kowalewski Aachen University
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
20
Typical Embedded SystemsTypical Embedded Systems
Are designed to observed (through sensors) Are designed to observed (through sensors) and control something (through actuators)and control something (through actuators)E.g. air condition senses room temperature and E.g. air condition senses room temperature and
maintains it at set temperature via thermostat.maintains it at set temperature via thermostat.
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
21
Embedded System Block DiagramEmbedded System Block Diagram
Slide credit Y Williams, GWUSlide credit Y Williams, GWU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
Processor
mem
Observe(Input)
Control(Output) Motor/Light
TemperatureSensor
System B
us
22
ProcessorsProcessors
Microprocessors for PCsMicroprocessors for PCs Embedded processors or Microcontrollers Embedded processors or Microcontrollers
for embedded systemsfor embedded systems– Often with lower clock speeds Often with lower clock speeds – Integrated with memory and Integrated with memory and – I/O devices e.g. A/D D/A PWM CANI/O devices e.g. A/D D/A PWM CAN– Higher environmental specsHigher environmental specs
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
23
Microcontrollers dominates processor marketMicrocontrollers dominates processor market
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
24
There are so many microcontrollers in the There are so many microcontrollers in the worldworld
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
25
Types of Embedded ProcessorsTypes of Embedded Processors Computational micros (32- or 64-bit datapaths)Computational micros (32- or 64-bit datapaths)
– CPU of workstations, PCs, or high-end portable devices (PDAs)CPU of workstations, PCs, or high-end portable devices (PDAs)– x86, PA-RISC, PowerPC, SPARC, etc. x86, PA-RISC, PowerPC, SPARC, etc.
Embedded general purpose micros (32-bit datapaths)Embedded general purpose micros (32-bit datapaths)– Designed for a wide range of embedded applicationsDesigned for a wide range of embedded applications– Often scaled-down version of computational microsOften scaled-down version of computational micros– ARM, PowerPC, MIPS, x86, 68K, etc. ARM, PowerPC, MIPS, x86, 68K, etc.
Microcontrollers (4-, 8-, or 16-bit datapaths)Microcontrollers (4-, 8-, or 16-bit datapaths)– Integrate processing unit, memory, I/O buses, and peripheralsIntegrate processing unit, memory, I/O buses, and peripherals– Often low-cost, high-volume devicesOften low-cost, high-volume devices
Domain-specific processors (datapath size varies greatly)Domain-specific processors (datapath size varies greatly)– Designed for a particular application domainDesigned for a particular application domain– Digital signal processors, multimedia processors, graphics Digital signal processors, multimedia processors, graphics
processors, network processors, security processors, etc. processors, network processors, security processors, etc. Slide credit - Mike SchulteSlide credit - Mike Schulte
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
26
Processor Sales DataProcessor Sales Data
Slide credit - Mike SchulteSlide credit - Mike Schulte
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
27
Processor MarketProcessor Market 2001 processor market by volume:2001 processor market by volume:
– Computational micros: 2%Computational micros: 2%– Embedded general-purpose micros: 11%Embedded general-purpose micros: 11%– DSPs: 10%DSPs: 10%– Microcontrollers: 80%Microcontrollers: 80%
2001 processor market by revenue:2001 processor market by revenue:– Computational micros: 51%Computational micros: 51%– Embedded general-purpose micros: 8%Embedded general-purpose micros: 8%– DSPs: 13%DSPs: 13%– Microcontrollers: 28%Microcontrollers: 28%
Higher growth expected for embedded micros, DSPs, and Higher growth expected for embedded micros, DSPs, and microcontrollersmicrocontrollers
Slide credit - Mike SchulteSlide credit - Mike Schulte
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
28
Growing DemandGrowing Demand
Embedded Embedded processors account processors account for for – Over 97% of total Over 97% of total
processors soldprocessors sold– Over 60% of total Over 60% of total
sales from processors sales from processors Sales expected to Sales expected to
increase by roughly increase by roughly 15% each year15% each year
Slide credit - Mike SchulteSlide credit - Mike Schulte
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
29
Moore’s LawMoore’s Law
Slide credit – W FornaciariSlide credit – W Fornaciari
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
30
Number of Transistors on ChipsNumber of Transistors on Chips
Slide credit – T GivargisSlide credit – T Givargis
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
31
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
Graphical illustration of Moore’s law
1981 1984 1987 1990 1993 1996 1999 2002
Leading edgechip in 1981
10,000transistors
Leading edgechip in 2002
150,000,000transistors
32
Some common characteristics of embedded Some common characteristics of embedded systemssystems
Single-functionedSingle-functioned– Executes a single program, repeatedlyExecutes a single program, repeatedly
Tightly-constrainedTightly-constrained– Low cost, low power, small, fast, etc.Low cost, low power, small, fast, etc.
Reactive and real-timeReactive and real-time– Continually reacts to changes in the system’s Continually reacts to changes in the system’s
environmentenvironment– Must compute certain results in real-time Must compute certain results in real-time
without delaywithout delaySlide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
33
Characteristics of Embedded SystemsCharacteristics of Embedded Systems Application-specific functionality – specialized for one or one Application-specific functionality – specialized for one or one
class of applicationsclass of applications Deadline constrained operation – system may have to perform Deadline constrained operation – system may have to perform
its function(s) within specific time periods to achieve successful its function(s) within specific time periods to achieve successful resultsresults
Resource challenged – systems typically are configured with a Resource challenged – systems typically are configured with a modest set of resources to meet the performance objectivesmodest set of resources to meet the performance objectives
Power efficient – many systems are battery-powered and must Power efficient – many systems are battery-powered and must conserve power to maximize the usable life of the system.conserve power to maximize the usable life of the system.
Form factor – many systems are light weight and low volume to Form factor – many systems are light weight and low volume to be used as components in host systemsbe used as components in host systems
Manufacturable – usually small and inexpensive to manufacture Manufacturable – usually small and inexpensive to manufacture based on the size and low complexity of the hardware.based on the size and low complexity of the hardware.
Slide credit Y William, GWUSlide credit Y William, GWU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
34
Design with focus on ApplicationDesign with focus on Application
Slide credit – P Koopman, CMUSlide credit – P Koopman, CMU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
35
Design ConstraintsDesign Constraints
Slide credit – P Koopman, CMUSlide credit – P Koopman, CMU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
36
Design ChallengesDesign Challenges Does it really work?Does it really work?
– Is the specification correct?Is the specification correct?– Does the implementation meet the spec?Does the implementation meet the spec?– How do we test for real-time characteristics?How do we test for real-time characteristics?– How do we test on real data?How do we test on real data?
How do we work on the system?How do we work on the system?– Observability, controllability?Observability, controllability?– What is our development platform?What is our development platform?
Slide credit – P Koopman, CMUSlide credit – P Koopman, CMU
More importantly – optimising design More importantly – optimising design metrics!!metrics!!
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
37
Design MetricsDesign Metrics• Common metricsCommon metrics
• Unit cost: Unit cost: the monetary cost of manufacturing each copy of the monetary cost of manufacturing each copy of the system, excluding NRE costthe system, excluding NRE cost
• NRE cost (Non-Recurring Engineering cost): NRE cost (Non-Recurring Engineering cost): The one-time monetary cost of designing the systemThe one-time monetary cost of designing the system
• Size: Size: the physical space required by the systemthe physical space required by the system
• Performance: Performance: the execution time or throughput of the systemthe execution time or throughput of the system
• Power: Power: the amount of power consumed by the systemthe amount of power consumed by the system
• Flexibility: Flexibility: the ability to change the functionality of the the ability to change the functionality of the system without incurring heavy NRE costsystem without incurring heavy NRE cost
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software IntroductionSlide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
38
Design MetricsDesign Metrics
• Common metrics (continued)Common metrics (continued)• Time-to-prototype: Time-to-prototype: the time needed to build a working the time needed to build a working
version of the systemversion of the system
• Time-to-market: Time-to-market: the time required to develop a system to the time required to develop a system to the point that it can be released and sold to customersthe point that it can be released and sold to customers
• Maintainability: Maintainability: the ability to modify the system after its the ability to modify the system after its initial releaseinitial release
• Correctness, safety, many moreCorrectness, safety, many more
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software IntroductionSlide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
39
Trade-off in Design MetricsTrade-off in Design Metrics Expertise with both Expertise with both
software and hardwaresoftware and hardware is needed to optimize is needed to optimize design metricsdesign metrics– Not just a hardware or Not just a hardware or
software expert, as is software expert, as is commoncommon
– A designer must be A designer must be comfortable with various comfortable with various technologies in order to technologies in order to choose the best for a given choose the best for a given application and constraintsapplication and constraints
Slide credit Vahid/Givargis, Embedded Systems Design: Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software IntroductionA Unified Hardware/Software Introduction
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
SizePerformance
Power
NRE cost
40
Time-to-market: a demanding design Time-to-market: a demanding design metricmetric
Time required to develop Time required to develop a product to the point it a product to the point it can be sold to customerscan be sold to customers
Market windowMarket window– Period during which the Period during which the
product would have highest product would have highest salessales
Average time-to-market Average time-to-market constraint is about 8 constraint is about 8 monthsmonths
Delays can be costlyDelays can be costlySlide credit Vahid/Givargis, Embedded Systems Design: A Slide credit Vahid/Givargis, Embedded Systems Design: A
Unified Hardware/Software IntroductionUnified Hardware/Software Introduction
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
Rev
enue
s ($)
Time (months)
41
Losses due to delayed market Losses due to delayed market entryentry
Simplified revenue modelSimplified revenue model– Product life = 2W, peak at WProduct life = 2W, peak at W– Time of market entry defines Time of market entry defines
a triangle, representing a triangle, representing market penetrationmarket penetration
– Triangle area equals revenueTriangle area equals revenue Loss Loss
– The difference between the The difference between the on-time and delayed triangle on-time and delayed triangle areasareas
Slide credit Vahid/Givargis, Embedded Systems Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Design: A Unified Hardware/Software IntroductionIntroduction
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
On-time Delayedentry entry
Peak revenue
Peak revenue from delayed entry
Market rise Market fall
W 2W
Time
D
On-time
Delayed
Rev
enue
s ($)
42
Other Design ConsiderationsOther Design Considerations DependabilityDependability
– Reliability: probability of system working Reliability: probability of system working correctly provided that it worked at time t=0correctly provided that it worked at time t=0
– Maintainability: probability of system working Maintainability: probability of system working correctly d time units after error occurred. correctly d time units after error occurred. [[Some systems require no maintenance Some systems require no maintenance throughout their operating lives (e.g. electric throughout their operating lives (e.g. electric kettles, computer keyboards), while some may kettles, computer keyboards), while some may need it such as mobile phones and airplane need it such as mobile phones and airplane flight control (software upgrade)flight control (software upgrade)]]
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
43
Other Design ConsiderationsOther Design Considerations
DependabilityDependability– Availability: probability of system working at Availability: probability of system working at
time ttime t– SafetySafety– Security: in communicationSecurity: in communication
Basically, cBasically, critical applications have to operate ritical applications have to operate correctly at all time e.g. airplane flight control correctly at all time e.g. airplane flight control computer. This includes both computer. This includes both hardware and hardware and softwaresoftware aspects. aspects.
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
44
Example of System FaultExample of System Fault
Slide credit B. PahamiSlide credit B. Pahami
45
Other Design ConsiderationsOther Design Considerations
OOperating environmentperating environmentSome engine Electronic Control Units (ECUs) in Some engine Electronic Control Units (ECUs) in
cars are located under the bonnets. So they have cars are located under the bonnets. So they have to work at high temperature, as well as dusty to work at high temperature, as well as dusty and wet environment.and wet environment.
EMI (Electromagnetic Interference)EMI (Electromagnetic Interference)
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
46
Real-Time ConsiderationReal-Time Consideration
Correct operation of real-time systems Correct operation of real-time systems means:means:– Working correctly (functionally correct)Working correctly (functionally correct)– Producing outputs Producing outputs in timein time!!
i.e. correct result at the right timei.e. correct result at the right time
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
47
Hard Real-timeHard Real-time System designed to meet all deadlinesSystem designed to meet all deadlines A missed deadline is a design flawA missed deadline is a design flaw For examples: ABS brake, nuclear reactor For examples: ABS brake, nuclear reactor
monitoring systemmonitoring system System hardware (over) designed for worst-System hardware (over) designed for worst-
case performancecase performance System software rigorously testedSystem software rigorously tested Formal proofs used to guarantee timing Formal proofs used to guarantee timing
correctnesscorrectnessSlide credit – T GivargisSlide credit – T Givargis
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
48
Firm Real-timeFirm Real-time System designed to meet all deadlines, but System designed to meet all deadlines, but
occasional missed deadline is allowedoccasional missed deadline is allowed– Sometimes statistically quantified (e.g. 5% Sometimes statistically quantified (e.g. 5%
misses)misses) For examples: multimedia systemsFor examples: multimedia systems System hardware designed for average case System hardware designed for average case
performanceperformance System software tested under average System software tested under average
(ideal) conditions(ideal) conditionsSlide credit – T GivargisSlide credit – T Givargis
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
49
Soft Real-timeSoft Real-time System designed to meet as many deadlines System designed to meet as many deadlines
as possibleas possible– Best effort to complete within specified time, Best effort to complete within specified time,
but may be latebut may be late For examples: network switch or routerFor examples: network switch or router System hardware designed for average case System hardware designed for average case
performanceperformance System software tested under averaged System software tested under averaged
(ideal) conditions(ideal) conditionsSlide credit – T GivargisSlide credit – T Givargis
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
50Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
Deadlines• Deadline: maximum time before
a task must complete
• The profit associated with execution of a taskis after the deadline:– Hard deadline: negative– Firm deadline: 0 (either make
it or just don’t do it)– Soft deadline: decreasing
with time
timed
task
profit d
time
soft
firm
hardSlide taken from J.J Lukkien
Real-time Systems DeadlinesReal-time Systems Deadlines
51
Levels of System DesignLevels of System Design
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
requirements
specification
architecture
componentdesign
systemintegration
52
Traditional Embedded System Traditional Embedded System Design ApproachDesign Approach
Decide on the hardwareDecide on the hardware Give the chip to the software people.Give the chip to the software people. Software programmer must make software Software programmer must make software
‘fit’ on the chip and only use that ‘fit’ on the chip and only use that hardware’s capabilities.hardware’s capabilities.
Slide credit - Slide credit - W. McUmberW. McUmber,,MSUMSU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
53
Problems with Increased ComplexityProblems with Increased Complexity
Systems are becoming more and more Systems are becoming more and more complex.complex.
Harder to think about total design.Harder to think about total design. Harder to fix ‘bugs.’Harder to fix ‘bugs.’ Harder to maintain systems over time.Harder to maintain systems over time. Therefore, the traditional development Therefore, the traditional development
process has to change,process has to change,Slide credit - Slide credit - W. McUmberW. McUmber,,MSUMSU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
54
Design with Time ConstraintDesign with Time Constraint
In embedded electronics, the total design cycle In embedded electronics, the total design cycle must decrease.must decrease.
Historically, design for automotive electronic Historically, design for automotive electronic systems takes 3-5 years to develop.systems takes 3-5 years to develop.
Must be reduced to a 1-3 year development cycle.Must be reduced to a 1-3 year development cycle. Must still be reliable and safe.Must still be reliable and safe.B. Wilkie, R. Frank and J. Suchyta - Motorola Semiconductor Products Sectors, ‘Silicon or Software: The B. Wilkie, R. Frank and J. Suchyta - Motorola Semiconductor Products Sectors, ‘Silicon or Software: The
Foundation of Automotive Electronics’, IEEE Vehicular Tech., August 95.Foundation of Automotive Electronics’, IEEE Vehicular Tech., August 95.
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
55
Possible Ways to DoPossible Ways to Do
Need to keep design process abstract for a Need to keep design process abstract for a longer period of time.longer period of time.
Decomposable hierarchy (object-oriented).Decomposable hierarchy (object-oriented). Reuse previous designs:Reuse previous designs:
– When a design changes, reuse similar sections.When a design changes, reuse similar sections.– Don’t throw away last year’s design and start from Don’t throw away last year’s design and start from
scratch!scratch! Automated verification systems.Automated verification systems.Slide credit - Slide credit - W. McUmberW. McUmber,,MSUMSU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
56
Levels of Embedded System DesignLevels of Embedded System Design
Slide credit – Ingo SanderSlide credit – Ingo Sander
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
57
Design AbstractionDesign Abstraction
Slide credit – Ingo SanderSlide credit – Ingo Sander
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
58
Abstraction LevelsAbstraction Levels
Slide credit – Ingo SanderSlide credit – Ingo Sander
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
59
Abstraction LevelsAbstraction Levels
Slide credit – Ingo SanderSlide credit – Ingo Sander
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
60
Abstraction LevelsAbstraction Levels
Slide credit – Ingo SanderSlide credit – Ingo Sander
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
61
Abstraction LevelAbstraction Level
Slide credit – Ingo SanderSlide credit – Ingo Sander
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
62
Hardware vs SoftwareHardware vs Software
Many functions can be done by Many functions can be done by softwaresoftware on on a general purpose microprocessor a general purpose microprocessor OROR by by hardwarehardware on an application specific ICs on an application specific ICs (ASICs)(ASICs)
For examples: game console graphic, For examples: game console graphic, PWM, PID controlPWM, PID control
Leads to Hardware/Software Co-design Leads to Hardware/Software Co-design conceptconcept
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
63
Hardware or Software?Hardware or Software? Where to place functionality?Where to place functionality?
– ex: A Sort algorithmex: A Sort algorithm» Faster in hardware, but more expensive. Faster in hardware, but more expensive. » More flexible in software but slower.More flexible in software but slower.» Other examples?Other examples?
Must be able to explore these various trade-offs:Must be able to explore these various trade-offs:– Cost.Cost.– Speed.Speed.– Reliability.Reliability.– Form (size, weight, and power constraints.)Form (size, weight, and power constraints.)
Slide credit - Slide credit - W. McUmberW. McUmber,, MSU MSU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
64
Hardware vs SoftwareHardware vs Software
Slide credit - Slide credit - Mike SchulteMike Schulte
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
EmbeddedApplication-Specific
Processors
EmbeddedDomain-Specific
Processors
General-Purpose Processors
FFT ProcessorsMPEG ProcessorsFIR Processors
Graphics ProcessorsDSP ProcessorsNetwork Processors
WorkstationsPersonal Computers
Pow
er/P
erfo
rman
ce
Programmability and Flexibility
65
Hardware vs SoftwareHardware vs Software
Slide credit – Ingo SanderSlide credit – Ingo Sander
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
66
Microcessor technologyMicrocessor technology
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
Processors vary in their customization for the problem at handProcessors vary in their customization for the problem at handtotal = 0for i = 1 to N loop total += M[i]end loop
General-purpose processor
Single-purpose processor
Application-specific processor
Desired functionality
67
General-purpose processorsGeneral-purpose processors
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
Programmable device used in a variety of Programmable device used in a variety of applicationsapplications– Also known as “microprocessor”Also known as “microprocessor”
FeaturesFeatures– Program memoryProgram memory– General datapath with large register file and General datapath with large register file and
general ALUgeneral ALU User benefitsUser benefits
– Low time-to-market and NRE costsLow time-to-market and NRE costs– High flexibilityHigh flexibility
““Pentium” the most well-known, but Pentium” the most well-known, but there are hundreds of othersthere are hundreds of others
IR PC
Registerfile
GeneralALU
DatapathController
Program memory
Assembly code for:
total = 0 for i =1 to …
Control logic and
State register
Datamemory
68
Single-purpose processorsSingle-purpose processors
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
Digital circuit designed to execute exactly Digital circuit designed to execute exactly one programone program– a.k.a. coprocessor, accelerator or peripherala.k.a. coprocessor, accelerator or peripheral
FeaturesFeatures– Contains only the components needed to Contains only the components needed to
execute a single programexecute a single program– No program memoryNo program memory
BenefitsBenefits– FastFast– Low powerLow power– Small sizeSmall size
DatapathController
Control logic
State register
Datamemory
index
total
+
69
Application-specific processorsApplication-specific processors
Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000Slide credit Vahid/Givargis, Embedded Systems Design: A Unified Hardware/Software Introduction, 2000
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
Programmable processor optimized for a Programmable processor optimized for a particular class of applications having particular class of applications having common characteristicscommon characteristics– Compromise between general-purpose and Compromise between general-purpose and
single-purpose processorssingle-purpose processors FeaturesFeatures
– Program memoryProgram memory– Optimized datapathOptimized datapath– Special functional unitsSpecial functional units
BenefitsBenefits– Some flexibility, good performance, size and Some flexibility, good performance, size and
powerpower DSPDSP จดัอยูใ่นประเภทน้ีด้วยจดัอยูใ่นประเภทน้ีด้วย
IR PC
Registers
CustomALU
DatapathController
Program memory
Assembly code for:
total = 0 for i =1 to …
Control logic and
State register
Datamemory
70
FPGA ArchitectureFPGA Architecture
FPGA layout with Configurable Logic Blocks (CLB) and I/O Blocks (IOB) FPGA layout with Configurable Logic Blocks (CLB) and I/O Blocks (IOB) (credit: Katz’s Contemporary Logic Design)(credit: Katz’s Contemporary Logic Design)
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
IOB IOB IOB IOB
CLB CLB
CLB CLB
IOB
IOB
IOB
IOB
Wiring Channels
Typical CLB (credit: www.wikipedia.com)
Programmable switch at wiring intersection (credit: www.wikipedia.com)
71
Highly constrained products tend to use Highly constrained products tend to use application specific processorsapplication specific processors– Many mobile phones (power&size constrained) Many mobile phones (power&size constrained)
contain ARM chipscontain ARM chips– Hi-Fi (high performance&time constrained) Hi-Fi (high performance&time constrained)
contain DSP chipscontain DSP chips
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
72
Software CostsSoftware Costs
Slide credit – P Koopman, CMUSlide credit – P Koopman, CMU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
73
Disciplines Used in Embedded System Disciplines Used in Embedded System DesignDesign
Slide credit – R Gupta, UC IrvineSlide credit – R Gupta, UC Irvine
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
74
Trends in Embedded SystemsTrends in Embedded Systems
Slide credit – R Gupta, UC IrvineSlide credit – R Gupta, UC Irvine
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
75
Future Embedded SystemsFuture Embedded Systems
Slide credit – P Koopman, CMUSlide credit – P Koopman, CMU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
76
Future Embedded SystemsFuture Embedded Systems
Slide credit – P Koopman, CMUSlide credit – P Koopman, CMU
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
77
Future Embedded SystemsFuture Embedded Systems
Slide credit – P Koopman, CMUSlide credit – P Koopman, CMUIntroduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
78
Observations on Future Embedded Observations on Future Embedded SystemsSystems
More complexity (people expect more More complexity (people expect more functions and higher performance from functions and higher performance from their electronic products)their electronic products)
This leads to more complex softwareThis leads to more complex software Which requires better design processWhich requires better design process More importantly, thorough testing for More importantly, thorough testing for
safety critical systems (diagnostics codes of safety critical systems (diagnostics codes of engine ECUs is half of its total software engine ECUs is half of its total software codes)codes)
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum
79
Research in Embedded SystemsResearch in Embedded Systems• Hardware – to improve performance (sensors and Hardware – to improve performance (sensors and
actuators), verification, etc.actuators), verification, etc.• Software – reusability, testing, verification, OS, etc.Software – reusability, testing, verification, OS, etc.• Network – higher connectivity between systems (e.g. Network – higher connectivity between systems (e.g.
smart homes link many systems together, standardised smart homes link many systems together, standardised protocols, etc.protocols, etc.
• Security – protection against attacksSecurity – protection against attacks• Design – improved methodology, more automation, Design – improved methodology, more automation,
formal verificationformal verification
Introduction to Embedded SystemsIntroduction to Embedded Systems Setha Pan-ngum Setha Pan-ngum