Sie sind auf Seite 1von 39

Real-Time Concepts for

Embedded Systems

Author: Qing Li with


Caroline Yao

ISBN: 1-57820-124-1
CMPBooks
Chapter 1
Introduction
Outline
† 1.1 Real Life Examples of Embedded Systems
† 1.2 Real-Time Embedded Systems
† 1.3 The Future of Embedded Systems
Introduction
† Embedded Systems
„ A class of dedicated computer systems designed
for specific purposes
† Real-time embedded system: one special class
of embedded systems
„ Embedded systems with real-time behavior
„ Respond to external events in real time
1.1 Real-Life Examples of
Embedded Systems
† Embedded systems are ubiquitous
„ Industrial automation
„ Defense
„ Transportation
„ Aerospace
† For example
„ NASA’s Mars Path Finder
„ Lockheed Martin’s missile guidance system
„ Ford automobile
Real-Life Examples of Embedded
Systems (Cont.)
† In the home environment
„ Security systems
„ Cable and satellite boxes for televisions
„ Home theater systems
„ Telephone answering machines
† In the work environment
„ Network end-points: printers, cable modems,
routers
„ Backbone gigabit switches
Embedded Systems at Home
Embedded Systems at Work
Real-Life Examples of Embedded
Systems (Cont.)
† In leisure activities
„ In-car navigation systems
„ Portable music player
„ Web tablet
„ …
Navigation System and Portable
Music Player
A Web Tablet
Defining the Embedded System
† Embedded systems are computing systems with
tightly coupled hardware and software integration,
that are designed to perform a dedicated function
† Embedded: systems within systems
„ systems are usually an integral part of a larger system
„ Multiple embedded systems can coexist in an embedded
system.
„ E.g., A/V decoder in a digital set-top box
† In some cases, embedded systems can function as
standalone systems
„ E.g., a network router
Embedded Processor and
Application Awareness
† The processors found in PCs are general-purpose
„ Complex in design to provide various features and
functions
„ Large power consumption
„ Heat production
„ Big size
„ Expensive to fabricate
† Embedded processors
„ Application awareness: designed for a specific class of
applications
Embedded Processor Categories
† Focus on size, power consumption, and price
„ Some embedded processors are limited in functionality
„ Embedded processor in personal digital assistant (PDA)
† No floating-point coprocessor, 16-bit addressing space, 200 MHz
† Applications are interactive and display-intensive, rather than
computation-intensive
† Focus on performance
„ These embedded processors are powerful and packed with
advanced chip-design technologies, such as advanced
pipeline and parallel processing architecture.
„ Network processors for network equipments and
telecommunications
Embedded Processor Categories
(Cont.)
† Focus on all four requirements: performance,
size, power consumption, and price
„ Embedded digital signal processor (DSP) in a cell
phones for real-time voice communication
† A DSP has specialized arithmetic units, optimized
design in the memory, and addressing and bus
architectures with multiprocessing capability that
allow the DSP to perform complex calculations
extremely fast in real time.
† Powerful in digital signal processing while reasonably
priced
System-on-a-Chip (SoC)
† Especially attractive for embedded systems
† A SoC processor comprised of
„ A CPU core
„ Build-in peripheral modules
† Programmable general-purpose timer
† Programmable interrupt controller
† DMA controller
† Possibly ethernet interfaces
† Self-contained design
„ Build a variety of embedded applications without needing
additional external peripheral devices
„ Reduce the overall cost and size on final product
Hardware and Software Co-Design
Model
† Both the hardware and the software for an
embedded system are developed in parallel
„ Software can take advantage of special hardware
features to gain performance
„ Hardware can simplify design if functionality can
be achieved in software to reduce hardware
complexity and cost
Cross-Platform Development
† Software development in embedded system: cross-
platform development
„ Software, including system and application software, is
developed on one platform but runs on another
„ Platform: a combination of hardware, operating system,
and software development tools
„ Host system: the system on which the embedded software
is developed
„ Target system: the embedded system under development
Cross-Platform Development (Cont.)
† Cross-compiler: the main tool in cross-platform
development
„ A compiler that runs on one type of processor
architecture but produces object code for a different
type of processor architecture
Software Storage and
Upgradeability
† Code for embedded system is commonly
stored in ROM and NVRAM memory devices
† Depending on the memory devices used,
upgrading an embedded system may need to
„ Build new PROM
„ Deploy special equipment and/or a special
method to reprogram the EPROM
„ Reprogram the flash memory
Software Storage and
Upgradeability (Cont.)
† Software storage device has an impact on software
development
„ To reprogram an EPROM when small changes are made
is tedious and time-consuming during software
development
† Must remove the EPROM device from its socket
† Software storage device also has an impact on
maintenance
„ Must replace PROM and EPROM chips when upgrading
an embedded system
„ However, flash memory or EEPROM can be upgraded
dynamically without the need for chip replacement
Read Only Memory (ROM)
† Mask Programmed ROM
„ Memory content is programmed during manufacturing
process
„ Programmed once and cannot be changed
† Field Programmed ROM (PROM)
„ Memory content cannot change once programmed
† Erasable Programmable ROM (EPROM)
„ Can be custom-programmed, erased, and reprogramming
as often as required
„ To reprogram: remove from its hosing unit and use a
EPROM programmer
Read Only Memory (ROM)
(Cont.)
† Electrically Erasable Programmable ROM
(EEPROM or E2PROM)
„ Memory content of a single byte can be
selectively erased and reprogrammed
„ Can be reprogrammed while staying in the device
† Without a special programmer
† Flash Memory
„ A variation of EEPROM
„ But allow for block-level programmability that is
much faster than EEPROM
Random Access Memory (RAM)
† Dynamic RAM (DRAM)
„ Require periodic refreshing to retain its content
† Static RAM (SRAM)
„ Faster than DRAM because it does not require
periodic refreshing
† Non-Volatile RAM (NVRAM)
„ A special type of SRAM that has backup battery
power
„ Or a combination of SRAM and EEPROM
1.2 Real-Time Embedded Systems
† Real-time system: respond to external events in a
timely fashion and the response time is guaranteed.
Real-Time Embedded Systems
(Cont.)
† Responding to external events includes
„ Recognize when an event occurs
„ Perform the required processing
„ Output the result within a given time constraint
† Timing constraints include
„ Finish time
„ Both start time and finish time
Real-Time Embedded System (Cont.)
† Real-time embedded system
„ The intersection of embedded system and real-time
system:

