Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
691 views

Embedded System Module 1

The document discusses embedded systems and their components. It defines an embedded system as a system with embedded software and hardware dedicated to a specific application. The main components are the embedded hardware (processor, memory, I/O), embedded software stored in memory, and an embedded real-time operating system that controls system resources and ensures tasks are completed on time. It then discusses the types of embedded systems - small, medium, and sophisticated - and the skills required of embedded system designers for each type. Small systems require skills in microcontrollers and basic software/hardware. Medium systems require additional programming skills like C/C++ and knowledge of real-time operating systems. Sophisticated systems require hardware/software co-design skills

Uploaded by

Yatish K
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
691 views

Embedded System Module 1

The document discusses embedded systems and their components. It defines an embedded system as a system with embedded software and hardware dedicated to a specific application. The main components are the embedded hardware (processor, memory, I/O), embedded software stored in memory, and an embedded real-time operating system that controls system resources and ensures tasks are completed on time. It then discusses the types of embedded systems - small, medium, and sophisticated - and the skills required of embedded system designers for each type. Small systems require skills in microcontrollers and basic software/hardware. Medium systems require additional programming skills like C/C++ and knowledge of real-time operating systems. Sophisticated systems require hardware/software co-design skills

Uploaded by

Yatish K
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 28

MODULE 1

Q1) What is an embedded system ? Explain the components of embedded


systems?
Ans- “An embedded system is a system that has embedded software in a computer
Hardware”
This system is dedicated for either an application(s) or specific part of an
application or product or a component of a large system.

The components of embedded system:-

There are three main components of embedded system:


a) It embeds hardware similar to a computer. The processor may be embedded
Processor cores. The hardware includes embedded memory, peripheral and
Input-output devices it embeds main application software.
b) Software usually embeds in the ROM ,flash memory or media card. The
System most often does not have a secondary hard disk & CD memory as in
Computer.
c) It embeds a real time OS (RTOS). The RTOS supervises the application system
and controls the access to system resources. It enables finishing the
Execution of the tasks of a program with in specified time intervals.
Q2) With a neat diagram explain the types and skills required for
Embedded System?
Ans- We can classify embedded systems into three types as foliows.

I. Small scale embedded systems: These systems are designed with a single 8 or 16-bit

microcontroller: they have little hardware and software complexties and involebrd-evel
design.They may even be battery operated. When developing embedded software for these an
editor assembler and cross assembler an integrated development environment (ISE) tool
specific to the microcontroller or processor used are the main programming tools. Using C
language programs are compiled into the assembly and executable codes are appropriately
located in the system memory. The software has to fit within the memory available and keep
in view the need to limit power dissipation when the system is running continuously.

2. Medium scale embedded systems: These systems arealy designed with a single or a few 16
or 32-bit microcontrollers, DSPs or RISCs. These systems may also employ the readily
available single purpose processors and IPs (explained later) for the various functions for
example, bus interfacing. [ASSPs and IPs may also have to be appropriately configured by
the system software before being integrated into the system-bus.] Medium scale embedded
systems have both hardware and software complexities. For complex software design, the
following programming tools are available: C/C++/Visual C++/Java, RTOS, source code
engineering tool, simulator, debugger and an integrated development environment. Software
tools also provide solutions to hardware complexities.

3. Sophisticated embedded systems: Sophisticated embedded systems have enormous


hardware and software complexities and may need several IPs, ASIPs, scalable processors or
configurable processors and programmable logic arrays. They are used for cutting edge
applications that need hardware and software co-design and components that have to be
integrated in the final system. They are constrained by the processing speeds available in
their hardware units. Certain software functions such as encryption and deciphering
algorithms,discrete cosine transformation and inverse transformation algorithms. TCP/IP
protocol stacking and network driver functions are implemented in the hardware to obtain
additional speeds. The software implements some of the functions of the hardware resources
in the system.Development tools for these systems may not be readily available at a
reasonable cost or may not be available at all. In some cases, a compiler or retargetable
compiler might have to be developed for these.[A retargetable compiler is one that configures
according to the given target configuration in a system.]

SKILLS REQUIRED FOR AN EMBEDDED SYSTEM DESIGNER

An embedded system designer has to develop a product using the available tools within the
given specifications, cost and time frame.
1. Skills for Small Scale Embedded System Designer: Author Tim Wilmshurst in his book
states that the following skills are needed in the individual or team that is developing a small
scale system: "Full understanding of microcontrollers with a basic knowledge of computer
architecture, digital electronic design, software engineering, data communication, control
engineering, motors and actuators, sensors and measurements, analog electronic design and
IC design and manufacture" Specific skills will be needed in specific situations. For example,
control engineering knowledge will be needed for design of control systems, and analog
electronic design knowledge will be needed when designing the system interfaces. The basic
aspects of the following topics will be described in this book to prepare the designer who
already has a good knowledge of the microprocessor or microcontroller to be used. (1)
Computer architecture and organization. (2) Memories. (3) Memory allocation (4) Interfacing
memories. (5) Burning (a term used for porting) to executable machine codes in PROM or
ROM. (v) Use of decodes and de multiplexers. (6) Direct memory accesses. (7) Ports. (8)
Device drivers in assembly. (9) Simple and sophisticated buses. (10) Timers. (11) Interrupt
servicing mechanism. (12) C programming elements. (13)Memory optimization, (14)
Selection of hardware and microcontroller (15) Use of In-Circuit –Emulators (ICE) cross-
assemblers and testing equipment (xvi) Debugging the software and hardware bugs by using
test vectors. Basic knowledge in other areas-software engineering, data communication,
control engineering, motors and actuators, sensors and measurements, analog electronic
design and IC design and manufacture can be obtained from the standard text books
available. A designer interested in small-scale embedded systems may not need at all
concepts of interrupt latencies and deadlines and their handling, the RTOS programming
tools described in Chapters 9 and 10 and the program models given in Chapter 6.

