Professional Documents
Culture Documents
UNIT-II
PROCESS OF EMBEDDED
SYSTEM DEVELOPMENT
Unit – II 2.1
Paavai Institutions Department of ECE
CONTENTS
2.1 Development process
2.1.1 The Waterfall Model
2.2 Requirements Engineering
2.3 Design
2.3.1 Design Tradeoffs
2.3.2 Co-design
2.3.3 Hardware Design
2.3.4 Software Design
2.4 Implementation
2.5 Integration and testing
2.5.1Types of Testing
2.5.2 Testing on the Host System
2.5.3 Simulation Engineering
2.5.4 Testing on the Target System
2.5.5 Environmental Testing
2.6 Packaging
2.7 Configuration management
2.8 Managing Embedded system development Project
2.8.1 Project Proposal Preparation
2.8.2 Project Planning
2.8.3 Providing the Development Infrastructure
2.8.4 Co-design and Co-verification
2.8.5 Risk Management
2.8.6 Quality Management
Unit – II 2.2
Paavai Institutions Department of ECE
TECHNICAL TERMS
1. PROM
This is normally read-only memory that retains its information until it is exposed to ultraviolet
light. You can often tell a chip is an EPROM by the small window on it that lets ultraviolet light
though to program the EPROM.
A type of multitasking that allows tasks to be given priority levels. The operating system can
then allocate resources to these tasks based on priority level, thus preempting one task from
running if a more important task is waiting for a particular resource.
4. Emulator
This is usually a program that performs the same operation of another program or a piece of
hardware. For example, there are programs that allow a PC to act like a Commodore 64, a
Nintendo Entertainment System, or even a Macintosh. These emulators are often developed by
talented programmers just to prove that something can be done.
5. Emulation
The process of using a computer program to mimic the behaviors of another embedded
systems.
A way of encoding 256 characters in binary, much like ASCII, but used mainly on
mainframes. Most of the time EBCDIC is only mentioned in translations between EBCDIC and
ASCII.
Unit – II 2.3
Paavai Institutions Department of ECE
The goal of every designer should be to develop a quality product. In descriptive terms, the quality
of a product is reflected in its meeting all the customer requirements---functional requirements, performance
requirements and reliability requirements. To deliver quality product, a systematic approach to the development
is a must. This systematic approach is reflected in defining a "process for the development . Process is
essentially a detailed step-by-step procedure.
As shown in Fig. 2.1, process takes the raw material as input and produces the finished product. For
example, if a car has to be manufactured, the raw material is the various parts such as the chassis, engine, etc.
The finished product is the car. The process is the step-by-step procedure to assemble the various parts and then
test the assembled car to check whether it meets all the requirements.
Unit – II 2.4
Paavai Institutions Department of ECE
As shown in Fig. 2.2, for embedded system development, the development process defines the step- by-
step procedure to convert the vague problem definition into a working product. In embedded systems, there are
two components-hardware and software. We need to define detailed processes for both hardware and software
development.
In commercial embedded system projects that do not involve very high-end research, the waterfall model is
used. In waterfall model, che development process is divided into the following five stages
• Requirements engineering
• Design which involves hardware-software partitioning, hardware design and software design
In requirements analysis phase, you need to have a series of discussions with the client to obtain the
requirements such as
Unit – II 2.6
Paavai Institutions Department of ECE
• The processing to be done lay the system along with timing restrictions, if any
• The size of the embedded system (if there are any limitations on the size)
• Standards to be followed. Every industry segment specifies standards. These statutory standards need to
be obtained from the client.
It may not be possible to obtain all the requirements in one round of discussion with the client. While
carrying out the requirements analysis, you need to obtain enough details so that later on, you will be in a
position to do the hardware design and software design. At the end of every round of discussion, the
development team has to identify whether more information is required, and if so, go back to the client and
discuss further. After a few rounds of discussion, you may be in a position to say that all the requirements of the
client are clearly understood.
Once these requirements are obtained, they need to be documented and a document called "System
Requirements Specification" has to be prepared. This document clearly spells out all the information obtained
from the client. As this document will be the reference for carrying out the design and subsequently the testing
each and every specification needs to be documented. This document needs to be divided into two parts-one part
covering all the functional requirements, i.e. what the system functional is supposed to do and the second part
covering all the non-functional requirements. The details of non- requirements are given below:
Reliability: Always, the goal is to develop a reliable embedded system. However, you need to specify the
reliability in quantitative terms. For instance, Mean Time Between Failures (MTBF) is a measure of reliability
of a system. MTBF is specified in number of hours, say 49,000 hours. If the system failed 10 times during 1,000
hours of operation, the MTBF value is 100 hours.
Delivery time: The client/marketing department may insist on delivering the product in a specific time.
Particularly, in product development, the "Time to Market is of importance. Many design decisions such as
choice of processor, use of an operating system are influenced by the delivery time. You may like to use a new
processor that is released into the market, but if it takes a few months to obtain the development tools of that
Unit – II 2.7
Paavai Institutions Department of ECE
Debugging of embedded systems is an important issue. The processor manufacturers used to give
proprietary interfaces (some pins on the processor) for carrying out debugging. Joint Test Action Group (JTAG)
evolved a standard protocol known as JTAG protocol or IEEE 1149.1 protocol for debugging. Nowadays,
clients insist on having JTAG support for your embedded system. The Integrated circuits used in the circuit
must be JTAG-compliant, in such a case. JTAG is very useful for testing embedded systems installed in the
field.
The client may also insist on following standards for documentation and coding. In such case, need to
obtain the relevant standards and follow them during the development life cycle.
Safery requirements: If the embedded system is used in nuclear planes, aircraft, hospitals, military equipment
etc.. safety regulations have to be met. You need to study the relevant safety standards incorporate the safety
features. The safery regulations include FCC regulations for radio power emission, Electro Magnetic
Interference (EMI) regulation, etc.
Security: As the embedded systems are now being networked, providing security features to these systems have
become essential. There may be a need to encrypt the data being transmitted by the embedded system. Also,
access to an embedded system for remote control needs to be restricts through the use of a username and
password. Such security measures need to be built into the system The development team needs to obtain the
security requirements from the client. For example stringent security measures need to be implemented for
financial transactions using smart cards.
The System Requirements Specifications document needs to address all these issues. Though the
requirements are documented using data flow diagrams, state transition diagrams etc., the document should
Unit – II 2.8
Paavai Institutions Department of ECE
explain the requirements in simple and unambiguous English as the client may not be conversant with high-tech
representations.
The next phase requirements validation. This phase is to ensure that the requirements specifications
document captures all the requirements of the user and also to ensure that the required embedded system can be
designed and developed. You need to discuss with hardware engineers and software engineers to ascertain
whether all the specifications could be met. Then you need to submit the document to the client, resolve any
differences and obtain the client's approval. Validation ensures than there is no communication gap between the
client and the development team.
Note that in many embedded projects, the performance requirements are not clearly defined by client.
For instance, the initial specification may be that a particular task has to be completed within 10 in sec., but later
on it may be changed to 5 msec. This leads to lot of problems—sometimes the hardware has to be thrown out
and the new hardware is designed, just because one performance parameter cannot be met by the previously
designed hardware. To avoid such
problems, the development team has to focus on the performance requirement engineering . If you are not sure
whether a particular specification can be met, the hardware engineers need to study the relevant data sheets of
the Integrated Circuits (ICs) to ascertain the timings, the software engineers may have to do simulation studies
to study the algorithmic complexity, and the project manager may have to take the opinion of an expert before
committing on the performance parameters to the client.
2.3.DESIGN
The validated system specifications document has to be converted into design. In this phase, the
engineers need to carry out a paper design of both hardware and software. To start with, you need to separate
out the hardware functionality and the software functionality. This is a complex activity because sometimes, it is
difficult to decide whether a particular functionality has to be implemented in hardware or software.
2.3.1 Design Tradeoffs
During designing stage, the design engineers have many options for selection of a processor, an
operating system etc. You need to study the various design alternatives keeping in view the design goals. The
design goals are:
To reduce the size and cost of the system to the extent possible
Unit – II 2.9
Paavai Institutions Department of ECE
Which processor to use? An 8-bit micro-controller with on-chip memory and peripherals is sufficient to
meet all the functional requirements, but you are not sure whether the performance requirements will be
met. A 16-bit processor will certainly meet the performance requirements, but the cost and size will go
up. Will you take a small risk and go ahead with a micro-controller?
Is an FPGA required? You can reduce the size of the system by designing an FPGA. In addition to
reduction in size, it improves the reliability and reduces the power consumption. However, the cost and
time required to do the FPGA design are high, and taking the FPGA path may cause a delay in the
project.
Is it necessary to port an embedded/real-time operating system on the target system? You can write your
own kernel if the application is very small. If the application is complex, an operating system is worth it.
But if you have to pay royalty for each copy of the OS, your per- system cost will go up.
There are no simple answers to such questions. Keeping in View cost and size of the system and the
development time, the project manager, in association with the engineers, needs to take a conscious decision.
The design process can be divided into hardware-software partitioning or co-design, hardware design and
software design.
2.3.2 Co-design
Co-design involves partitioning the design into hardware and software. Sometimes, it is difficult to decide
whether functionality has to be implemented in hardware or software. Consider an example you need to
implement Cyclic Redundancy Check (CRC) calculation algorithm. Which is a better choice: hardware or
software? Note that CRC calculation involves taking a bit stream, say 1000 bits and calculation of 16 bits or 32
bits based on an algorithm. Hardware implementation results in a fast calculation of CRC as compared to
software implementation. However hardware implementation means an additional IC and hence more space on
the board, more power consumption and also inflexibility because a change in the algorithm calls for a change
Unit – II 2.10
Paavai Institutions Department of ECE
in the entire hardware board. On the other hand, software implementation results in flexibility in changing the
algorithm, but it may cause processing delay. Based on your timing requirements and cost/site requirements,
you need to take a decision. Hence, decision on implementation in software or hardware needs to be taken
keeping in view the following issues:
Speed of execution: If execution time is the most important issue, hardware implementation may be a
better choice.
Flexibility for making changes: If flexibility is required then software implementation is a better
choice, as it is easier to make changes in the software rather than in the hardware.
Power consumption: Software implementation does not involve additional components. On the
contrary, hardware implementation requires additional ICs and hence more power consume
Memory: If the embedded system is constrained for memory, hardware is a better choice
Cost: Reproduction of hardware is costlier as you need to keep stock of the components. Assembly of
the components and testing of every board take time. Software reproduction is just copying the software
onto a memory chip.
Intel's 80386 is an integer-only processor. The computers built on this processor initially used to do the
floating-point operations through software and hence the floating point calculations were very slow.
Subsequently Intel introduced the 80387 floating-point processor that made the floating point operations much
faster (almost 10 inc faster). Certainly, the 80387 processor increased the cost but give much higher
performance.
Another example is that of graphics accelerators used in video game systems. If there is no graphics
accelerator hardware, the graphics rendering is done through the software, but it results in poor performance.
When graphics rendering is transferred to the hardware then the rendering effects are more attractive and fast.
Using Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs) and System-on-
Chip (SoC) solutions, we can build re-configurable hardware and hence we need to study using PLDs, FPGAs
and SoC in the hardware to reduce the size, cost and power consumption to the extent possible.
2.3.3 Hardware Design
After the hardware-software partitioning is done, the hardware design and software design need to be
carried out. The hardware design involves:
Unit – II 2.11
Paavai Institutions Department of ECE
Support for languages: You need to find out which high level languages are supported. C and C++
are generally supported. Support for ANSI C standard, the latest being 1999 version, called C99, has
to be ensured. If your application demands development in Java, ensure that Java support is there. If
you are developing an application for defence and ADA needs to be used as the programming
language, the OS should have the support for ADA language.
Support for POSIX function calls: IEEE POSIX 1003.1c standard specifies the function calls for
embedded/real-time systems. Conforming to this standard will ensure that your application software
is portable.
Footprint: The footprint or the memory occupied by the OS needs to be found out. A few kilobytes
is all that is required for the kernel, but you may need to include a number of device drivers, virtual
machines, protocol stacks etc. The OS, software components and the application software together
decide the total memory requirement of your embedded system.
Software components: The software components provided by the vendor also need to be checked
up. These software components include protocol stack, graphics libraries, device drivers, debugging
tools, virtual machines, web server, etc.
Source code/object code: When you buy a commercial OS development system, you may get only
the object code along with the function call library. For additional price, you may get the source code
as well. You can download open source operating systems (such as Embedded Linux, RTLinux etc.)
which have complete source code listings.
Licensing fee: Licensing fee: If you use a commercial operating system, you need to pay royalty for
run-time license i.e., for each embedded system you sell, you need to pay royalty to the OS vendor.
For some commercial operating systems, you need to pay only one time fee, there will be no royalty.
If you use the GNU Public License (GPL) software, there will be no royalty.
2.4 IMPLEMENTATION
The hardware implementation and the software implementation go in parallel. The hardware
implementation involves:
Assembling the components and testing the individual modules on the populated PCB
Unit – II 2.13
Paavai Institutions Department of ECE
Unit – II 2.14
Paavai Institutions Department of ECE
program works correctly because you know for which inputs the system will hang! So has definition is not
correct, if you use this definition, you will not be able to bring out the defects in the system. Now consider the
following definition:
"Testing the process to prove that the software does not work correctly"
This sounds a crazy definition, but if you use this definition while testing your system, you will try your
best to bring out as many defects as possible. A good test engineer will follow this definition for resting any
system. But how long you keep on testing the system to say that it is bug-free? It is difficult to answer this
question, because testing can never be completed. So, a practical definition of testing is as follows:
"Testing is the process to reduce the risk associated with the residual defects"
If you follow this definition, you will uncover many bugs; and even if some bugs are still present in the
software but their impact is minimal, you can release the software to the client.
While testing the software, the test engineers have to keep a record of all the defects or bugs found in it.
Each bug has to be classified as minor, major and critical. A minor defect does not affect the functionality of the
product. An example of a minor defect is a spelling mistake in a user prompt. A major defect affects the
performance of the system, but the system will continue to work. A critical defect halts the system. In embedded
systems, it needs to be ensured that there are no critical or major defects. To declare that the testing is complete,
a graph can be drawn which shows the number of defects found, say per day, as shown in Fig. 4.5. You need to
fix a threshold on the number of defects, and if the number of defects found per day is less than the threshold
continuously for, say three days, you can declare that the testing is complete.
Unit – II 2.15
Paavai Institutions Department of ECE
Unit – II 2.16
Paavai Institutions Department of ECE
applications or when safety is a major concern, you need to conduct the field trial in extremely controlled
conditions.
Acceptance testing: Finally, when you are satisfied that the system is working as per the requirements of the
client, you can offer it to the client. The client will conduct the testing, perhaps using the black box testing
approach, to check whether it meets all the requirements as specified in the System Requirements Specifications
document. If he clears the equipment, your dollars in are your hands.
Regression testing: After testing the system for a considerable amount of time (say, a few weeks), you find
suddenly one bug. You will now modify the software to remove the bug. What is the guarantee that this
modification has not affected other parts of the program? There is no guarantee. To ensure that modification in
one portion of the code has ro ill effect on other portions of the code, you need to carry out once again the
testing of the total system. This is known as regression testing. Generally, you use a set of test cases for
regression testing to test the software whenever it is modified.
When is testing complete ?
This is a very difficult question to answer. As you keep testing the system, you uncover some bugs and
then you rectify the bugs. Certainly, the number of bugs found per week keeps reducing, but once in a while you
will still find a bug. You can keep track of the number of bugs or defects found per day (or week) and draw a
graph as shown in Fig. 4.5 and then using a reasonable threshold on the number of defects per day/week, you
can declare that the testing is complete. As reliability is the most important requirement for embedded systems,
you need to by keep track of the number of failures and time to repair the system. You need to analyze these
times to calculate the values of Mean Time Between Failures (MTBF), Mean Time To Repair (MT TR) and
Mean Time to Fail (MTTF). The relation among these values is shown in Fig. 2.6.
Unit – II 2.17
Paavai Institutions Department of ECE
Testing on the host system is done to validate the software. Using the tools such as ROM emulator, code
simulator, In-Circuit Emulator, etc. you need to test your code. The following points need to be kept in mind
while testing the software on the host system.
a. The word lengths of the host system and the target processor may be different. For example, the host
system may have a word length of 32 bits whereas the target processor word length may be 16 bits only.
b. The byte order of the host and target processor may be different: one may be using the big-endian format
and the other may be using the little-endian format.
Testing on the host system has the following limitations:
The complete functionality is not tested as the target hardware is not used.
Functional requirements
Performance requirements
Environmental requirements
If the software is ported on to the target hardware and if everything works, it is a miracle! If it does not
work, it may be due to a hardware problem or a software problem. Testing the embedded system by integrating
the hardware and software is called co-verification. Co-verification is an extremely difficult task because it is
difficult to pinpoint where the problem is. To solve this issue, it is better to build the system incrementally. To
start with, only the software that does a specific task (say initializing the hardware and making a LED glow) has
to be ported and checked. If it works then add another software module and then carry out the testing. This
incremental approach will make debugging easier.
2.5.5 Environmental Testing
Many embedded systems have to work in hazardous environments. In industrial control applications, the
systems have to work in a temperature range of 40 to +70° C. In airborne equipment, the systems have to
withstand bump, vibration etc. Such systems also need to be tested testing for these environmental
specifications. The following environmental specifications are generally applicable to the military equipment
and mobile devices:
Operating temperature: -20 to +55° C
Storage temperature: -20 to +70° C
Altitude: 4000 meters
Humidity: 95% at 40° C
Vibration: ± 20 m/sec² constant acceleration
Rapid temperature cycling: Drop test: 4 cycles (1 hour 26 minutes cycle)
Drop test: 6 drops on each face
Toppling: 4 topplings on wooden platform
Bump:500 bumps, at the rate of 2 to 4 bumps per second.
Special testing laboratories carry out these tests. The system under test is kept in a special environmental
Unit – II 2.19
Paavai Institutions Department of ECE
chamber to simulate the necessary test conditions and the testing is carried out. For example, for toppling test,
the equipment under test is subjected to toppling four times on a wooden platform and then it is checked
whether the system is still functional. In rapid temperature cycling test, the temperature inside the environmental
chamber is changed rapidly from -20° C to 55° C in 1 hour 26 minutes to check whether the system can
withstand the rapid changes in the temperature.
Electromagnetic Interference (EMI) is a major issue in embedded systems. EMI is the noise generated
by sources external to the embedded system. For instance, motors, RF transmitters, generators, etc. may affect
an embedded system's operation. Proper EMI shielding is to be done to overcome the effect of EMI.
While designing the system itself, these environmental specifications need to be kept in mind. The choice
of the Integrated Circuits, the connectors to be used, the mechanical packaging, etc. are influenced by these
environmental specifications.
2.6 Packaging
After the complete system is tested and ensured that the hardware and software together are meeting all the
requirements, the embedded system has to be packaged in the desired cabinet. For military equipment, special
packaging requirements are specified to meet the environmental specifications. For consumer items, an
attractive packaging is a must. Mechanical engineers' advice needs to be taken for packaging the product.
Packaging issues need to be considered from requirements engineering stage itself.
2.7 Configuration Management
During the course of development of an embedded system, a number of documents, called work
products, are generated. These work products are:
Project plan
Circuit diagrams
Source code
Test plans
Unit – II 2.20
Paavai Institutions Department of ECE
User manual
To start with, the system requirements specifications document will be prepared. While carrying out the
design, you may feel the need to modify the specifications document because a particular requirement needs to
be changed-your development team or the client may initiate this change. So, initially you have version 1.0 of
the specifications document and you will later modify the document and release version 1.1. Similarly, you may
need to make changes to any of the above-mentioned work products. The process of making changes to the
work products in a systematic manner is called configuration management. As shown in Fig. 2.7, configuration
management process involves the following procedure:
process. In large projects, some team members are not even aware that a specification has been changed. The
object of a configuration management process is to ensure that every change is analyzed in a systematic way
and every change is communicated to all the team members. Even after the development is completed and the
system is delivered to the client, the configuration management process needs to be followed for maintaining the
various versions of the source code. Each version of the source code needs to be maintained along with the
corresponding documentation on the changes incorporated.
2.8 Managing Embedded System Development Projects
Unit – II 2.22
Paavai Institutions Department of ECE
is suicidal to give a proposal (indicating that, say, it will take six months for development and the estimated cost
is US$ 100,000) without a clear understanding of the project requirements. Project proposal preparation giving
an estimate of effort, time and money required to develop an embedded system is a difficult task due to the
following reasons:
The requirements may not be very clear and you need to do the estimation with limited
information.
The risks associated with the project are very high mainly because you will not be able to know
whether the performance requirements can be met or not, without carrying out a detailed design.
Your top management will not allow you to do a detailed design unless the project is on hand!
To get people with the required skill sets is not an easy task. Even if you have the people in your
organization with the necessary expertise, it remains doubtful whether these people will continue
till the end of the project.
In spite of these risk factors, the project manager has to estimate the effort, time and money required.
The following process would help in making a reasonably good estimate:
Obtain, to the maximum extent possible, the clear requirements from the user. Focus on the performance
requirements. Document all the assumptions made during the requirements specifications phase.
Do a thorough risk analysis. Identify the possible risk factors and study how the risks can be overcome.
Do a preliminary design and if required carry out simulation studies to ensure that the system is
realizable. Take the opinion of an expert consultant if required.
Account for manpower attrition and keep some backup person nel for important activities. Include the
cost of the additional personnel in the project cost estimation.
2.8.2 Project planning
It is naïve to assume that everything will go smoothly during the development phase. The design team
would have worked out a design and developed a prototype only to realize that a particular performance
parameter cannot be met. This may call for a major change in the design. The project manager has to avoid such
unpleasant news by taking the necessary precautions during the project planning stage. The manager has to plan
the necessary simulation studies and prototype development during the requirements analysis stage itself.
Another major problem in the project execution is the attrition of the employees. If the development engineers
leave in the middle of the project, the timeframe is badly affected. Though this is true for any project, the impact
of people leaving in the middle of the project is much more for embedded systems because it is difficult to
ensure continuity in hardware design and firmware development. The project manager needs to have enough
Unit – II 2.23
Paavai Institutions Department of ECE
backup personnel from the start of the project itself. During project planning stage, the project manager needs to
take into consideration all these aspects.
The project manager has to prepare a project plan document that clearly indicates the various activities
along with time frames, responsibilities of each person working on the project, development environment and
tools required, test equipment required, risk items and risk management procedure, configuration management
process, reviews to be carried out etc. The project plan document has to be periodically reviewed to ensure that
everything is going as per the plan. It a certain aspect of planning fails, corrective action needs to be taken.
2.8.3 Providing the Development Infrastructure
Many embedded system designers are handicapped due to lack of the necessary infrastructure. The
hardware engineers need test instruments such as oscilloscopes, logic analyzers, spectrum analyzers, etc. The
software engineers need development tools such as cross-compilers, debuggers, In-Circuit Emulators, ROM
Emulator etc. The project manager has to identify the test instruments and the development tools necessary for
the project and provide these facilities.
2.8.4 Co-design and Co-verification
During the design stage, it is difficult to partition the hardware and software functionality (the co design
problem), Similarly, while testing the system after the hardware and software are integrated, it w difficult to find
out whether the problem is in the hardware or software (co-verification problem) In many embedded system
projects, the hardware engineers and software engineers could be found blaming each other for an unresolved
problem. The project manager has to work out a detailed process for separate testing of the hardware and the
software; and then the hardware and software are integrated. The integration testing has to be done step-by-step
so that debugging is easy.
2.8.5 Risk Management
Many embedded system development projects have a high element of risk. The major risk items are the
personnel leaving in the middle of the project, interfacing the embedded system with other systems such as
external hardware, meeting the real-time performance requirements, etc. The project manager has to
periodically review the project for the possible risk factors and take corrective action. A major risk factor in
most of the projects is the continuous stream of requirements changes. The client keeps telling you that a
particular specification needs a small change without realizing that the 'small' change may call for a major
design change in the hardware or the software. As the project manager, you need to work out a mechanism
wherein the impact of a proposed change is studied. If the impact is very high, you need to inform the client
Unit – II 2.24
Paavai Institutions Department of ECE
Unit – II 2.25
Paavai Institutions Department of ECE
QUESTION BANK
PART – A (2 MARKS)
Unit – II 2.26
Paavai Institutions Department of ECE
Unit – II 2.27