Embedded Systems
Marimuthu R
School of Electrical Engineering
Definitions - System
“It can accept some input, analyze and then it
should give us the output that the system is
meant for or it should drive the next piece of
machine connected to it.”
Definitions
According to Wayne Wolf,
➢ An Embedded System is a computing system other than general
purpose computers.
➢ An embedded system is the one that has computer hardware with
software embedded in it as one of its most important components.
➢ It is a device that includes a programmable computer but is not
itself intended to be a general purpose computer.
➢ A part of larger system which gets inputs from user and process it &
delivers output. Normally microprocessor or microcontroller’s
(Programmable) are embedded and it’s a reactive system.
GENERAL-PURPOSE COMPUTERS
• Able to run a variety of
software.
• Contain relatively high-
performance hardware
components (fast processors,
data & program storage).
• Require an operating system
(OS).
GENERAL-PURPOSE COMPUTERS
• Designed for heavy user • Several implement data
interaction. memory and program
storage.
• Uses a variety of peripherals
(displays, keyboards, mice, • Possesses a distributed
internet connections, wireless architecture (full functionality of
communication capability).
the computer is spread across
multiple IC chips).
• Expensive.
• Use a group of integrated
circuits or chips (ICs).
• One implements the
central processing unit
Image Courtesy of
(CPU). Recording Connection of Canada
EMBEDDED COMPUTERS
• Resources can be
implemented on a single
IC.
• Include a variety of
peripherals (timers,
analog-to-digital
converters, digital-to-
analog converters, serial
interfaces).
• Small size makes them Image Courtesy of
very versatile. Recording Connection of Canada
EMBEDDED COMPUTERS
• Contains firmware (only
the needed software
which is not intended to
be changed frequently).
• May contain Real Time
Operating Systems
(RTOS) which are used
as a task scheduler.
• Low cost.
Image Courtesy of
Recording Connection of Canada
Characteristics
Single Functioned
➢An Embedded System can execute a specific
function repeatedly i.e., dedicated function.
Tightly Constraint
➢Manufacturing Cost
➢Performance
➢Size
➢Power
Characteristics
Real Time and Reactive
➢The system should be ready to accept the
input (Reactive) at any time and should be
ready to process it.
Complex Algorithms
➢The processor inside the embedded system
should perform operations that are complex in
nature.
Characteristics
User Interface
➢Easier and comfortable interface
Multi Rate
➢Embedded Systems need to control and drive
certain operations at one rate and certain
other operations at different rate.
Example - Digital Camera
Challenges
Challenges
Meeting Deadlines
➢Meeting deadline requires high speed
hardware. > Will more cost.
Hardware Selection
➢Consider Memory >More onchip memory >
Cost more > tradeoff > Expansion slot > User
decide.
Challenges
Is it upgradable and maintainable?
➢Mobile Phone > Upgradable software
Will it work?
➢Through rigorous testing
➢ If the product has entered, it has to be
constantly monitored.
Categorization of Embedded Systems
Real-Time Embedded Systems
➢ It is strictly time specific which means these embedded systems
provides output in a particular/defined time interval.
➢ It has to provide quick response in critical
2 types:
Soft Real Time Embedded Systems:
➢ Time/deadline is not so strictly followed.
➢ If deadline of the task is passed (means the system didn’t give result
in the defined time) still result or output is accepted.
Hard Real-Time Embedded Systems:
➢ Time/deadline of task is strictly followed.
➢ Task must be completed in between time frame (defined time
interval) otherwise result/output may not be accepted.
Ex:
Military usage in defense sector
Medical usage in health sector
Stand Alone Embedded Systems
• Stand Alone Embedded Systems are independent
systems which can work by themselves they don’t
depend on a host system.
• It takes input in digital or analog form and
provides the output.
Examples
• MP3 players
• Microwave ovens
• calculator
Networked Embedded Systems
• Networked Embedded Systems are connected to
a network which may be wired or wireless to
provide output to the attached device.
• They communicate with embedded web server
through network.
Examples
• Home security systems
• ATM machine
• Card swipe machine
Mobile Embedded Systems
• Mobile embedded systems are small and easy to
use and requires less resources.
• They are the most preferred embedded systems.
• In portability point of view mobile embedded
systems are also best.
Examples
• MP3 player
• Mobile phones
• Digital Camera
Small Scale Embedded Systems
• These are designed using an 8-bit or 16-bit
micro-controller.
• They can be powered by a battery.
• The processor uses very less/limited resources
of memory and processing speed.
• Mainly these systems does not act as an
independent system they act as any
component of computer system but they did
not compute and dedicated for a specific task.
Medium Scale Embedded Systems
• Medium Scale Embedded Systems are designed using
an 16-bit or 32-bit micro-controller.
• These medium Scale Embedded Systems are faster
than that of small Scale Embedded Systems.
• Integration of hardware and software is complex in
these systems. Java, C, C++ are the programming
languages are used to develop medium scale
embedded systems.
• Different type of software tools like compiler,
debugger, simulator etc are used to develop these type
of systems.
Sophisticated or Complex Embedded
Systems
• These types of systems are designed using
multiple 32-bit or 64-bit micro-controller.
• These systems are developed to perform large
scale complex functions.
• These systems have high hardware and
software complexities.
• We use both hardware and software
components to design final systems or
hardware products.
Software for Embedded Systems
➢Different from general purpose software.
➢Software should interact with physical world.
➢Does not terminate.
Normally embedded software
➢Takes time when you perform too many tasks.
➢Consumes more power
Difference – Embedded Vs General Purpose
Software
Feature Embedded Software General Purpose
Software
Dedicated, specific
Function Multiple, flexible tasks
tasks
Tied to particular Runs on general
Hardware Dependency
hardware hardware
Resource Constraints Highly constrained Less constrained
User Interface Minimal or none Rich, user-friendly
Rarely updated in the
Update Frequency Frequently updated
field
Car engine control, Word processors, web
Examples
pacemaker firmware browsers
Requirements
➢Reliability (Expect to run without human
intervention).
➢Cost effectiveness
➢Low power consumption
➢Efficient use of memory
➢Performance
Features
➢Timeliness (Should meet deadlines)
➢Concurrency (multitasking)
➢Liveness (Accept input at any time)
➢Interfaces (Able to handle various interfaces)
Points to consider – Developing
software
➢ Determine requirements.
➢ Design system architecture.
➢ Select OS (if required) else choose the platform.
➢ Code the application (decide the language).
➢ Optimize the code according to the requirements.
➢ Verify the software in both the host/target
system.
Software Development Process
➢Consider ARM Keil uVision®.
➢It includes an editor, assembler, compiler, and
simulator. Furthermore, both can be used to
download and debug software on a real
microcontroller.
Software Development Process
➢ To develop software, we first use an editor to create
our source code.
➢ Source code contains specific set of sequential
commands in human-readable-form.
➢ Next, we use an assembler or compiler to translate our
source code into object code.
➢ On ARM Keil uVision® we compile/assemble by
executing the command Project->Build Target.
➢ Object code or machine instructions contains these
same commands in machine-readable-form.
➢ Most assembly source code is one-to-one with the
object code that is executed by the computer.
Software Development Process
➢ When simulating, there is no need to download, we
simply launch the simulator by executing the Debug-
>Start Debug Session command.
➢ The simulator is an easy and inexpensive way to get
started on a project.
➢ In a real system, we choose the real microcontroller via
its JTAG debugger as the target.
➢ In this way the object code is downloaded into the
EEPROM of the microcontroller.
➢ The JTAG is both a loader and a debugger.
➢ After downloading we can start the system by hitting
the reset button on the boardor we can debug it by
executing Debug->Start Debug Session command in the
uVision® IDE.
Software Development Process
➢ For example, when programming in a high level
language like C or Java, one line of a program can
translate into several machine instructions.
➢ In contrast, one line of assembly code usually
translates to exactly one machine instruction.
➢ The assembler/compiler may also produce a
listing file, which is a human-readable output
showing the addresses and object code that
correspond to each line of the source program.
➢ The target specifies the platform on which we will
be running the object code.
➢ When testing software with the simulator, we
choose the Simulator as the target.
Software Development Process
Challenges – Embedded Software
➢ Power consumption
➢Languages
➢Improve dynamic & static performance
➢Easy to understand
➢Upgradability &flexibility.
Design Tradeoff
• Many of the design metrics are mutually conflicting.
• Improving one may degrade others (ex. Power,
performance, size and NRE cost).
• Often requires expertise in both hardware and
software to take a proper decision.
• Expertise in hardware may indicate the types of co-
processor or I/O processor to use for specific
applications.
• Expertise in software is required to identify parts of the
implementation that need to be implemented in
software and run on the microcontroller
• Hardware/software co-design becomes important.
Embedded Product - Design challenge
• 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
Design challenge
• Common 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
Time to Market Design
➢ Ultimate goal will be to generate some profit out
of it.
➢ The quality of the product becomes secondary.
➢ If you delay in the launch of a product, you may
incur a big loss.
➢ This is very crucial design metrics. Requires
exhaustive market study and analysis.
➢ We can define a market window within which it is
expected to have the highest sales.
➢ Any delay can result in drastic reductions in sales.
Time to Market design
Loss due to delayed market
Loss due to delayed market
➢ Area of the triangle: ½ * base * height (Assume
equilateral triangle)
➢ Area(On-time) = ½ * 2W * W = W2
➢ Area (delayed) = ½ * (2W – D) * (W – D)
➢ Revenue loss = Difference in area
Revenue loss=Area (On-time)−Area (Delayed)
Substitute the formulas: =W2−1/2(2W−D)(W−D)
=2W2−3WD+D2
Expand the fraction: =W2−(W2−3/2WD+1/2D2)
Finally = =D/2(3W−D)
Loss due to delayed market
➢Percentage revenue loss = revenue loss/actual
area
= D(3W-D)/2/W2 * 100
Ex:
2W = 52 weeks, D = 4 weeks -> Loss = 22%
2W = 52 weeks, D = 10 weeks -> Loss = 50%
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
Performance Design Metric
➢ Most widely used, but can also be most misleading
➢ Must be careful in the evaluation.
Some of the measures are
➢ Clock frequency, MIPS - not a good measure.
MIPS (Million Instruction per Second)
= (Instruction Count/Execution Time * 106)
Where
Execution Time = (Instruction Count * CPI)/Clock Rate
Then MIPS becomes, Clock rate/CPI * 106
➢ MIPS ratings are valid to compare the performance of two or more
processors provided that the following conditions are satisfied:
➢ Same program is used
➢ The same ISA is used
➢ The same compiler is used
➢ Latency
➢ Throughput – Tells how many units of information a system can process in
a given amount of time. For embedded system, least bother.