Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
25 views

Embedded System Life Cycle, GPIO and Intro To Arduino

This document discusses embedded system design and provides examples of embedded systems in daily life. It notes that modern cars have over 65 processors controlling various functions like the engine, transmission, AC, and more. Over 30% of a car's cost is now in electronics. The document then lists other examples of embedded systems like medical equipment, toys, and more. It provides an overview of typical components in an embedded system including sensors, actuators, memory, and peripherals. It also discusses microcontrollers, real-time operating systems, and classifies embedded systems from small to sophisticated. Finally, it outlines some key characteristics and challenges of embedded system design.

Uploaded by

avogadroangster
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Embedded System Life Cycle, GPIO and Intro To Arduino

This document discusses embedded system design and provides examples of embedded systems in daily life. It notes that modern cars have over 65 processors controlling various functions like the engine, transmission, AC, and more. Over 30% of a car's cost is now in electronics. The document then lists other examples of embedded systems like medical equipment, toys, and more. It provides an overview of typical components in an embedded system including sensors, actuators, memory, and peripherals. It also discusses microcontrollers, real-time operating systems, and classifies embedded systems from small to sophisticated. Finally, it outlines some key characteristics and challenges of embedded system design.

Uploaded by

avogadroangster
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 108

Embedded system design

Examples in your Daily Life

• …wake up …

• …have breakfast …
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
electronic systems
Examples in your Daily Life
Cont….
• …on our way to office…
Examples in your Daily Life
Cont….
• …in our office…
Examples in your Daily Life
Cont….
• …back at home…
More Examples
Mission critical controls
• Nuclear plant control, aircraft navigation ,military
equipment
• Medical equipment
• Communication
• Toy, etc
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
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
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
What is an Embedded
System?
• “An embedded 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.”
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
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
Some of the main characteristics:
– Dedicated (not general purpose)
– Contains a programmable component
– Interacts (continuously) with the environment
Major components of Embedded
system
• Hardware
• Software
• RTOS
Hardware
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
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
Classification of embedded
System

• Small scale Embedded System


• Medium scale embedded system
• Sophisticated Embedded System
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
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
Sophisticated
• Processor -
Embedded
Scalable
System
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
Characteristics of a Embedded
System
• Single Functioned
• Time constraints
• Tightly Constraint
• Real Time & Reactive
• Complex Algorithms
• User Interface
• Multirate
• Manufacturing Cost
• Power
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
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.
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
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
Missile Target System
Car Cruise Control
Complex Algorithms

• The operations
performed by
the processor
may be more
Complex

Eg.
Automobile
engine Control
Mobile Phone
User Interface
• Microprocessor are frequently used to
control complex user interfaces that may
include multiple menus and many options
Multirate
• ES have several real time activities at the
same time.
• They need to control some operations run
at slow rate and some
Optimizing atMatrices
Design high rate
Eg.
Multimedia
Manufacturing Cost

Depends on
• Processor Used
• Amount of memory required
• Type Of I/O
Power
• Power consumption affects
– Battery life
– Heat Consumption
An embedded system example -- a
digital camera
Digital camera chip
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:
– 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):
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

– 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
Performance Size hardware is needed to
optimize design metrics
– Not just a hardware or
NRE cost
software expert, as is
common
Digital camera chip
CCD
CCD Pixel coprocessor D2A
– A designer must be
A2D
lens
preprocessor
comfortable with various
JPEG codec Microcontroller Multiplier/Accum technologies in order to
DMA controller Display ctrl Hardwarthe best for a given
choose
e
application and constraints
Memory controller ISA bus interface UART LCD ctrl

Software
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 a
delayed entry
Revenues ($)

On-time triangle, representing market


Market rise Market fall penetration
– Triangle area equals revenue
Delayed
• Loss
– The difference between the on-
D W 2W
time and delayed triangle areas
On-time Delayed Time
entry entry
NRE and unit cost metrics
• Costs:
– 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 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
– 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
to ta l c o st (x1000)

p e r p ro d u c t c o st
$120,000 $120

$80,000 $80

$40,000 $40

$0 $0
0 800 1600 2400 0 800 1600 2400
Num b e r o f units (vo lu m e ) Num b e r o f units (vo lu m e )

• But, must also consider time-to-market


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!
• 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?
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
How do we meet deadlines ?
• Speed up the hardware results in faster
execution
• Speed may be limited by Memory system
How do we minimize power consumption?