2. Skills for Medium Scale Embedded System Designer: Knowledge of CIC++Java


programming. RTOS programming and program modeling skills are must to design medium-
scale embedded-system. Knowledge of the following are critical, (1) Tasks or threads and
their scheduling by RTOS, (2) Cooperative and preemptive scheduling, (3) Inter processor
communication functions, (4) Use of shared data, and programming the critical sections and
re-entrant functions. (5) Use of semaphores mailboxes, queues, sockets and pipes, (6)
Handling of interrupt-latencies and meeting task deadlines. (7) Use of various RTOS
functions, (8) Use of physical and virtual device drivers. A designer must have account to an
RTOS programming tool with Application Programming Interfaces (APIs) for the specific
microcontroller to be used. Solutions to various functions like memory-allocation, timers,
device drivers and interrupt handing mechanism are readily available as the APIs of the
RTOS. The designer needs to know only the hardware organization and use of the APIs. The
microcontroller or processor then represents a small system element for the designer and
knowledge may suffice.

3. Skills for Sophisticated Embedded System Designer: A team is needed to co-design and
solve the high level complexities of hardware and software design. Embedded system
hardware engineers should have skills in hardware units and basic knowledge of 'C/C++ and
Java, RTOS and other programming tools. Software engineers should have basic knowledge
in hardware and a thorough knowledge of C, RTOS and other programming tools. A final
optimum design solution is then obtained by system integration.

Q3) Explain software embedded into a system?


Ans- A processor is an important unit in the embedded system hardware. It is the heart of
embedded system. Knowledge of basic concept of microprocessors and microcontrollers is
must for an embedded system designer.
1) Embedded Processors in a System:-

A processor has two essential units: Program Flow Control Unit (CU) and Execution Unit
(EU). The EU has circuits that implement the instructions pertaining to data transfer
operations and data conversion from one form to another. The EU include the Arithmetic and
Logical Unit (ALU) and also the circuits that execute instructions for a program control task,
say, halt, interrupt, or jump to another set of instructions. It can also execute instructions for a
call or branch to another program and for a call to a function.
A processor runs the cycles of fetch-and-execute. The instructions, defined in the processor
instructions set, are executed in the sequence that they are fetched from the memory. A
processor is in the form of an IC chip; alternatively, it could be in core in an Application
Specific Integrated Circuit (ASIC) or System on Chip (SoC). Core means a part of the
functional circuit on the Very Large Scale Integrated (VLSI) chip.
An embedded system processor chip or core can one of the following.
1. General Purpose Processor (GPP): A GPP is a general-purpose processor with
instruction set designed not specific the applications.
(a) Microprocessor
(b) Embedded Processor
2. Application Specific Instruction-Set Processor (ASIP). An ASIP is a processor with
an instruction set designed for specific application on a VLSI chip.
(a) Microcontroller
(b) Embedded microcontroller
(c) Digital Signal Processor (DSP) and media processor
(d) Network processor, IO processor or domain-specific programmable processor
3. Single Purpose Processors as additional processors: Single purpose processor
examples are as follows:
(a) Coprocessor (e.g., as used for graphic processing, floating point processing,
encrypting, deciphering, discrete cosine transformation and inverse transformation or
TCP/IP protocol stacking and network connecting functions).
(b) Accelerator (e.g., Java codes accelerator).
(c) Controllers (e.g., for peripherals, direct memory accesses and buses).
4. GPP or ASIP cores integrated into either an ASIC or a VLSI circuit or a Field
Programmable Gate Array (FPGA) core integrated with processor units in VLSI
(ASIC) chip.
5. Application Specific System Processor (ASSP)
6. Multicore processors or multiprocessor

For a system designer, the following are important considerations when selecting a processor:
1. Instruction set
2. Maximum bits in an operand (8 or 16 or 32) in a single arithmetic or logic operation
3. Clock frequency in MHz and processing speed in Million Instructions Per Second
(MIPS) or in an alternate metric Dhrystone for measuring processing performance
4. Processor ability to solve complex algorithms while meeting deadlines for their
processing.

A microprocessor or GPP is used because: (i) processing based on the instructions available
in a predefined general purpose instruction set results in quick system development. (ii) Once
the board and I/O interfaces are designed for a GPP, these can be used for a new system by
just changing the embedded software in the ROM. (iii) Ready availability of a computer
facilitates embedded software development in high-level languages. (iv) Ready availability of
well-tested and debugged processor-specific APIs (Application Program Interfaces) and
codes previously designed for other applications results in new systems developed quickly.
2. Microprocessor
The CPU is a unit that centrally fetches and processors a set of general-purpose instructions.
The CPU instruction set includes for data transfer operations, ALU operations, stack
operations, IO operations and program control, sequencing and supervising operations. The
general-purpose instruction set is always specific to a specific CPU. Any CPU must possess
the following basic functional units:
1. A control unit that fetches and controls the sequential processing of a given command
or instruction and communicates with the rest of the system.
2. An ALU that undertakes arithmetic and logical operations on byes or words. It may
be capable of processing 8, 16, 32 or 64-bit words at an instant.

