Embed Ed System
Embed Ed System
Systems
Definiti
on
• A combination of hardware and software which
together form a component of a larger
machine.
• An example of an embedded system is a
microprocessor that
controls an automobile engine.
• An embedded system is designed to run on its own
without human intervention, and may be required to
respond to events in real time.
• An application specific electronic sub-system which is
completely encapsulated by the main system it
belongs to.
• Designed for some specific tasks
• Subjected to real time performance constraints that
must be met
• Feature tightly integrated combinations of
hardware and software
An embedded system example –
Digital camera
Digital camera chip
CCD
lens
6
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
7
Embedded System Design
Constraints
Classification of Embedded
Systems
• Centralized vs distributed
• Real-time vs non real-time
• Hard deadline
• Failsafe
• Fail-operational
• Soft deadline
• Firm deadline
• Battery powered vs mains powered
• System-on-Chip vs discrete element
9
Embedded systems are classified into four categories based on their performance and functional
requirements:
• Stand alone embedded systems
• Real time embedded systems
• Networked embedded systems
• Mobile embedded systems
Embedded Systems are classified into three types based on the performance of the
microcontroller such as
• Small scale embedded systems
• Medium scale embedded systems
• Sophisticated embedded systems
Real-time (reactive) systems
• Systems that are bound by a real-time constraint (“deadline”) in their
operation
• If the deadline is not met it is usually considered a system failure,
even if the output is eventually correct
• Deadlines are usually relative to an event
• Hard deadlines: Anti-lock brakes,
• Soft deadlines: Digital video
• Not the same as high-performance systems, because often running
faster than real-time requirement is not necessary or desired
12
Real-time
System
• A real-time computer system is a computer system where the
correctness of the system behavior depends not only on the
logical results of the computations, but also on the physical time
when these results are produced.
• By system behavior we mean the sequence of outputs in time of a
system.
13
Real-time means
reactive
• A real-time computer system must react to stimuli from its environment
• The instant when a result must be produced is called a deadline.
• If a result has utility even after the deadline has passed, the deadline is classified
as soft, otherwise it is firm.
• If severe consequences could result if a firm deadline is missed, the deadline
is called hard.
• Example: Consider a traffic signal at a road before a railway crossing. If the traffi
c
• signal does not change to red before the train arrives, an accident could
result.
14
Fail-Safe hard-deadline RT systems
• If a safe state can be identified and quickly reached upon the occurrence of
a failure, then we call the system fail-safe.
• Failsafeness is a characteristic of the controlled object, not the computer
system.
• In case a failure is detected in a railway signaling system, it is possible to set all signals to red
and thus stop all the trains in order to bring the system to a safe state.
• In failsafe applications the computer system must have a high error-detection
coverage.
• Often a watchdog, is required to monitor the operation of the computer system
and put it in safe state.
15
Fail-Operational hard-deadline RT
systems
• In fail-operational applications, threre is no safe state
• a flight control system aboard an airplane.
• The computer system must remain operational and provide a minimal
level of service even in the case of a failure to avoid a catastrophe
16
Typical Embedded System Components
• Sensors: Allow the system to “read” the environment
• Processing Elements: Control of the embedded system
• Actuators: Allow the system to act on its environment
• Network Connection: Local or internet, allowing exchange of information
17
Typical embedded software components:
Device Drivers
28
Design challenge – optimizing design
metrics
•Common metrics
•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
•Size: the physical space required by the system
•Performance: the execution time or throughput of the system
•Power: the amount of power consumed by the system
•Flexibility: the ability to change the functionality of the system
without
incurring heavy NRE cost
29
Design challenge – optimizing
design
•Common metrics
metrics (continued)
•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, many more
30
Design metric competition -- improving one may
worsen others
• Expertise with both software and hardware is needed to optimize design metrics
• Not just a hardware or software expert, as is common
• A designer must be comfortable with various technologies in order
to choose the best for a given application and constraints
Power
Performance Size
NRE cost
31
Three key embedded system
•Technology
technologies
•A manner of accomplishing a task, especially
using technical processes, methods, or knowledge
•Three key technologies for embedded systems
•Processor technology - General Purpose,
Application Specific, Single Purpose
•IC technology- VLSI, ASIC, PLD
•Design technology: Compilation/synthesis, libraries/IP,
test/verification
32
Processor technology
• The architecture of the computation engine used to implement a system’s
desired functionality
• Processor does not have to be programmable
• “Processor” not equal to general-purpose processor
Controller Datapath
Controller Datapath Controller Datapath
Control Register
logic and Control Registers Control index
file logic
State logic and
State total
register
register Custom State
General ALU register +
ALU
IR PC
IR PC
Data Data
memory memory
Program Data
memory memory Program
Assembly code memory
Assembly code for:
for:
total = 0
total = 0
for i =1 to …
for i =1 to …
33
General-purpose processors
• Programmable device used in a variety of
applications
• Also known as “microprocessor” Controller Datapath
• Features Control
logic and
Register
file
• Program memory State
register
• General datapath with large register file and general
General
ALU IR PC
ALU
• User benefits
• Low time-to-market and NRE costs Program Data
memory memory
• High flexibility
Assembly code
• “Pentium” the most well-known, but there are for:
34
Single-purpose processors
• Digital circuit designed to execute exactly one
program
• a.k.a. coprocessor, accelerator or peripheral Controller Datapath
Control index
• Features logic
total
• Contains only the components needed to execute a single State
program register +
• No program memory
• Benefits Data
memory
• Fast
• Low power
• Small size
35
Application-specific processors
• Programmable processor optimized for a particular
class of applications having common Controller Datapath
characteristics Control
logic and
Registers
• Compromise between general-purpose and single- State
register
purpose processors Custom
ALU
• Features IR PC
• Program memory Data
• Optimized datapath Program memory
memory
• Special functional units
Assembly code
• Benefits for:
36
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 ch
an Silicon substrate
nel
dra
in
37
IC technology
• Three types of IC technologies
• Full-custom/VLSI
• Semi-custom ASIC (gate array and standard cell)
• PLD (Programmable Logic Device)
38
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-market
39
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
40
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
41
Moore’s law
• The most important trend in embedded systems : Predicted in 1965 by
Intel co-founder Gordon Moore
• IC transistor capacity has doubled roughly every 18 months for the past
several decades
10,000
1,000
0.01
0.001
42
Design Technology
• The manner in which we convert our concept of
desired system functionality into an implementation
To final implementation
43
The co-design ladder
•In the past:
Sequential program code (e.g., C, VHDL)
Behavioral synthesis
• Hardware and software Compilers
(1960's,1970's)
(1990's)
•Hardware/software
Logic gates
“codesign” Implementation
Microprocessor plus program bits: VLSI, ASIC, or PLD implementation:
“software” “hardware”
The choice of hardware versus software for a particular function is simply a tradeoff among various design metrics, like
performance, power, size, NRE cost, and especially flexibility; there is no fundamental difference between what hardware or
software can implement.
44
Embedded System
Software
System
• Decomposition of functionality
Development
• Architecture Selection: Choice of processors, standard hardware
• Mapping of functionality to HW and SW
• Development of Custom HW and software
• Communication protocol between HW and SW
• Prototyping, verification and validation
46
Design
Choices
• Choices in Components
• Processors, DSP chips, Std. Components
• Many different choices in mapping
• Fully HW solution
•More speed, cost, TTM (Time to market), less
robust
•Std. HW development
• Fully SW solution
•Slow, less TTM, cost, more flexible
•Std. Micro controller development
47
Reactive Systems
• Standard Software is a transformational system
• Embedded software is reactive
I O
T. S.
48
RS features
•Non-termination
•Ongoing continuous relationship with environment
•Concurrency (at least system and environment)
•Event driven
•Events at unpredictable times
•Environment is the master
•Timely response (hard and soft real time)
•Safety - Critical
•Conventional models inadequate
49
Finite State
Machines
• One of the well-known models
• Intuitive and easy to understand
• Pictorial appeal
• Can be made rigorous
• Standard models for Protocols, Controllers, HW
50
Real-time
• programming the processes or instruction set with constraints of time
programming
for its response, process with latencies, and process with deadlines
• Procedure-oriented C and object-oriented programming C++ and Java
languages are used in most embedded systems programming.
• For some embedded system which has more no. of hardware and
memory management this type use RTOS for programming
Real-Time Operating
• An RTOS is an OS for response time-controlled and event controlled
System
processes. It is very essential for large scale embedded systems.
• RTOS occupy little space from 10 KB to 100KB
• The main task of a RTOS is to manage the resources of the computer
such that a particular operation executes in precisely the same
amount of time every time it occur.
64
2.Which of the following offers external chips for memory
1.Which one of the following offers CPUs as
and peripheral interface circuits?
integrated memory or peripheral interfaces?
a) Microcontroller
a) Microcontroller
b) Microprocessor
b) Microprocessor
c) Peripheral system
c) Embedded system
d) Embedded system
d) Memory system