• Excessive power consumption


increases heat
dissipation
How does the nature of ES make
their design more difficult?

• Limited Observation
• Complex Testing
• Limited Development Environment
Does it optimize the design metrics?

• NRE Cost
• Unit Cost
• Size
• Performance
• Flexibility
• Time to prototype
• Time to Market
• Maintainability
• Correctness
• Safety
CONSTRAINT

• Most of the design metrics are heavily


constrained in Embedded System
• Time to Market design metric
• NRE Cost & Unit Cost
• Performance design Metric
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
Reve
nues

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
Assume Peak
Revenue at time W

Market
Market
rise
Fall

On time Delayed 2W
W
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
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
Total cost Vs # of Units produced
A

T
o
t
B
a
l
C
C
o
s
t

400 # of units 2400


Technology Optimum volume
A Low volume (1 –
400)
B Medium(400 –
2400)
C High
Volume(Above 2400)
More Volume Less Per product
Cost

P
e
r
p A
r
o
d
u
c C
t
c B
o
s
t

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.
embedded design
challenges
What does “performance”
mean?
• In general-purpose computing,
performance often means average-case,
may not be well-defined.
• 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
• We need to analyze the system at several
levels of abstraction to understand
performance:
– CPU.
– Platform.
– Program.
– Task.
– Multiprocessor.
Challenges in embedded
system design
• How much hardware do we need?
– How big is the CPU? Memory?
• 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.
• Does it really work?
– Is the specification correct?
– 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
• A procedure for designing a system.
• Understanding your methodology helps
you 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
• Performance.
– Overall speed, deadlines.
• Functionality and user interface.
• Manufacturing cost.
• Power consumption.
• Other requirements (physical size, etc.)
embedded design life
cycle
Levels of abstraction

requirements

specification

architecture

component
design

system
integration
Top-down vs. bottom-up
• Top-down design:
– start from most abstract description;
– work to most detailed.
• Bottom-up design:
– work from small components to big system.
• Real design uses both techniques.
Stepwise refinement
• At each level of abstraction, we must:
– analyze the design to determine
characteristics of the current state of the
design;
– refine the design to add detail.
Requirements
• Plain language description of what the
user wants and expects to get.
• 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
• Functional requirements:
– output as a function of input.
• Non-functional requirements:
– time required to compute output;
– size, weight, etc.;
– power consumption;
– reliability;
– etc.
Our requirements form

name
purpose
inputs • Type of data
outputs • Data character tics
• Types of IO devices
functions
performance
manufacturing cost
power
physical size/weight
Example: GPS moving map
requirements
• Moving map
obtains position I-78

from GPS, paints

Scotch Road
map from local
database.

lat: 40 13 lon: 32 19
GPS moving map needs
• Functionality: For automotive use. Show major
roads and landmarks.
• 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.
• Physical size/weight: Should fit in hand.
• Power consumption: Should run for 8
hours on four AA batteries.
GPS moving map
requirements form
Specification
• A more precise description of the system:
– should not imply a particular architecture;
– 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
• Should include:
– What is received from GPS;
– map data;
– user interface;
– operations required to satisfy user requests;
– background operations needed to keep the
system running.
Architecture design
• What major components go satisfying the
specification?
• 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

GPS search display


renderer
receiver engine

user
database interface
GPS moving map hardware
architecture

display frame CPU


buffer

GPS
receiver

memory
panel I/O
GPS moving map software
architecture

position pixels
database
renderer
search

user
timer
interface
Designing hardware and software
components
• Must spend time architecting the system
before you start coding.
• Some components are ready-made, some
can be modified from existing designs,
others must be designed from scratch.
System integration
• Put together the components.
– Many bugs appear only at this stage.
• Have a plan for integrating components to
uncover bugs quickly, test as much
functionality as early as possible.
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

On-going maintenance and upgrading


Mobile Phone - Design
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
Block Diagram
Power
Module
Antenna Microcontroller

LED Panel
Bluetooth

Keypad
Circuit Diagram (H/w)
An Example Embedded System

Digital camera
Block Diagram
• CCD
– Charge couple device
– Contains an array of light senitive photocells
that capture Image
• A2D
– Analog images to digital

• D2A
– Digital images to analog
• 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
• 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
• 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

You might also like