A microprocessor is a single VLSI chip that has a CPU and may also have some other units
(e.g., caches, floating point processing arithmetic unit, pipelining and superscaling units) that
are additionally present and that result in faster processing of instructions.
The earlier generation microprocessor’s fetch-and-execute cycle was guided by a clock
frequency of the order of ~4 MHz. Processors now operate at a clock frequency of 4 GHz and
even have multiple cores. In early 2002, it became possible to design Gbps (Giga bit per
second) transceiver and encryption engines in a few highly sophisticated embedded systems
using processors that operate on GHz frequencies. A transceiver is a transmitting cum
receiving circuit that has appropriate processing and control units, for example, for
controlling bus-collisions. An encryption engine is a system that encrypts the data to be
transmitted on the network.
Intel 80x86 (also referred as x86) processors are the 32-bit successors of 8086. [The x refers
to an 8086 extended for 32 bits.] Examples of 32-bit processors in 80x86 series are Intel
80386, 80486 and Pentiums ( a new generation of 32- and 64-bit microprocessors is the
classic Pentium series). IBM PCs use 80x86 series and the embedded systems incorporated
inside the PC for specific tasks (like graphic accelerator, disk controllers, network interface
card) use these microprocessors.
High performance processors have pipeline and superscalar architecture, fast ALUs and
Floating Point Processing Units (FLPUs). [A pipeline architecture means that the instructions
have between 3 and 9 stages. Different instructions are at different stages of the pipeline at
any given instance. A superscalar architecture refers to two or more sets of instructions
executing in parallel pipelines.]
The important microprocessors used as general-purpose processor when large embedded
software has to be located in the external memory chips.
3. Microcontroller

A microcontroller is an integrated chip that has processor, memory and several other
hardware units in it; these form the microcomputer part of the embedded system. Figure 1.2
shows the functional circuits present (in solid boundary boxes) in a microcontroller. It also
shows the application-specific units (in dashed boundary boxes) in a specific version of a
given microcontroller family.
Just as microprocessor is the most essential part of a computing system, a microcontroller is
the most essential component of a control or communication circuit. A microcontroller is a
single-chip VLSI unit (also called ‘microcomputer’) which though have limited
computational capabilities, possesses enhanced input-output capabilities and a number of on-
chip functional units. Microcontrollers are particularly suited for use in embedded systems
for real-time control applications with on-chip program memory and devices.
A few of the latest microcontrollers also have dual core and high computational and
superscalar processing capabilities. Important microcontroller chips for embedded systems
are 8051, 8051MX, 68HC11x, HC12xx, HC16xx,PIC 16F84 or 16C76, 16F876 and PIC18,
microcontroller enhancements of ARM9/ARM7 from ARM, Intel, Philips, Samsung and ST
microelectronics.
Fig. 1.2 Various functional circuits (solid boundary boxes) in a microcontroller chip or core
in an embedded system. Also shown are the application-specific units (dashed boundary
boxes) in a specific version of a microcontroller

Figure 1.3 shows commonly used microcontrollers in small-, medium- and large-scale
embedded systems. Choosing a microcontroller as a processing unit depends upon the
application-specific features in it.
A microcontroller is used when a small or part of the embedded software has to be located in
the internal memory and when on-chip functional units such as the interrupt-handler, port,
timer, ADC, PMW and CAN controller are required.

4. Single Purpose Processors

Single purpose processors used in embedded systems include:


1. Coprocessor (for example, fro floating point processing).
2. Graphics processor: An image consists of a number of pixels. For example, Quarter
common intermediate format---Quarter-CIF images have 144 * 176 (horizontal x-axis
* vertical y-axis) pixels. Video frames have 525 * 625 pixels. The video graphic
adapter (VGA) format of e-mailing and web pages has 640 * 480 =307,200 pixels. A
separate graphics processor is required for functions such as, for example, gaming,
display from graphics memory buffers and to move (translate on screen) and rotate an
image or its segments.
3. Pixel coprocessor: High-resolution pictures have formats: 2592 * 1944 pixels =
5,038,848 pixels; 2592 * 1728 = 3.2M; 2048 * 1536 = 3M and 1280 * 960 = 1M. A
pixel coprocessor is required in digital cameras for displaying images directly or after
operations such as rotate right, rotate-left, rotate-up, rotate-down, shift to next, shift to
previous.
4. Encryption engine: A suitable algorithm runs in this processor to encrypt data for
secure transmission.
5. Decryption engine: A suitable algorithm runs in this processor to decrypt the
encrypted data at receiver’s end.
6. A discrete cosine transformation (DCT) and inverse transformation (DCIT) processor
is required in speech and video processing.
7. Protocol stack processor: A protocol stack, which has number of header words, is
prepared before an application data is sent to a network. At the receiver’s end, the
protocol stack is received and application data is accepted accordingly. A TCP/IP
protocol stack processor processes TCP/IP network data.
8. Network processor: A network processor’s functions are to establish a connection,
finish, send and receive acknowledgements, send and receive retransmission requests
and check and correct received data frame errors. The network processor’s functions
include all protocol stack-processing functions.
9. Accelerator (for example, Java codes accelerator). The accelerator is a coprocessor
that accelerates computations by taking advance actions that are just-in-time
compilations of the next object in Java programs.
10. CODEC (Coder and Decoder): A CODEC is a processor circuit that encodes input
and decodes the encoded information or bits or signals into a complete set of bits or
original signal. Voice, speech, image, video signals and bits are encoded for storing or
transmission and decoded from the stored or received bits or signal for display or
playing. The CODEC functions as a compression and decompression unit for voice,
speech, image or video signals.
11. JPEG CODEC: This is a processor for jpg compression and decompression. The Joint
Photographic Experts Group (JPEG) is an International Telecommunication Union for
Telecom (ITU-T) and International Standards Organisation (ISO) committee.
12. MPEG CODEC: The Motion Pictures Experts Group (MPEG) recommends CODEC
standards for video. MPEG3 CODEC is a processor for mp3 compression and
decompression. MPEG 2 or 3 or 4 compression of audio/video data streams is done
before storing or transmitting, and decompression is done before retrieving or playing
files. For MPEG compression and decompression algorithms, if GPP-embedded
software is run, then separate DSPs are required to achieve real-time processing. GPP-
embedded software is run, then separate DSPs are required to achieve real-time
processing.
13. Controller (e.g., for peripheral, direct memory access or bus).