Embedded Real time Real-Time


Systems Embedded Systems
Systems

† Not all embedded systems exhibit real-time behavior


nor are all real-time systems embedded
Real-Time Systems
† The structure of a real-time system is a
controlling system and at least one controlled
system
Controlling
System

input output
Controlled Controlled
System System
Controlled
System

output input
Real-Time Systems (Cont.)
† The controlling system interacts with the controlled
system in various ways
„ The interaction can be periodic
† The controlling system -> the controlled system
† Predictable and occurs at predefined intervals
„ The interaction can be aperiodic
† The controlled system -> the controlling system
† Unpredictable from random occurrences of external events
„ The communication can be a combination of both types
† The controlling system must process and respond to
the events and information generated by the
controlled system in a guaranteed time frame.
Real-Time Systems Examples
† Real-time weapons defense system
„ Controlling system
† A command-and-decision (C&D) system
„ Controlled system
† A radar system
† Weapons firing control system
„ Communication between the radar system and C&D
system is aperiodic
„ Communication between the C&D system and the
weapon firing control system is periodic
Real-Time Systems Examples (Cont.)
† Cruise missile guidance system
„ Controlling system
† Navigation system: contain digital maps covering the missile
flight path
„ Controlled system
† Radar system
† Divert-and-altitude-control system
„ Communication between radars and the navigation system
is aperidoic
„ Communication between the navigation system and the
diver-and-altitude-control system is periodic
Real-Time Systems Examples (Cont.)
† DVD player
„ Controlling system
† DVD player must decode both the video and audio
streams from the disc simultaneously.
„ Controlled system
† Remote control is viewed as a sensor to feed pause
and language selection events into DVD player
Characteristics of Real-Time
Systems
† Characteristics
„ Must produce correct computational results,
called logical or functional correctness
„ These computations must conclude within a
predefined period, called timing correctness
† The overall correctness of a real-time system
depends on both the functional correctness
and the timing correctness
Hard and Soft Real-Time Systems
† Real-time systems have timing constraints
and are deadline-driven.
† Real-time system can be classified as hard
real-time system or soft real-time system
„ Degree of tolerance of missed deadline
„ Usefulness of computed results after missed
deadlines
„ Severity of the penalty incurred for failing to
meet deadlines
Hard Real-Time Systems
† Degree of tolerance of missed deadline
„ Extremely small or zero
† Usefulness of computed results after missed
deadlines
„ Likely useless
† Severity of the penalty incurred for failing to
meet deadlines
„ catastrophe
Soft Real-Time Systems
† Degree of tolerance of missed deadline
„ Non-zero
† Usefulness of computed results after missed
deadlines
„ Have a rate of depreciation
† Severity of the penalty incurred for failing to
meet deadlines
„ Non-catastrophic
Examples
† Hard real-time systems
„ Weapon defense system
„ Missile guidance system
† Soft real-time systems
„ DVD player
Hard and Soft Real-Time Systems
(Cont.)
† So far, we only address the deadline or the finish
time
† At times, meeting the start time of a job is just as
important
„ Can lead to missing the job completion deadline
„ A resource-scheduling problem
† The scheduling algorithms of a real-time system
„ must schedule system resources so that jobs created in
response to both periodic and aperiodic events can obtain
the resources at the appropriate time
1.3 The Features of Embedded
Systems
† Trends
„ Product market windows dictate six–to–nine month turnaround
cycles
„ Globalization is redefining market opportunities and expanding
application space
„ Connectivity is now a requirement rather than a bonus
„ Electronics-based products are more complex
„ Interconnecting embedded systems are yielding new
applications
„ Microprocessors’ processing power is increasing at a rate
predicted by Moore’s Law
† The number of transistors per integrated circuit doubles
every 18 months
† Embedded software will continue to proliferate into new
applications and lead to smarter classes of products

Das könnte Ihnen auch gefallen