Embedded Systems
Embedded Systems
Embedded Systems
AND APPLICATION
TOPICS TO BE DISCUSSED
• System
• Embedded System
• Components
• Classifications
• Processors
• Other Hardware
• Software
• Applications
2
INTRODUCTION
What is a system?
A system is a way of working,
organizing or doing one or many tasks
according to a fixed plan, program or
set of rules.
A system is also an arrangement
in which all its units assemble and
work together according to the plan or
program.
3
SYSTEM EXAMPLES
WATCH is a time display SYSTEM
•Household appliances:
Microwave ovens, Television, DVD
Players & Recorders
•Audio players
•Cellular telephones
•Calculators
• Medical equipments
•Videogames
7
8
9
• Automotive embedded
• systems
• Today’s high-end automobile may have 100
• microprocessors:
• 4-bit microcontroller checks seat belt;
• microcontrollers run dashboard devices;
• 16/32-bit microprocessor controls engine.
• Source:
10
• Embedded Systems...
• react on the environment at the speed of the
environment
• often real-time requirements
• designed for one single task
• have often to be power-efficient
• mass products and have to be cheap
• must be reliable
11
History of Embedded Systems
13
History of Embedded Systems
Plenty of Vendors Plenty of Sizes
14
Contemporary Embedded Systems
System Components
Power management
Video processing
Audio processing
Communications
User interfaces
Dedicated ASICs
Memory management
Storage
15
EMBEDDED SYSTEM
Definition: An Embedded System is a system that has
electronic hardware with software tightly coupled
together. Its software embeds in
ROM (Read Only
Memory). It does not need
secondary memories as in
a computer
SOFTWARE PROGRAM
#include <16f876a.h>
#use delay (clock=20000000)
#byte PORTB=6
main()
HARDWARE {
set_tris_b(0);
portb=255; //decimal
delay_ms(1000);
portb=0x55; //hexadecimal
delay_ms(1000);
portb=0b10101010; //binary
delay_ms(500); 16
}
COMPONENTS OF EMBEDDED SYSTEM
17
COMPONENTS OF EMBEDDED SYSTEM
• Hardware
Processor, Timers, Interrupt controller, I/O Subsystem, Memories, Ports, etc.
• Software
– Application Software
Which may perform concurrently the series of tasks or multiple tasks
18
EMBEDDED SYSTEM HARDWARE
19
EMBEDDED SYSTEM HARDWARE
Central Processing Unit
Registers, ALU, CU
Memory
Program Memory
Data Memory
I/O Devices
Communication ports
User Interfaces
Sensors & actuators
Diagnostics support
System controllers
Power management
Specialized ASICs 20
OTHER HARDWARE
• Clock Oscillator
• Interrupt Handler
• Keypad/Keyboard
21
EMBEDDED SYSTEM SOFTWARE
System Tasks
Actions making use of system resources
System Kernel
Manages system resources
Coordinates task services
Services
Routines performing specific tasks
22
SOFTWARE
SOFTWARE SIMULATOR
C Masm
C++
Dot Net
COMPILER
RIDE
KEIL
23
CLASSIFICATIONS OF EMBEDDED SYSTEM
• Single Tasked
Programming tools:
Programming tools:
RTOS, Source code Engineering Tool,
Simulator, Debugger and Integrated Development
Environment (IDE). 26
HIGH PERFORMANCE EMBEDDED SYSTEM
Programming Tools:
For these systems may not be readily available at a
reasonable cost or may not be available at all. A compiler or
retargetable compiler might have to be developed for this. 27
The Life Cycle of Embedded Designs
28
Design Constraints
• Functionality
– System ability to perform the function it was designed for (REQ)
• Cost
– Amount of resources needed to conceive, design, and produce an embedded system
• Performance
– System ability to perform its function in time.
– Affected by both HW & SW factors
• Size
– Physical space taken by a system solution.
• Power and Energy
– Energy required by a system to perform its function.
• Time to Market
– The time it takes from system conception to deployment.
• Maintainability
– System ability to be kept functional during its mature life.
29
Functionality
• Functional verification is a difficult task
– Can consume up to 70% of development time
• Verification Methods
– Simulation Techniques
• Behavioral (HDL-based)
• Processor (Software)
• JTAG Debugger
– Hardware supported through dedicated ports
• In-Circuit Emulators
– Replace MCU in target system
– A powerful debugger
– Expensive
• ROM Monitors
– Monitor functions in ROM
31
System Cost
• The cost of a given Volume (V) of units:
33
Performance HW
• Clock Frequency
– System clock speed: not an absolute performance metric
• Architecture
– Determines how clock cycles are used
• Component Speed
– Response time and access time
• Handshaking
– Signalization required to complete a transaction
• Low-power Modes
– Wake-up times might affect application speed
• High speed is expensive!!!
– Use it wisely
34
Performance SW
• Algorithm Complexity
– Steps and resources needed to complete a task
• Task Scheduling
– Affects waiting time in multitasking system
• Inter-task Communication
– Time taken by tasks to exchange information
• Level of Parallelism
– Software usage of system hardware resources
35
Power and Energy
• Critical Parameter
– A long chain of design events depend on it
• System reliability
– Stress, noise, and heat
• Cooling Costs
– High power = lot of heat to remove
• Power Supply Requirements
– Larger batteries of power supply
• Size, Weight, and Form
– Mechanical system parameters affected by heat density
36
Power and Energy
• Environmental Impact of Embedded Systems
– Average individual uses 60 microprocessors per day
– Household electronics accounts for 11% of all energy consumed in
the USA
• 147,000,000,000 KWh (147TWh) per year
– Excludes digital TVs and large appliances
– Excludes industry, schools, hospitals, etc
– Trend continues to grow… Is there a limit?
37
Tips on power
• Use low-power MCUs and Peripherals
– Activate CPU standby and sleep modes
– Let peripherals do the work while the CPU is off
• Stop the Energy Waste
– Turn off unused peripherals
• Write power efficient code
– Every wasted CPU cycle is energy that will never come back
• Use power management techniques
– Power and clock gating plus efficient coding techniques
38
Maintainability
Four maintenance dimensions
• Corrective: Fixes faults
Maintenance enables reliable system • Adaptive: Copes with a changing environment
operation throughout entire useful life • Perfective: Adds enhancements
39
Hardware Maintenance Issue
• Increased NREs
– Design overhead to support HW maintenance
• Time-to-market Impact
– Additional development time
• Increases Recurrent Cost
– More components in system
• Component Obsolescence
– Limit system useful life span
40
Software Maintenance Issue
• Hardware Constraints
– Stringent HW constraints leave little room for support functions
• Cost of Verification
– Undiscovered software bugs become maintenance headaches
• Inadequate Code Documentation
– Meaningful and up-to-date
• Technology Changes
– Compatibility with tool newer versions
• Ripple Effect of Changes
– Identifying effect down the code
• Qualified Personnel
– Everybody wants to design 41
IC technology
• The manner in which a digital (gate-level)
implementation is mapped onto an IC
– IC: Integrated circuit, or “chip”
– IC technologies differ in their customization to a
design
– IC’s consist of numerous layers (perhaps 10 or more)
• IC technologies differ with respect to who builds each layer
and when
gate
IC package IC oxide
source channel drain
Silicon substrate
42
IC technology
• Three types of IC technologies
– Full-custom/VLSI
– Semi-custom ASIC (gate array and standard
cell)
– PLD (Programmable Logic Device)
43
Full-custom/VLSI
• All layers are optimized for an embedded
system’s particular digital implementation
– Placing transistors
– Sizing transistors
– Routing wires
• Benefits
– Excellent performance, small size, low power
• Drawbacks
– High NRE cost (e.g., $300k), long time-to-
44
market
Semi-custom
• Lower layers are fully or partially built
– Designers are left with routing of wires and
maybe placing some blocks
• Benefits
– Good performance, good size, less NRE cost
than a full-custom implementation (perhaps
$10k to $100k)
• Drawbacks
– Still require weeks to months to develop
45
PLD (Programmable Logic
Device)
• All layers already exist
– Designers can purchase an IC
– Connections on the IC are either created or destroyed
to implement desired functionality
– Field-Programmable Gate Array (FPGA) very popular
• Benefits
– Low NRE costs, almost instant IC availability
• Drawbacks
– Bigger, expensive (perhaps $30 per unit), power
hungry, slower
46
MICROCONTROLLER
• A microcontroller is a functional
computer system-on-a-chip. It contains a
processor, memory, and programmable
input/output peripherals.
48
MICROPROCESSOR Vs MICROCONTROLLER
MICROPROCESSOR MICROCONTROLLER
49
EMBEDDED PROCESSOR
50
DIGITAL SIGNAL PROCESSOR
• DSP as a GPP is a single chip VLSI unit.
51
APPLICATION SPECIFIC SYSTEM
PROCESSOR (ASSP)
52
MULTI PROCESSOR SYSTEM USING
GPPs
• Multiple processors are used when a
single processor does not meet the
needs of different task.
53
Moore’s Law
54
Moore’s law
55
56
57
• Thus ...
• Microprocessors are used
• As key components in an embedded design
• Programmable Logic and ASICs are used
• for critical parts in a design
• An obective for an embedded system designer is to
• find the cheapest solution that meets the requirements
• Do not use a Pentium, when you
• only want to control a freezer...
58
• 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?
59
• 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?
60
Learn by Doing
Excel Thru Experimentation
Lead by Example
THANK YOU
61