Single purpose processors are used for specific applications or computations or as controllers
for peripherals, direct memory accesses and buses.

Q4) Describe the characteristics and constraints of Embedded system.


Ans- Embedded systems come in a variety of shapes and sizes, from the largest multiple-rack
data storage or networking powerhouses to tiny modules such as your personal MP3 player or
cellular handset. Following are some of the usual characteristics of an embedded system:

 Contains a processing engine, such as a general-purpose microprocessor


 Typically designed for a specific application or purpose
 Includes a simple (or no) user interface, such as an automotive engine ignition
controller
 Often is resource-limited. For example, it might have a small memory foot-print
and no hard drive
 Might have power limitations, such as a requirement to operate from batteries
 Not typically used as a general-purpose computing platform
 Generally has application software built in, not user-selected
 Ships with all intended application hardware and software pre-integrated
 Often is intended for applications without human intervention
Most commonly, embedded systems are resource-constrained compared to the typical
desktop PC. Embedded systems often have limited memory, small or no hard-drives, and
sometimes no external network connectivity. Frequently, the only user interface is a serial
port and some LEDs. These and other issues can present challenges to the embedded system
developer. With advancements in IOT, embedded systems are getting much more complex.

Complex algorithms: The operations performed by the microprocessor may be very


sophisticated. For example, the microprocessor that controls an automobile engine must
perform
complicated filtering functions to opti- mize the performance of the car while minimizing
pollution and fuel utilization.
■ User interface: Microprocessors are frequently used to control complex user interfaces
that may include multiple menus and many options. The moving maps in Global Positioning
System (GPS) navigation are good examples of sophisticated user interfaces.
■ Real time: Many embedded computing systems have to perform in real time if the data is
not ready by a certain deadline, the system breaks. In some cases, failure to meet a deadline is
unsafe and can even endanger lives. In other cases, missing a deadline does not create safety
problems but does create unhappy customers missed deadlines in printers, for example, can
result in scrambled pages.
■ Multirate: Not only must operations be completed by deadlines, but many embedded
computing systems have several real-time activities going on at the same time. They may
simultaneously control some operations that run at slow rates and others that run at high rates.
Multimedia applications are prime examples of multirate behavior. The audio and video
portions of a multimedia stream run at very different rates, but they must remain closely
synchronized. Failure to meet a deadline on either the audio or video portions spoils the
perception of the
entire presentation.
■ Manufacturing cost: The total cost of building the system is very important in many
cases. Manufacturing cost is determined by many factors, including the type of
microprocessor used, the amount of memory required, and the types of I/O devices.
Power and energy: Power consumption directly affects the cost of the hardware, since a
larger power supply may be necessary. Energy con- sumption affects battery life, which is
important in many applications, as well as heat consumption, which can be important
even in desktop applications.

Q5) Explain hardware units and devices in an Embedded system.


Ans- EMBEDDED HARDWARE UNITS AND DEVICES IN A SYSTEM:-

1)POWER SOURCE
•Most of the systems have their own power supply.
•ES operates in one of the power ranges
•5.0V, + 0.25v , 3.3V, 2.0V+ 0.2V, 15V+0.2V.
•5V system is used in most systems.
•In a low-performance system, CMOS is used which is of 0.2V.
•The dissipation reduces by 1/6.
•P=V2/R , PCMOS/PV =22/R/52/R=4/25≈1/6.

2)CLOCK OSCILLATOR
•Clock controls time for executing an instruction.
•CPU maintains clock using an oscillator.
•This generates a periodic oscillating electronic signal.
•Crystal oscillators are used in most cases.

3)RESET CIRCUIT, POWER UP RESET, AND WATCHDOG TIMER


•Manual reset –reset button is pressed manually
•Power up reset-when there is an interrupted power supply
•Watch dog timer

4)MEMORY
•ROM OR EEPROM: Stores application programs from where the processor fetches
instructions codes for s/m booting, initialization, pointers, ISR.
•RAM(internal and external Ram for buffer: Storing variables during program run and storing
the stack, storing input output buffers.
•Memory Stick(OR Card): it is used to store high definition video, images etc.
•EEPROM or Flash : storing nonvolatile results for processing.
•Cache: storing copies of instructions and data in advance and storing their results
temporarily.
5)DAC USING A PWM AND AN ADC
•DAC is a circuit that converts 8,10,12 bits to analog output.
•DAC operation is done with the help of a combination of PWM in the microcontroller and
an
external integrator chip.
•PWM inputs are from 00000000 to 11111111 for an 8-Bit DAC operation.
•The equation for obtaining analog output V= K*PW
•Where,K= constant.
PW= pulse Width and it is made proportional to analog output needed.
•ADC is a circuit that converts analog input to digital.
•The applications of ADC are Data acquisition, digital cameras, Voice digitizing systems.
•Eg. Suppose a system gets analog i/p’s from sensors of temperature, pressure, heartbeats
etc., this analog information has to be converted to digital in the form of bits for the further
Processing

