Chapter Six
Chapter Six
Chapter Six
Software Engineering
Chapter 6
❖ Introduction
6-2
Introduction
Why Embedded Systems are Different
▪ Embedded systems are dedicated to specific tasks, whereas PCs are generic computing platforms
▪ Embedded systems are usually cost sensitive
▪ Embedded systems have real-time constraints
▪ Embedded systems have power constraints
▪ Embedded systems must operate under extreme environmental conditions
▪ Embedded systems have far fewer system resources than desktop Systems
▪ Embedded systems require specialized tools and methods to be efficiently designed
6-3
The Embedded Design Life Cycle
• The design of an embedded system implies that both software and hardware are being designed in parallel.
• The profound implications of this simultaneous design process heavily influence how systems are designed.
Schematic representation of the embedded design lifecycle
6-4
Embedded systems design life cycle follows the following seven phases in general:
1. Product specification
2. Partitioning of the design into its software and hardware components
3. Iteration and refinement of the partitioning
4. Detailed hardware and software design
5. Integration of the hardware and software components
6. Product testing and release
7. On-going maintenance and upgrading
Product Specification
▪ When asked about the product, everyone involved - senior management, marketing, sales, quality assurance, and engineering -
would provide the same general description.
▪ For many Research &Development engineers, designing the right product means cramming everything possible into
the product to make sure they don't miss anything.
▪ A common factor for the successful products is that the design team share a common vision of the product they are
designing.
6-6
Hardware/Software Partitioning
▪ Since an embedded design will involve both hardware and software components, someone must decide which portion of
the problem will be solved in hardware and which in software.
▪ This choice is called the “partitioning decision.”
▪ The partitioning decision is acomplex optimization problem. Many embedded system designs are required to be
• Price sensitive
• Market competitive
• Proprietary: no similar product
▪ These conflicting requirements make it difficult to create an optimal design for the embedded product.
▪ So, the designer or design team must rely on experience to arrive at an optimal design.
6-7
Iteration and Implementation
▪ This phase represents the early design work before the hardware and software teams build "the wall" or stop
communicating between them.
▪ Even though major blocks might be partitioned between the hardware components and the software components, plenty of
time remains to move these boundaries as more of the design constraints are understood and modeled.
6-8
Detailed Hardware and Software Design
The percentage of project time spent in each phase of the embedded design life cycle.
The curve shows the cost associated with fixing a defect(shortage) at each stage of the process.
6-9
Hardware/Software Integration
▪ The process of integrating embedded software and hardware is an exercise in debugging and discovery.
▪ because the software team now finds out whether it really understood the hardware specification document provided by
the hardware team.
▪ The difficult thing in embedded system design is to combine the first hardware prototype, the application software, the driver
code, and the operating system software together with an optimism and to have the design work perfectly.
6-10
Product Testing and Release
▪ Product testing takes on special significance when the performance of the embedded system has life or death consequences
attached.
▪ Because embedded systems usually have extremely tight design margins to meet cost goals, testing must determine whether
the system is performing close to its optimal capabilities.
▪ The job of testing the embedded product goes to aseparate team of engineers and technicians because asking adesigner to
test his own code or product usually results in erratic test results.
▪ In many instances, the Test Engineering Group is the last line of defense between a smooth product release and amajor
financialdisaster.
6-11
Maintaining and Upgrading Existing Products
▪ The majority of embedded system designers (around 60 percent) maintain and upgrade existing products, rather than design new
products.
▪ Most of these engineers were not members of the original design team for aparticular product, so they must rely on only their
experience, their skills, the existing documentation, and the old product to understand the original design well enough to maintain
and improve it.
6-12
Software Development Tools
▪ Software development tools are computer programs, usually run on personal computers, that allow the programmer (or
system developer) to create, modify, and test applications programs.
▪ Some common software development tools are:
• Text editors
• Assemblers/compilers
• Simulators
• High-level language simulators
▪ Integrated development environments (IDEs) are powerful PC-based programs which include everything to edit,
assemble, compile, link, simulate, and source-level debug a program, and then download the generated executable code to
the physical microcontroller chip using a programmer device.
6-13
Hardware Development Tools
▪ Numerous hardware development tools are available for PIC microcontrollers.
• Development boards
• Device programmers
• In-circuit debuggers
• In-circuit emulators
• Breadboards
6-14