Citation preview
characteristics, System model, Microprocessor Vs Microcontroller,
current trends and
challenges, hard and soft real time systems, Embedded product
development, Life Cycle
Management (water fall model), Tool Chain System, Assemblers,
Compilers, linkers, Loaders,
Debuggers Profilers & Test Coverage Tools
KTU NOTES
4.1 Introduction to Embedded System
An embedded system is an electronic system, which includes a single
chip
microcomputers (Microcontrollers) like the 8051or ARM.
It is configured to perform a specific dedicated application.
Software is programmed into the on chip ROM of the single chip
computer. This
software is not accessible to the user , and software solves only a
limited range of
problems.
Here the microcomputer is embedded or hidden inside the
system.
Every embedded microcomputer system , accepts inputs, performs
computations,
and generates outputs and runs in “real time.”
(For Example a typical automobile now a days contains an average of
ten
microcontrollers. In fact, modern houses may contain as many as 150
microcontrollers and
on average a consumer now interacts with microcontrollers up to 300
times a day. General
areas that employ embedded systems covers every branch of day to
day science and
technology, namely Communications, automotive, military, medical,
consumer, machine
control etc...
Ex: Cell phone , Digital camera , Microwave Oven,MP3 player,
Portable digital assistant & automobile antilock brake system
etc.) 4.2 Features of an Embedded System
An embedded system has certain specialties when compared to a
normal computer .
(i).Embedded systems are dedicated to specific tasks.
(ii).Embedded systems are supported by a wide array of processors
and processor
architectures
(iii). Embedded systems are usually cost sensitive.
(iv). Embedded systems have realtime constraints.
(v).If an embedded system use an operating system , it is most
likely using a realtime
perating system (RTOS), but not Windows 9X, Windows NT, Windows
2000, Unix, Solaris,
etc.
(vi) Embedded systems often have power constraints.
(vii). Embedded systems must be able to operate under extreme
environmental conditions.
(viii). Embedded systems utilizes fewer system resources than
desktop systems.
(ix). Embedded systems often store all their object code in
ROM.
(x). Embedded microprocessors often have dedicated debugging
circuitry.
(xi).Embedded systems have Software Up gradation capability.
KTU NOTES
4.3 Characteristics of an Embedded System: The important
characteristics of an embedded system are
Speed (bytes/sec) : Should be high speed
Power (watts) : Low power dissipation
Size and weight : As far as possible small in size and low
weight
Accuracy (% error) : Must be very accurate
Adaptability : High adaptability and accessibility.
Reliability : Must be reliable over a long period of time.
4.4 Application Areas of Embedded Systems:
The embedded systems have a huge variety of application domains
which varies
from very low cost to very high cost and from daily life consumer
electronics to
industry automation equipments, from entertainment devices to
academic
equipments, and from medical instruments to aerospace and weapon
control
systems.
So, the embedded systems span all aspects of our modern life. The
following table
gives the various applications of embedded systems. S.No Embedded
System Application
1 Home Appliances Dishwasher, washing machine, microwave,
Topset
box, security system , HVAC system, DVD, answering machine, garden
sprinkler systems etc..
2 Office Automation Fax, copy machine, smart phone system, modern,
scanner, printers.
3 Security Face recognition, finger recognition, eye recognition,
building security system , airport security system, alarm
system.
4 Academia Smart board, smart room, OCR, calculator, smart cord. 5
Instrumentation Signal generator, signal processor, power
supplier,Process instrumentation, 6 Telecommunication Router, hub,
cellular phone, IP phone, web camera 7 Automobile Fuel injection
controller, antilocking brake system,
air bag system, GPS, cruise control. 8 Entertainment MP3, video
game, Mind Storm, smart toy. 9 Aerospace Navigation system,
automatic landing system, flight attitude
controller, space explorer, space robotics. 10 Industrial
automation Assembly line, data collection system,
monitoring systems on pressure, voltage, current, temperature,
hazard detecting system, industrial robot.
KTU NOTES
4
11 Personal PDA, iPhone, palmtop, data organizer. 12 Medical CT
scanner, ECG , EEG , EMG ,MRI, Glucose
monitor, blood pressure monitor, medical diagnostic device.
13 Miscellaneous: Elevators, tread mill, smart card, security door
etc. 4.5 Microprocessors versus Microcontrollers:
4.6 Recent trends in Embedded systems
With the fast developments in semiconductor industry and VLSI
technology ,one can find
tremendous changes in the embedded system design in terms of
processor speed , power ,
communication interfaces including network capabilities and
software developments like
operating systems and programming languages etc.
Processor speed and Power :
With the advancements in processor technology ,the embedded systems
are now
days designed with 16,32 bit processors which can work in real time
environment.
These processors are able to perform high speed signal processing
activities which
resulted in the development of high definition communication
devices like 3G
mobiles etc.
Also the recent developments in VLSI technology has paved the way
for low power
battery operated devices which are very handy and have high
longevity.
Also , the present day embedded systems are provided with higher
memory
capabilities ,so that most of them are based on tiny operating
systems like android.
KTU NOTES
Communication interfaces :
Most of the present day embedded systems are aimed at internet
based applications.
So,the communication interfaces like Ethernet, USB, wireless LAN
etc.have become
very common resources in almost all the embedded systems.
The developments in memory technologies also helped in porting the
TCP/IP
protocol stack and the HTTP server software on to the embedded
systems. Such
embedded systems can provide a link between any two devices any
where in the
globe.
Operating systems :
With recent software developments ,there is a considerable growth
in the
availability of operating systems for embedded systems.
Mainly new operating systems are developed which can be used in
real time
applications.
There are both commercial RTOSes like Vx Works , QNX,WINCE and open
source
RTOSes like RTLINUX etc.
The Android OS in mobiles has revolutionized the embedded
industry.
Programming Languages :
There is also a remarkable development in the programming
languages.
Languages like C++, Java etc. are now widely used in embedded
application
programming. For example by having the Java virtual machine in a
mobile phones
,one can download Java applets from a server and can be executed on
your mobile.
In addition to these developments, now a days we also find new
devices like ASICs
and FPGAs in the embedded system market. These new hardware devices
are
popular as programmable devices and reconfigurable devices.
4.7 Challenges in Embedded Systems
1. Amount and type of hardware needed. Optimizing various hardware
elements for a particular design.
2. Taking into account the design metrics Design metrics examples
–power dissipation, physical size, number of gates
and engineering, prototype development and manufacturing costs. 3.
Optimizing the Power Dissipation.
Clock Rate Reduction and Operating Voltage Reduction 4. Disable use
of certain structural units of the processor to reduce power
dissipation
the processor to reduce power dissipation. Control of power
requirement, for example, by screen autobrightness control
KTU NOTES
6
5. Process Deadlines Meeting the deadline of all processes in the
system while keeping the memory,
power dissipation, processor clock rate and cost at minimum is a
challenge. 6. Flexibility and Upgradeability
Ability to offer the different versions of a product for marketing
and offering the product in advanced versions later on.
7. Reliability Designing reliable product by appropriate design and
thorough testing,
verification and validation is a challenge. 8. Testing,
Verification and Validation
Testing – to find errors and to validate that the implemented
software is as per the specifications and requirements to get
reliable product.
4.8 Realtime embedded systems
An embedded system which gives the required output in a specified
time or
which strictly follows the time dead lines for completion of a task
is known as
a Real time system.
i.e a Real Time system , in addition to functional correctness,
also satisfies the
time constraints .
There are two types of Real time systems.(i) Soft real time system
and (ii) Hard
real time system.
1. Soft RealTime system :
A Real time system in which ,the violation of time constraints will
cause only the
degraded quality, but the system can continue to operate is known
as a Soft real
time system.
In soft realtime systems, the design focus is to offer a guaranteed
bandwidth to
each realtime task and to distribute the resources to the
tasks.
Ex: A Microwave Oven , washing machine ,TV remote etc. 2. Hard
RealTime system :
A Real time system in which ,the violation of time constraints will
cause critical
failure and loss of life or property damage or catastrophe is known
as a Hard
Real time system.
These systems usually interact directly with physical hardware
instead of through a human being
Ex: Deadline in a missile control embedded system , Delayed alarm
during a Gas
leakage , car airbag control system , A delayed response in
pacemakers ,Failure
in RADAR functioning etc
4.9 Embedded Product Development Life Cycle (EDLC)
EDLC is Embedded Product Development Life Cycle It is an Analysis –
Design – Implementation based problem solving approach for
embedded systems development. There are three phases to Product
development:
Analysis involves understanding what product needs to be developed
Design involves what approach to be used to build the product
Implementation is developing the product by realizing the
design.
Need for EDLC
EDLC is essential for understanding the scope andcomplexity of the
work involved in embedded systems development
It can be used in any developing any embedded product EDLC defines
the interaction and activities among variousgroups of a
product
development phase. Example:project management, system design
Objectives of EDLC
1. Ensure that high quality products are delivered to user
Quality in any product development is Return On Investment achieved
by the product
The expenses incurred for developing the product the product are:
Initial investment Developer recruiting
Training Infrastructure requirement related
2. Risk minimization defect prevention in product development
through project
management
In which required for product development ‘loose’ or ‘tight’
project management
Project management is essential for predictability coordination and
risk
minimization
Resource allocation is critical and it is having a direct impact on
investment
Example: Microsoft @ Project Tool
3. Maximize the productivity Productivity is a measure of
efficiency as well as Return On Investment This productivity
measurement is based on total manpower efficiency Productivity in
which when product is increased then investment is fall down Saving
manpower
Different Phases of EDLC: The following figure depicts the
different phases in EDLC:
Need
The need may come from an individual or from the public or from a
company. Conceptualization
Defines the scope of concept, performs cost benefit analysis and
feasibility study and prepare project management and risk
management plans.
KTU NOTES
9
Analysis The product is defined in detail with respect to the
inputs, processes, outputs, and
interfaces at a functional level. Design
The design phase identifies application environment and creates an
overall architecture for the product.
Development and Testing Development phase transforms the design
into a realizable product.
Deployment Deployment is the process of launching the first fully
functional model of the product
in the market. Support
The support phase deals with the operational and maintenance of the
product in the production environment.
Upgrades Deals with the development of upgrades (new versions) for
the product which is
already present in the market. Retirement/Disposal
The retirement/disposal of the product is a gradual process. This
phase is the final phase in a product development life cycle where
the product is
declared as discontinued from the market.
4.10 Waterfall Model Linear or waterfall model is one of the EDLC
models which adopted in most of the
olden systems.
KTU NOTES
10
In this approach each phase of EDLC (Embedded Development Product
Lifecycle) is executed in sequence.
It establishes analysis and design with highly structured
development phases. The execution flow is unidirectional. The
output of one phase serves as the input of the next phase All
activities involved in each phase are well planned so that what
should be done in
the next phase and how it can be done. The feedback of each phase
is available only after they are executed. It implements extensive
review systems to ensure the process flow is going in the
right direction. One significant feature of this model is that even
if you identify bugs in the current
design the development process proceeds with the design. The fixes
for the bug are postponed till the support phase.
Advantages Product development is rich in terms of:
Documentation Easy project management Good control over cost &
Schedule
Drawbacks It assumes all the analysis can be done without doing any
design or implementation The risk analysis is performed only once.
The working product is available only at the end of the development
phase Bug fixes and correction are performed only at the
maintenance/support phase of the
life cycle.
Introduction:
Embedded devices cannot operate without the embedded software. A
wide range of software tools to develop embedded system are
available.
Since Embedded software development requires an even wider range of
tools
like editors, compilers, debuggers, profilers, etc to facilitate
greater productivity.
Tool Chain System:
The generic tool chain for developrnent of embedded applications is
shown in the figure below. It involves the integration of many
tools. A brief discretion of these tools is explained as
follows:
1. Editor: An editor is a software application used for editing
plain text. Editors are often provided with operating systems or
software
development packages, and can be used to change configuration files
and programming language source code.
KTU NOTES
11
Editor generates source code which can be further compiled and then
executed for proper functioning.
2. Preprocessor: Preprocessor directives are lines included in the
code of programs that
are not program statements but directives for the preprocessor. The
preprocessor is executed before the actual compilation of
code
begins; therefore the preprocessor understands all these directives
and translated into extended source code.
3 . Cross Assembler: Cross Assembler is used when source code is in
assembly language. A program written in assembly language consists
of a series of
instructions (mnemonics) that correspond to a stream of executable
instructions.
Assembler creates object code by translating mnemonics into machine
language.
4. Cross Compiler: Compiler is used when source code is in
highlevel language. A compiler is a computer program (or set of
programs) that translates
text written in a high level language into object code. 5.
Linker:
A linker is a program that takes one or more objects generated by
compilers and assemblers and combine them into a single executable
program.
Many programming languages allow writing different pieces of code,
called modules, separately.
In addition to combi1iing modules, a linker also replaces symbolic
addresses with real addresses.
6. Locator: It does the linking and loading of the object programs.
It is responsible for generating the executable program as needed
by
the target programmers. 7. Debuggers:
These tools are used for targeting, validating (error checking and
correction) and performance monitoring.
Debugging tools can be categorized into software debuggers and
hardware debuggers.
8. Loader/Target Programmers: A Loader is an operating system
utility that copies programs from a
storage device to main memory, where they can be executed. In
addition to copying a program into main memory, the loader can
also
replace virtual addresses with physical addresses. Most loaders are
transparent, i.e, they cannot be executed directly, but the
operating system uses them when necessary.
KTU NOTES
13
Profilers Profilers are used to find out what parts of the code
have been executed and how
much time was spent in each part. Running a profiler should be the
first step whenever you discover that performance is
not good enough and you want to optimize parts of your code. The
profiler tell you where the program is spending most of its
time.
Test Coverage tool
A coverage tool can tell you what part of your code has been
exercised by a test run or an interactive session. This helps you
to:
o identify dead code o missing tests
KTU NOTES