6)LCD LED AND TOUCH SCREEN DISPLAYS


•A system requires an interfacing circuit and s/w to display the status or message in a line or
multiline displays, or the flashing displays.
•The screen may show text characters or graph or icon(pictogram).
•To indicate the ON status of the system there may be LED that glows.
•A touch screen is an input as well as an output device.

7)KEYPAD/KEYBOARD
•The KEYPAD/KEYBOARD is used for getting user inputs.
•The keypad has a maximum of 32 keys.
•The keyboard has a maximum of 104 keys or more.
•The keypad or keyboard may interface serially or parallelly to the processor directly through
the ports or through the controller.

8)PULSE DIALER, MODEM & TRANSCEIVER


•PULSE DIALER: is a telecommunication system.
•MODEM: modulator and demodulator.
•TRANSCEIVER: transmitter and receiver
•A system provides necessary interfacing circuit and related software for dialing, modem and
transceiver directly or through a controller.

9)INTERRUPT HANDLER
•An interrupt handling mechanism is required in each system to handle interrupt's from
various processes and for handling multiple interrupts waiting for service.
•If multiple interrupts are occurring simultaneously the system prioritizes the sources of
interrupts and service them accordingly.
•Some interrupt sources are maskable some interrupt sources cannot be masked.

Q6) Explain:-
(a) Process of converting assembly language into machine code
(b) Process of converting C-program into file for ROM image

Ans- A compiler takes the program code (source code) and converts the source code to a
machine language module (called an object file). Another specialized program, called a
linker, combines this object file with other previously compiled object files (in particular run-
time modules) to create an executable file. So, for a compiled language the conversion from
source code to machine executable code takes place before the program is run. This is a very
different process from what takes place for an interpreted programming language.

This is somewhat simplified as many modern programs that are created using compiled
languages makes use of dynamic linked libraries or shared libraries. Therefore, the executable
file may require these dynamic linked libraries (Windows) or shared libraries (Linux, Unix)
to run.

When build tools run on the same system as the program they produce, they can make a lot of
assumptions about the system. This is typically not the case in embedded software
development, where the build tools run on a host computer that differs from
the target hardware platform. There are a lot of things that software development tools can do
automatically when the target platform is well defined. This automation is possible because
the tools can exploit features of the hardware and operating system on which your program
will execute. For example, if all of your programs will be executed on IBM-compatible PCs
running Windows, your compiler can automate—and, therefore, hide from your view—
certain aspects of the software build process. Embedded software development tools, on the
other hand, can rarely make assumptions about the target platform. Instead, the user must
provide some of her own knowledge of the system to the tools by giving them more explicit
instructions.

The job of a compiler is mainly to translate programs written in some human-readable


language into an equivalent set of opcodes for a particular processor. In that sense,
an assembler is also a compiler (you might call it an “assembly language compiler”), but one
that performs a much simpler one-to-one translation from one line of human-readable
mnemonics to the equivalent opcode. Everything in this section applies equally to compilers
and assemblers. Together these tools make up the first step of the embedded software build
process.
All of the object files resulting from the compilation in step one must be combined. The
object files themselves are individually incomplete, most notably in that some of the internal
variable and function references have not yet been resolved. The job of the linker is to
combine these object files and, in the process, to resolve all of the unresolved symbols.
Q7) What are the activities of software design during an embedded
software development process ?
Ans- The activities/concepts used during a design process are as follows :
1. ABSTRACTION : Each problem component is first abstracted. For example, in the design
of a robotic system, the problem of abstraction can be in terms of control of arms and motors.
2. HARDWARE AND SOFTWARE ARCHITECTURE : Architecture should be well
understood before a design.
3. EXTRA FUNCTIONAL PROPERTIES : Extra functional properties required in the
system being developed should be well understood from the design.
4. SYSTEM RELATED FAMILY OF DESIGNS : Families of related systems developed
earlier should be taken into consideration during designing.
5. MODULAR DESIGN : Modular design concepts should be used. System designing is fast
by decomposition of software into modules that are to be implemented. Modules should be
such that they can be composed (coupled or integrated) later. Effective modular design
should ensure effective
(i) Function independence
(ii) Cohesion
(iii) Coupling
(a) Modules should be clearly understood and should maintain continuity.
(b)Also, appropriate protection strategies are necessary for each module. A module is not
permitted to change or modify another module functionality. For example, protection from a
device driver modifying the configuration of another device.
6. MAPPING : Mapping into various representation is done from software requirements. For
example, data in the same path during the program flow can be mapped together as a single
entity. Transform and transaction mapping design processes are used in designing. For
example, an image is input data to a system: it can have a different number of pixels and
colours. The system does not process each pixel and process individually. Transform
mapping of image is done by appropriate compression and storage algorithms. Transaction
mapping is done to define the sequence of images.

