Hardware/Software Design
+
of Embedded Systems
Sudeep Pasricha
Colorado State University
CS/ECE 561 Fall 2010
+Copyrighted Material adapted from Peter Marwedel, Rajesh Gupta, Frank Vahid and Tony Givargis
1
Welcome to CS/ECE 561
Instructor
Sudeep Pasricha [email protected]
Office Hours: Tu/Thu: 3:30-4:30 pm (ENGR C103A)
Course Page
http://www.engr.colostate.edu/~sudeep/teaching/cs_ece_561.htm
Visit regularly for updates and announcements
Class Meets
Tu/Thu 5:30-6:45 pm in ENGR E202
2
Course Requirements
ECE 452 or equivalent Computer
Organization or Architecture course
No graduate level courses necessary
Assume knowledge of
Computer Organization
Programming in C/C++ or VHDL/Verilog
Some familiarity with Data Structures, Algorithms
3
Evaluation and Grading
Homework Assignments – 25%
Paper critiques, problems, programming, analysis
Embedded System Project – 35%
FinalPresentation (10%)
Design project report (25%)
Final Examination – 30%
Closed book
Class Participation – 10%
Asking/answering questions, attendance, …
Grading will be on a curve
4
Reading Materials
No Textbooks
Materials will be from various books and journal articles
References
Lecture Slides
Books
Peter Marwedel – Embedded Systems Design, Kluwer 2003
Vahid and Givargis – Embedded System Design, Prentice Hall 2002
Embedded Systems Courses
Sangiovanni-Vincentelli @ Berkeley, Gupta @ UCSD, …
Conferences/Journals
ACM TECS/TODAES, IEEE TCAD/TVLSI, Kluwer DAES,…
Web Resources
www.embedded.com, www.eetimes.com, …
5
Past Course Projects (Spring‘09)
Dynamically Adaptive Inverted Pendulum Platform
NASA space grant symposium 2009 First Place Award
Embedded RFIDs in Cybernetics
Interactive Teaching Guitar
Real Time Embedded Database Design
Roving Wireless Sensor Network
Novel Hybrid Photonic Network-on-Chip for Emerging
Chip Multiprocessors
Accepted IEEE/ACM conference paper at Embedded Systems Week
(ESWEEK ‘2009)
6
Past Course Projects (Fall ‘09)
IPhone app – Digital Circuit Analyzer
Hexapod Robot for Environmental Monitoring
Home Security System
Task Scheduling on FPGA
Semi Automated Brewery Control System
Fault Tolerant Routing for Networks on Chip
Accepted
IEEE/ACM paper at Embedded Systems Week
(ESWEEK ‘2010)
7
My Expectations from YOU
CS/ECE 561
Get started on your project right away!
Assemble a project team (2-3 members)
Decide on topic, send 1 pg project summary by Sep 2
Attend lectures, complete assignments on time
8
Possible Class Project Topics
Thermal aware and Low Power Design of Multiprocessors
Using M5 or SESC simulators; Hotspot thermal analysis tool
Design a system level floorplanner for 3D ICs
Extend open source floorplanning tools such as Parquet, Hotfloorplan
Network on Chips for Multiprocessor systems
High level design/exploration/synthesis algorithms
Fault tolerant design techniques (encoding, routing, redundancy schemes)
RTL Synthesis/Gate level power and performance analysis
Task allocation techniques for multiprocessors
To optimize power, performance, thermal profile, reliability
Processor logic synthesis and design exploration/optimization
e.g., with open source RTL processor code from Opencores (OpenSPARC, OpenRISC)
Design of contemporary and novel memory architectures
e.g. techniques to improve lifetime of phase change RAM (PRAM), STTRAM
e.g. exploring on-chip cache, memory hierarchy
e.g. exploring Flash memories – performance, power, lifetime
9
Possible Class Project Topics
Wearable computing/Body sensor networks
Sensors on a human body transmitting data wirelessly to smartphone/PC
Hack an Android device
e.g. #1 create wireless P2P communication between devices
e.g. #2 attach a sensor and create an Android app to make it work
Hack a Wii/Xbox/PS3
e.g., hack motion controller/balance board to help train stroke victims
Hack a Roomba robotic vacuum
Tack on a camera, hack the firmware …
Vision Algorithms for motion estimation, object/gesture recognition
Use a webcam or higher res camera, implement image processing techniques
Energy Harvesting Platform Demonstration
Use solar/vibration/sound/thermo/piezoelectric energy to supplement battery in sensors
Comprehensive literature review (individuals only)
e.g. RFIDs, cyber-physical systems, embedded cellphone architectures
Profile and summarize trends for a conference (e.g. ESWEEK 2009)
10
Course Outline
Hardware Components
Hardware
si gn )
Concept HW/SW De ut, …
Specification Partitioning Layo
,
e s is
yn th
( S
De
sig
Estimation - (C
om n
pil
Exploration a ti
on
, …)
Software Components Software
Evaluation (area, power, performance, reliability, security, …) 11
Embedded Systems
Automobiles
Medical Entertainment
Handheld
Airplanes
Military
ICS212 FQ05 (Dutt) Introduction 12
What’s an Embedded System?
Embedded systems =
information processing systems
embedded into a larger product
Two types of computing
Desktop
– produced millions/year
Embedded – billions/year
Non-Embedded Systems
PCs, servers, and notebooks
The future of computing!
Automobiles, entertainment,
communication, aviation,
handheld devices, military and
medical equipments. 13
An Example Embedded System
Digital Camera Block Diagram
14
Components of Embedded Systems
Memory Controllers Interface
Software
(Application Programs)
Processor
Coprocessors
ASIC
Converters
Analog Digital Analog15
Components of Embedded Systems
Analog Components
Sensors, Actuators, …
Digital Components
Processor, Coprocessors, Memories, Buses
Controllers, Application Specific Hardwares
Converters
Analog-to-Digital (A2D), D2A, …
Software
Operating systems
Middleware
Applications (MPEG-x, GSM-kernel, …)
16
Automotive Electronics Platform Example
CS/ECE 561 FQ08 (Pasricha) Introduction 17
Automotive Electronics Market Size
Cost of Electronics / Car ($)
1400
1200
1000
800
600
400
200
0
1998 1999 2000 2001 2002 2003 2004 2005
Market
8.9 10.5 13.1 14.1 15.8 17.4 19.3 21.0
($billions)
90% of future innovations in vehicles:
based on electronic embedded systems
18
What can go wrong: BMW 745i
2, 000, 000 LOC
Windows CE OS
53 8-bit P
11 32-bit P
7 16-bit P
Multiple Networks
Buggy!
improper synchronization between two digital electronic control
units
would stall the engine and lead to a catastrophic accident in
some cases
Recent Toyota break/acceleration fiasco
19
Digital Convergence – Mobile Example
Entertainment
Communication
Broadcasting
Computing
Imaging Telematics
One device, multiple functions
Center of ubiquitous media network
Smart mobile device: next drive for semicon.
Industry 20
Mobile graphics/games
Resolution today ~176x208 – 480x320
In Japan, QVGA (320x240) is the norm
Nokia series 90 is 640x320; Nokia N93 is 320x200
Sony Ericsson S700i, M600i, K800i: 240x320
IPhone, IPod Touch is 480x320
900
Millions of units
Jon Peddie Research
800 Handheld Multimedia Devices report
700 MM phones
Non 3D MM phones
600 Native API based phones
500
400
300
Latest IPhone 4 has 960x640
200
To 1024x768 and 100
beyond in the future 0
2001 2002 2003 2004 2005 2006 2007 2008 2009 2010
21
Growing Importance of ES
.. embedded chips form the backbone of the electronics driven world in
which we live ... they are part of almost everything that runs on electricity
[Mary Ryan, EEDesign, 1995]
22
Characteristics
Application Specific
Applications are known a priori
Optimize for cost, area, power, and performance
Digital Signal Processing
Signals are represented digitally
Reactive
Reacts to changes in the system’s environment
Real-time
Compute certain tasks before deadline
Distributed, Networked, …
23
Characteristics
Reliability
Probability of system working correctly provided
that is was working at t=0
Maintainability
Probability of system working correctly d time
units after error occurred.
Safety
Not harmful for user
Security
Confidential and authentic communication
24
Embedded
ICS212 – Applications
Lecture 2
25
Aerospace
Flight control
Stability: real-time differential
feedback loops
Positioning & navigation
GPS, INS
Instrumentation
Data acquisition, display,
processing, and archive
Radar
Communication
26
Automobiles
Engine management
Fuel, ignition, timing
Emission control
Instrumentation
Data acquisition, display,
processing, and archive
Safety & stability
Airbags, active control
Entertainment & comfort
Radio, A/C, …
27
Robotics
Implies autonomous
operation
N physical degree of
freedom
Artificial intelligence
Control heavy
Mission oriented
Repair, search, rescue,
investigate, and perform
physically difficult tasks
28
Process Control
Industrial automation
Plant monitoring and production control
Similar to control systems but with emphasis on
management
29
Sensor Nets
Many sensor nodes each
capable of sensing,
computation/storage, and
communication
Structure safety
Search and rescue
Military use
Energy Efficient
Distributed Modern Sensor Nodes
UC Berkeley: COTS Dust
UC Berkeley: Smart Dust
UC Berkeley: COTS Dust
UCLA: WINS Rockw ell: W INS JPL: Sensor W ebs
30
Multimedia
An exercise in
Signals, analog to digital conversion,
quantization, sampling, processing, and
digital to analogue conversion
Information theory, entropy, Huffman
codes, compression, lossless
compression
Images, audio, video
Virtual Reality
Presentation
Quality of service
Think lots of data (formats and
standards too)!
31
Consumer Electronics
Home appliances
Yesterday’s appliances: add
computation
Tomorrow’s appliances: add
networking (Internet)
Office electronics
Integration
Electronic paper (filing, printing,
sending, and receiving)
Home/office automation
Common fantasy about the
automated home or office of the
future with lights and appliances
that operate by themselves or
with minimal effort
32
Network Components
Stitching LANs
Bridge
Connects two parts of the same network
Router
Link networks using different network
identities
Extending ports
Switch
Transmit to recipient only
Hub
Transmit to all
Handle large volume of highly
structured data with little
transformation
33
Medical Instruments
Perform diagnosis
(screening/evaluation)
Data collection
Appraisal of that data
Developing a plan of action
Observation or monitoring
Sensing and instrumentation
Accuracy and precision
Other applications:
Radiation therapy
Artificial hearts, arms, legs, …
34
E-Business
Information processing
systems
ATM
Cash registers
Scanners
Credit-card readers
Often the interface behind
a database
Automation and
convenience
35
Summary of Application Domains
Looked at a number of application domains
Large amount of overlap between these domains
Often each domain has associated standards,
design methodologies, and certification
programs
The future appears to suggest a fusion of design
differences into a single methodology
36
Real-Time Systems
A systems where correctness depends on
logical results and the time the results are
produced
Safety-critical: incorrect operation leads to human
loss
Mission-critical: incorrect operation leads to failed
mission
J.A. Stankovic et al. “Strategic Directions in
Real-Time and Embedded Systems”
37
Embedded System Design Challenges
Low cost Mixed digital/analog requirements
Light weight Shrinking time-to-market
Reliability Short product lifetime
Low power Real-time processing
Portable Inherent concurrency
Complexity HW/SW co-design
Ease of use Secure
38
Recent Design Challenges
Design Complexity
Multiple use-case applications
Ultra low power and thermal aware
Highly adaptive
Active power management (voltage scaling, etc.)
Alternative energy source (scavenge, solar, etc.)
Internet aware
IncorporateRF technologies
Networking capabilities
LargerOS, middleware, etc.
Understanding of many/changing protocols
Co-operative operation (trashcan & refrigerator)
Fault Tolerance
Security
39
Complexity Driver: Application Pull
1TOPS/W 3D TV
3D gaming
3D ambient
Structured
interaction
decoding
Ubiquitous
3D projectednavigation
Autonomous
display
driving
HMI by motion
StructuredGesture detection
encoding
100GOPS/W Expression
recognition
Gbit radio
Collision
H264 Adaptive avoidance
encoding route
Gesture Language
Emotion
dictation recognition recognition
10GOPS/W
UWB A/V Sign
5 GOPS/W Image
recognition 802.11n
streaming recognition
Mobile Si Xray
Base-band
H264
decoding Auto
Fully recognition
personalization
(security)
2005 2007 2009 2011 2013 2015
[IMEC] Year of Introduction
40
Design Complexity: Moore’s Law
Transistor capacity doubles every 18 months
Source: Intel
Driving force behind
Electronic systems research and industry
Proliferation of embedded computing systems
41
High-end Processors: Intel only?
1,000,000,000 Sony Graphic Synthesizer
IBM Power4 NVIDIA NV40
NVIDIA NV30 GPU
NVIDIA NV25 GPU
100,000,000 Sony Graphic Synthesizer
Intel Pentium 4
IntelPentium III
10,000,000 Intel Pentium II
Number of Transistors
Intel Pentium
Intel 486
1,000,000 NVIDIA NV20 GPU
Motorola G4
Intel 386
AMD Athlon XP
Intel286 Intel Centrino
100,000 NVIDIA NV35 GPU
Intel8086 ATI Radeon X800
10,000
Intel8080
Intel
4004 Intel8008
1000
1970 1975 1980 1985 1990 1995 2000 2005
42
High-end: Embedded Processors!
1,000,000,000 Sony Graphic Synthesizer
IBM Power4 NVIDIA NV40
NVIDIA NV30 GPU
NVIDIA NV25 GPU
100,000,000 Sony Graphic Synthesizer
Intel Pentium 4
IntelPentium III
10,000,000 Intel Pentium II
Number of Transistors
Intel Pentium
Intel 486
1,000,000 NVIDIA NV20 GPU
Motorola G4
Intel 386
AMD Athlon XP
Intel286 Intel Centrino
100,000 NVIDIA NV35 GPU
Intel8086 ATI Radeon X800
10,000
Intel8080
Intel
4004 Intel8008
1000
1970 1975 1980 1985 1990 1995 2000 2005
43
Who wants to be a Millionaire
You double your investment everyday
Starting investment - one cent.
How long it takes to become a millionaire
a) 20 days
b) 27 days
c) 37 days
d) 43 days
e) 360 days
f) Lifetime ++
44
Who wants to be a Millionaire
You double your investment everyday
Starting investment - one cent.
How long it takes to become a millionaire
a) 20 days One million cents
b) 27 days Millionaire
c) 37 days Billionaire
Believe it or not
Each of us have more than a million ancestors in
last 20 generations.
Doubling transistors every 18 months
This growth rate is hard to imagine, most people
underestimate
45
Time-to-Market
Time required to develop
a product to the point it
can be sold to
customers
Market window
Revenues ($)
Periodduring which the
product would have highest
sales
Time (months)
Average time-to-market
constraint is about 8
months
Delays can be costly
46
Losses due to Delayed Market Entry
Simplified revenue model
Peak revenue Product life = 2W, peak at W
Peak revenue from Time of market entry defines
Revenues ($)
delayed entry
On-time a triangle, representing
Market rise Market fall market penetration
Delayed Triangle area equals revenue
D W 2W
Time Loss
On-time
Delayed The difference between the
entry entry on-time and delayed triangle
areas (shaded region)
47
Delayed Market Entry (cont.)
Area = 1/2 * base * height
On-time = 1/2 * 2W * W
Peak revenue Delayed = 1/2 * (W-D+W)*(W-D)
Peak revenue from
Percentage revenue loss
Revenues ($)
delayed entry
Market rise
On-time
Market fall
= (D(3W-D)/2W2)*100%
Delayed Try some examples
1. Lifetime 2W=52 wks, delay D=4 wks
D W 2W Loss = (4*(3*26 –4)/2*262) = 22%
Time
On-time
Delayed 2. Lifetime 2W=52 wks, delay D=10 wks
entry entry Loss = (10*(3*26 –10)/2*262) = 50%
Delays are costly!
48
Cost
Unit cost
the monetary cost of manufacturing each copy of the 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 unit
Per-product cost
total cost / # of units = (NRE cost / # of units) + unit cost
• Example • e.g. Iphone 4
– NRE=$2000, unit=$100 • Component costs: $188
– For 10 units • A4 µP: $10.50
– total cost = $2000 + 10*$100 = $3000 • Retina Display: $28.50
– per-product cost = $2000/10 + $100 = $300 • Gyroscope: $2.60
• Accelerometer: $0.65
Amortizing NRE cost over the units
• Selling price: $600+
results in an additional $200 per unit 49
Course Outline
Hardware Components
Hardware
si gn )
Concept HW/SW De ut, …
Specification Partitioning Layo
,
e s is
yn th
( S
De
sig
Estimation - (C
om n
pil
Exploration a ti
on
, …)
Software Components Software
Evaluation (area, power, performance, reliability, security, …) 50