7. USER INTERFACE DESIGN : User interface design is an important part of design. User
interfaces are designed as per the requirements, analysis of the environment and system
functions. For example, in an automatic chocolate vending machine (ACVM) system, the
user interface is an LCD multiline graphics display. It can display a welcome message as well
as specify the coins needed to be inserted into the machine for each type of chocolate. The
same ACVM may be designed with touchscreen User Interface (GUI), or it may be designed
with Voice User Interfaces (VUIs). Any of these interface designs has to be validated by the
customer. For example, the ACVM customer who installs the machine must validate message
language and messages to be displayed before an interface design can proceed to the
implementation stage.
8. REFINEMENTS : Each component and module design needs to be refined iteratively till it
becomes the most appropriate for implementation be the software team. Figure shows the
activities for software-design cycle during an embedded software development process and
the cycle may be repeated till tests show the verification of specifications.

Q8) In detail explain abstraction steps in design process.


Ans- A design is called bottom-to-top design if it builds by starting from the components. A
design process is called top-to-down design if it first starts with abstraction of the process and
then after abstraction the details are created. Top-to-down design approach is the most favoured
approach. The following lists the five levels of abstraction from top to bottom in the design
process:
 Requirements : Defination and analysis of system requirement. It is only by a complete
clarity of for the required purpose, inputs, outputs, functioning, design metrics and
validation requirements for finally developed systems specifications that a well
designed system can be created. There has to be consistency in the requirements.

Design metrics used in the embedded systems


Design metrics Description
1. Power dissipation For many systems, particularly battery operated
systems, such as mobile phone or digital camera the
power consumed by the system is an important
feature. The battery needs to be recharged less
frequently if power dissipation is small.
2. performance Instructions execution time in the system measures
the performance. Smaller execution time means
higher performance.
3. Process deadlines There are number of processes in the system,
example, keypad input processing, graphic display
refresh, audio signals processing an vedio signals
processing. These have deadlines within which each
of them may be required to finish computations and
give results.
4. User interfaces Size These include keypad GUIs and VUIs.
5. maintenance Maintenance means changeability and additions to the
system; for example, adding or updating the software,
data and hardware.
6. System and user safety System safety in terms of accidental fall from hand or
table, theft (e. g., a phone locking ability and tracing
ability) and in terms of user safety when using a
product (for example, automobile break or engine).
7. Engineering cost Initial cost of developing, debugging and testing the
hardware and software is called engineering cost and
is a one_ time non_ recurring cost.
8. Manufacturing cost Cost of manufacturing each unit.
9. Flexibility Flexibility in design enables, without any significant
engineering cost, development of different versions
of a product and advanced versions later on. For
example , software enhancement by adding extra
functions necessitated by changing environment and
software re_ engineering.
10. Time_ to_ market Time taken in days or months after prototype
development to put a product for users and consumers
11. Prototype Time taken in days or months for developing the
prototype and in_ house testing for system
12. Development time Functionalities. It includes engineering time and
making the prototype time.

 Specification: Clear specification of the required system are must. Specification need
to be precise. Specification guide customer expectations from the product. They also
guide system architecture. They designer needs specification for
i. Hardware, for example, peripherals, devices processor and memory
specifications,
ii. Data types and processing specifications,
iii. Expected system behavior specifications,
iv. Constraints of design, and
v. Expected life cycle specifications.

Process specifications are analysed by making lists of outputs and events, output on
events and how the processes activate on each event(interrupt).
 Architecture: Data modeling design of attributes of data structure, data flow graphs,
program models, software architecture layers and hardware architecture are defined.
Software architectural are as follows:
1) The first layer is an architectural design. Here, a design for system architecture
is developed. The question arises as to how the different elements- data
structures, databases, algorithms, control functions, state transition functions,
process, data and program flow-are to be organized.
2) The second layer consist of data-design. Questions at this stage are as follows.
What design of data structures and databases would be most appropriate for the
given problem? Whether data organized as a tree- like structure will be
appropriate? What will be the design of components in the data? [for example,
video information we have to components, image and sound.]
3) The third layer consist of interface design. Important questions at this stage are
as follows. What shall be the interface to integrate the components? What is the
design for system integration? What shall be design of interfaces used for taking
inputs from the data objects, structures and databases and for delivering
outputs? What will be the port structure for receiving inputs and transmitting
outputs?
 Components: The fourth layer is a component level design. The question at this stage
is as follows. What shall be the design of each component? There is an additional
requirement in the design of embedded systems, what each component should be
optimized for memory usage and power dissipation. Components of hardware,
processes, interfaces and algorithms. The following lists the common hardware
components:
1) Processor, ASIP and single purpose processors in the system
2) Memory RAM, ROM are internal and external to the system flash or secondary
memory in the system
3) Peripherals and devices internal and external the system
4) Ports and buses in the system
5) Power source or battery in the system
During software development process we can model the components as object-
oriented.
Components-based object-oriented software development process
Effort Activities Model Deficiency
Stage 1 Components that could
be used in software
development identified
Stage 2 Selection of available
classes(single logically
bonded groups) from a
software components
resource library
Stage3 Sort components, which Need for robust
are available and interfaces and slow
reusable by re- development in case the
engineering and which reusable components are
are available not available in required
numbers
Stage4 Re-engineer components
and create unavailable
components
Stage5 Construct software from
the components and test
them
Stage6 Iteratively construct till
final validation of
software

 System integration: Built components are integrated in the system. Components may
work fine independently, but when integrated may not fullfil the design metrics. The
system is made to function and validated. Appropriate testes are chosen. Debugging
tools are used to correct erroneous functioning. Each component and its interface
system is integrated after the design stage. Program implementation is in a language
and may use an integrated development environment(IDE), and source code
engineering tools, which should follow the model, software architecture and design
specifications. Program simplicity should be maintained during the implementation
process.

Q9) What are the design metrics used in Embedded System? Explain the
challenges faced in designing an Embedded System?
Ans- Design metrics used in the embedded system
Design metrics Description

Power Dissipation For many systems, particularly battery operated systems ,such as
mobile phone or digital camera the power consumed by the
system is an important feature. The battery needs to be
recharged less frequently if power dissipation is small.
Performance Instructions execution time in the system measures the
performance. Smaller execution time means higher performance.

Process deadlines There are number of processes in the system, for example,
keyboard input processing, graphic display refresh. These have
deadlines within which each of them may be required to finish
computation and give results

User interface These include keypad, GUIs and VUIs

Size Size of the system is measured in items of 1:physical space


required 2:RAM in kb and internal flash memory requirements in
MB or GB for running the software and for data storage and
3:number of million logic gates in the hardware
Engineering cost Initial cost of developing, debugging and testing the hardware
and software is called engineering cost and is a one time non
recurring cost.

Manufacturing cost Cost of manufacturing each unit.

Flexibility Flexibility in design enables, without any significant engineering


cost, development of different version of a product and advanced
version later on.
Prototype Time taken in days or months for developing the prototype and
in-house testing for system

Development time Functionalities. It includes engineering time and making the


prototype time.

Time-to-market Time taken in days or months after prototype development to put


a product for users and consumers.

System and user safety System safety in terms of accidental fall from hand or table, theft
and in terms of user safety when using a product

Maintenance Maintenance means changeability and additions to the system;


for example, adding or updating software, data and hardware.

Challenges in Embedded System Design: Optimizing Design Metrics


following are the challenges that arise during the design process.
Amount and type of hardware needed: Optimizing the requirement of microprocessors,
ASIPs and single purpose processors in the system on the basis of performance , power
dissipation, cost and other design metrics are the challenges in a system design. A designer
also chooses the appropriate hardware taking into account the design metrics given in the
above table.
Optimizing Power dissipation and consumption: Power, consumption during the operational
and idle state of system should be optimal. The following methods are used to meet the
design challenges.
Clock rate reduction: Power dissipation typically reduces 2.5uW per 100kHz of reduced
clock rate. So reduction from 8000kHz to 100kHz reduces power dissipation by about
200uW, which is nearly similar to when the clock is nonfunctional.
Voltage Reduction: In portable or hand-held devices such as a cellular phone , compared to
5v operation, a CMOS circuit power dissipation reduces by one sixth, ~(2v/5v)whole square,
in 2.0 v operation. Thus the time intervals needed for recharging the battery increase by a
factor of six.

Q10) Explain the formalization of system design ?


Ans- Formalization of system design is done using a top-down approach by abstraction and
by
• Detailing requirements and specifications of hardware and software
• Defining architectures of hardware and software
• Coding and implementation as per architecture
• Testing, validation and verification of system
Since diagram model clears the design concepts better than abstraction, a Modeling language,
for formalization can be used. The Universal Modeling Language(UML) is used. In UML, a
designer describes the following:
1. ‘User Diagram’, ‘Object Diagram’, ‘Sequence Diagram’, ‘State Diagram’, ‘Class
Diagram’, and ‘Activity Diagram’
2. Classes and objects which describes attributes, components and behaviour
3. Inheritances of the classes and objects
4. Interfaces of the objects and their implementation at the objects
5. Structural description in terms of states, state machine and signals
6. Event description
DESIGN PROCESS AND DESIGN EXAMPLES
• Design process can be explained with the help of following example:
AUTOMATIC CHOCOLATE VENDING MACHINE(ACVM)
1.ABSTRACTION:
• ACVM hardware components are abstracted as follows:
•keypad on the top of the machine
•LCD display unit on top of the machine. It displays menu, text entered into the ACVM
and pictograms, welcome, thank you and other message
•Coin insertion slot and mechanical coin sorter to insert the coin
•Delivery slot
•Internet connection port using USB based wireless modem so that owner can know the
status of the ACVM sales from a remote location
ACVM software is abstracted as two units:
1. Embedded application software
2. RTOS
2.hardware and software architecture

•h\w architecture is considered as the following interconnected components:


•Microcontroller
•Rom for application codes and RTOS codes for scheduling the task
•Ram for storing temporary variable and stack
•Flash memory for storing user preferences, contact data, user address, user dob, user id code,
answer of FAQ’s
•Timer
•Interrupt controller
•Wi-Fi or USB port for TCP/IP(internet broadband connection)
•ACVM specific hardware that sorts coins of different denominations
•power supply
Software architecture is abstracted as:
• Keypad input read process
•Display process
•Coins input read process consisting of an ISR for a port at which the ACVM microcontroller
reads the port status and input bits and gets the interrupt signal
•Chocolate delivery process
•Network process for TCP/IP stack communication with the ACVM owner at remote place
3.EXTRA FUNCTIONAL PROPERTIES
•ACVM functional properties can abstracted as follows:
•ACVM display the GUI’s. An extra functional requirement like if the customers wishes to
enter contact information, birthday or get answer to FAQ’s etc...it should display appropriate
menu
•An extra functional requirement that a machine displays welcome message when idle state.
It also display time, date , advertisements etc...
•when coin inserted timer also starts. The customer should insert all coins within given pre-
set time if the customer fails the coin should be refunded
•Display of THANKYOU message when sufficient coins are collected. Wait message until
the chocolate is delivered. And visit again after the task is completed
•An extra functionality is to wish for birthdays if the customer has provided their contact no
and DOB
4.SYSTEM RELATED FAMILY OF DESIGNS:
• Automatic coffee vending machine, tickets vending machine at sales point are systems
related to ACVM family
• These machines are identified during the process and considered during the development
and designing process
5• MODULAR DESIGN:
•system designing is decomposed into hardware and software modules
•ACVM Hardware modules are as follows:
•Microcontroller based hardware with LCD or touch screen display
•Mechanical devices to collect coins
•Chocolate delivery slot and bowl
ACVM s/w modules are as follows:
•GUI’s
•Multiple processes
•RTOS
6.MAPPING
• Mapping into various representation is done using the requirements of software
•GUI’s on the desktop of a computer or in a mobile handset are mapped to GUI’s of ACVM
Next design steps after the abstraction process are as follows:
• listing of the requirements
• specifications
•design the architecture of hardware units and circuit and design the software architecture
using data structure, objects, interfaces and algorithms
• implementation
•integration
• Testing verifying and validating the system

Q11) Explain the design process of


i. ACVM
ii. Smart Card
iii. Digital Camera
Ans- i. Automatic Chocolate Vending Machine (ACVM)
The design process of ACVM includes the following steps:
1.Abstraction
*ACVM hardware components are abstracted as follows;
Keypad on top of the machine LCD display unit on top of the machine, Coin insertion slot,
Delivery slot, and Internet connection port.
*AVCM software is abstracted as two units;
Embedded application software and RTOS.
2. Hardware and software architecture
*Hardware architecture is considered as the following interconnected components;
Microcontroller, RAM, ROM, Flash memory, Timer, Interrupt controller, WIFI or USB port
for TCP/IP (Internet broadband connection), ACVM specific hardware that sorts coins of
different denominations, and Power supply.
*Software architecture is abstracted as;
Keypad input read process, Display process, Chocolate delivery process, and Network
process for TCP/IP stack communication with the ACVM owner at remote place.
3. Extra functional properties
AVCM functional properties can abstracted as follows;
*ACVM displays the GUI’s. An extra functional requirement like if the customers wishes to
enter contact information, birthday, or get answer to FAQ’s etc., It should display appropriate
menu.
*An extra functional requirement that a machine displays welcome message when idle state.
It also displays time, date, advertisements etc.,
*When coin inserted timer also starts. The customer should insert all coins within given pre-
set time if the customer fails the coins should be refunded.
*Display of THANKYOU message when sufficient coins are collected. Wait message until
the chocolate is delivered. And visit again! after the task is completed.
*An extra functionality is to wish for birthdays if the customer has provided their contact no.
and DOB.
4.System related family of designs
*Automatic coffee vending machine, tickets vending machine at sales point are systems
related to AVCM family.
*These machines are identified during the process and considered during the development
and designing process
5. Modular design:
System designing is decomposed into hardware and software modules.
*ACVM H/W Modules are as follows;
Microcontroller-based h/w with LCD or touch screen display, Mechanical devices to collect
coins, and Chocolate delivery slot and bowl.
*ACVM S/W modules are as follows;
GUI’S, Multiple processes, and RTOS
6. Mapping
*Mapping into various representation is done using the requirements of software.
*GUI’s on the desktop of a computer or in a mobile handset are mapped to GUI’s of ACVM.

ii. Smart Card

The design process of Smart Card includes the following steps:


1. Abstraction
*Abstraction of smart card is a plastic card of standard dimensions, 85.60* 53.98* 0.80 mm.
*Hardware is abstracted as a very small silicon chip which is a few mm in size, this small
size protects the chip from bending or mishandling.
2.Hardware and software architecture
*H\W architecture is considered as the following interconnected components;
Microcontroller, RAM, ROM, Flash memory, Timer, Interrupt controller, NFC (Near Field
Communication), and Self powered radiation falling on the cards metal plated surface.
*Software architecture is abstracted;
Boot-up, initialisation and RTOS software, and Software for communicating with host
machine.
3.Extra functional properties
*For every transaction a pin should be allotted before the card can be used.
4.System related family of design
*Credit card and debit card belong to the same family and should be taken into consideration
while designing.

5.Modular design
System designing is decomposition of hardware and software modules.
*Smart Card H/w Modules are as follows;
Microcontroller-based h/w, Charge pump for supply, Modulator for signal transmission, and
Antenna for transceiver.
*Smart Card S/W modules are as follows:
RTOS and Application software
6.MAPPING
*Mapping can be done as follows: OS with another OS, microcontroller with other
microcontroller circuits for port communication.
iii. Digital Camera
The design process of Digital Camera includes the following steps:
1. Abstraction
*Abstraction shows the hardware and software components.
*Clear visual display.
*Enhanced imaging processor.
*Should be anti-blur.
*Should record High definition video clips.
*It should have audio video output port to connect TV/DVD player.
2.Hardware and software architecture
*Hardware architecture is abstracted as;
Microcontroller or ASIP, Multiple Processor (DSP, Pixel Processor), RAM, ROM, Flash
memory, Timer, Direct memory access controller, LCD controller, and Battery.
*Software architecture is abstracted as;
CCD signal processing for off-set and Memory a file system
3.Extra functional properties
*USB and WIFI connectivity with computer and printer.
4.System related family of design
*Popular versions of digital camera family are considered.
5.Modular design
System designing is decomposition of hardware and software modules.
*Camera H/W Modules are as follows:
Display system, CD pixel processor, CODEC, JPEG encoder & decoder, Network controller,
Port controller.
*Camera S/W modules are as follows:
CCD signal processing, Jpeg coding and decoding, Pixel processing, LCD & USB port
device drivers, and Communication controller.

You might also like