ES Unit3
ES Unit3
SIETK
UNIT 3
UNIT-III DESIGN AND INTERFACING OF EMBEDDED SYSTEMS
Classes: 10
Embedded hardware and various building blocks, Processor Selection for an
Embedded System, Interfacing Processor, Memories and I/O Devices, I/O
interfacing concepts, Timer and Counting Devices. Embedded System Design and
Co-design Issues in System Development Process, Design Cycle in the
Development Phase for an Embedded System, Uses of Target System or its
Emulator and In-Circuit Emulator (ICE), Use of Software Tools for Development
of an Embedded System, Design metrics of embedded systems.
Page |1
Embedded Systems CREC
SIETK
6. Memory
Various forms of memories are used in a system. Figure shows a chart for the various forms
of memories that are present in systems. These are as follows:
(a) Internal RAM
(b) Internal ROM/PROM/EPROM
(c) External RAM for the temporary data and stack (in most systems)
(d) Internal caches (in pipelined and superscalar microprocessors)
(e) Internal EEPROM or flash
(I) Memory Stick (card): video, images, songs, or speeches and large storage in digital
camera, mobile systems
(g) External ROM or PROM for embedding soft are (in almost all other than
microcontrollers-based systems)
(h) RAM Memory buffers at the ports
Page |2
Embedded Systems CREC
SIETK
A system embeds(locates) the following either in the internal ROM, PROM or in an external
ROM or PROM of microcontroller; boot-up programs, initialization data, strings for an initial
screen-display or initial state of the system, the programs for various tasks, ISRs and
operating system kernel. The system has RAMs for saving temporary data, stack and buffers
that are needed during a program run. The system also has flash for storing non-volatile
results.
7 Input, Output and I/O Ports, I/O Buses and I/O interfaces
The system gets inputs from physical devices through the input ports. Following are the
examples
1. A system gets input from the touch screen, keypad, keyboard, sensors or transducer
circuits.
2.
A processor identifies each input port by its memory buffer address, called port address. Just
as a memory location holding a byte or word is identified by an address, each input port is
identified by the address. The system gets the inputs by the read operations at the port
addresses. The system has output ports through which it sends output bytes to the real world.
Each output port is identified by its memory-buffer address(es) called port address. The
system sends the output by a write operation to the port address. There are also general-
Page |3
Embedded Systems CREC
SIETK
purpose ports for both the input and output (I/O) operations.
8. Bus
Processor of a system might have to be connected to a number of other devices and systems.
A bus consists of a common set of lines to interconnect the multiple devices, hardware units
and systems. It enables the communication between two units at any given instance. The
remaining units remain in an in connected state during communication between these two. A
bus communication protocol specifies the ways of communication of signals on the bus. At
any instance, a pus may be a serial bus or a parallel bus transferring one bit or multiple data
bits respectively. Protocol also specifies ways of arbitration when several devices need to
communicate through the bus. Alternatively, protocol specifies ways of polling from each
device for need of the bus at an instance. Protocol also specifies ways of daisy chaining the
devices so that, at an instance, the bus is -anted to a device according to the device priority in
the chain.
Page |4
Embedded Systems CREC
SIETK
on the LCD display screen on touch plate. A user can enter the inputs using touches. A tile is
displayed for a command on the LCD display screen. User can enter the command using
touch at the tile.
A keypad or keyboard may interface to a system. The system may provide necessary
interfacing circuit and software to receive inputs directly from the keys or touch screen
controller
13. Interrupt Handler:
A system may process a number of devices. The system processor controls and handles the
requirements of each device by running an appropriate ISR for each interrupting event, An
interrupts-handling mechanism must exist in each system. It handles interrupts from various
events or processors in the system. The system handled multiple interrupts, which may be
simultaneously pending for service.
Page |5
Embedded Systems CREC
SIETK
2. Internal bus width in Bits
3, CISC or RISC
architecture
4. Pipeline and superscalar architecture
5. On-Chip RAM and/or register file bytes
6. instruction cache
7. Data cache
8. Program memory EPROM/EEPROM/Flash
9. Program memory capacity in bytes
10. Data/Stack memory capacity in bytes
11. Main memory Harvard or Princeton architecture
Page |6
Embedded Systems CREC
SIETK
Interfacing Processor, Memories and I/O Devices:
Computer-System Buses:
Bus is set of parallel lines (wires) which carry signals from one unit to another unit. Bus lines
interconnect several units, but at a given instance, only two of them communicate. Bus
enables interconnections among many units in a simple way. The signals are in specific
sequences according to a method or protocol. Computing system buses are as follows:
• System Bus also called memory bus, which interconnects the subsystems. it interconnects
the processor to memory system and other hardware units. This bus has high speed and
bandwidth. It is according to the processor, memory system bandwidth, and for read-write
cycles of instructions and data. (Bandwidth means number of bits transferred per second.)
• I/O Bus also called peripheral bus. interconnects the memory bus to a variable number of
I/O devices functioning at variable speeds. Devices or peripherals are designed to interface to
the I/O bus. The devices can be attached or withdrawn from the I/O bus at any time.
CPU/Microprocessor System buses Computing system hardware consists of processor,
memory and 1/O units (ports, devices and peripherals). System bus enables the
interconnections among multiple subsystems in the system CPU/microprocessor/processor in
a computing system interconnects to memory, I/O units, devices and peripherals through a
bus, called system bus or system memory bus. Three sets of signals—classified as address
bus, data bus and control bus define the system bus. A system-bus interfacing-design is
according to the timing diagram oldie processor signals, bus bandwidth and word length. A
simple structure of system bus is that same bus, which connects the memory also connects the
other subs stems (I/O units. ports, devices and peripherals). Processor interfaces memory as
well as I/O devices using system memory bus. Figure (a) shows the interfacing of processor,
memory and I/O devices using memory system bus in a simple bus structure.
1. Address Bus
Address bus signals are from processor to memory or other interfaced units. Address bus is
unidirectional When it has ‘n’ signals A0 to An-1, the Processor issues (send) addresses
between 0 and 2n-1 using the bus. The processor issues the address of the instruction byte or
word to the memory system. The address bus communicates the address to the memory. The
address bus of 32 bits fetches the instruction or data when an address specified by a 32-bit
number, between 0 and 232-1.
Page |7
Embedded Systems CREC
SIETK
Fig(a) Interfacing of processor, memory and I/O devices using memory system bus
2. Data Bus
A data bus is bidirectional. If it has ‘m’ bits then signals are D0-Dm-1 and processor reads a
word or instruction or writes a word. Data signals are from processor to memory during read
Page |8
Embedded Systems CREC
SIETK
cycle and memory to processor during write cycle. A data bus of 8, 16, 32 or 64 bits fetches,
loads, or stores the instruction or data.
• Read Cycle: Read cycle means a sequence of signals during which using the data-bus
processor (i) fetches instruction from program-memory section of memory, or (ii) loads data
word from data-memory section of memory. When the processor issues the address of the
instruction. it gets back the instruction from memory through the data bus. When it issues the
address of the data it processor loads the data through the data bus into a register.
• Write Cycle: Write cycle means a sequence of signals during which, using data bus, the
processor sends data word to data-memory address in memory. When it issues the address of
the data it stores the data in the memory through the data bus.
3. Control Bus
A control bus issues signals to control the timing of various actions during communication of
signals. These signals synchronize the subsystems.
(a) When the processor issues the address, after allowing sufficient time for the set-up of all
address bits, it also issues a memory-read control signal and waits for the data or instruction
after a time interval. A memory unit must place the instruction or data during the interval in
which memory-read signal is active (not inactivated by the processor).
(b) When the processor issues the address on the address bus, and (after allowing sufficient
time for the set-up of all address bits) it places the data on the data bus, it also then issues
memory-write control signal (after allowing sufficient time for the set-up of all data bits) for
store signal to memory. The memory unit must write (store) the data during the interval in
which memory-write is active (not inactivated by the processor).
Page |9
Embedded Systems CREC
SIETK
P a g e | 10
Embedded Systems CREC
SIETK
Fig(b) I/O devices and components interfacing circuit using I/O bus
P a g e | 11
Embedded Systems CREC
SIETK
The difference between the two schemes occurs within the microprocessor. Intel has, for
the most part, used the port mapped scheme for their microprocessors and Motorola has
used the memory mapped scheme.
As 16-bit processors have become obsolete and replaced with 32-bit and 64-bit in general
use, reserving ranges of memory address space for I/O is less of a problem, as the
memory address space of the processor is usually much larger than the required space for
all memory and I/O devices in a system.
Therefore, it has become more frequently practical to take advantage of the benefits of
memory-mapped I/O. However, even with address space being no longer a major
concern, neither I/O mapping method is universally superior to the other, and there will
be cases where using port-mapped I/O is still preferable.
Memory-mapped IO (MMIO):
I/O devices are mapped into the system memory map along with RAM and ROM. To access
a hardware device, simply read or write to those 'special' addresses using the normal memory
access instructions.
The advantage to this method is that every instruction which can access memory can be used
to manipulate an I/O device.
The disadvantage to this method is that the entire address bus must be fully decoded for every
device. For example, a machine with a 32-bit address bus would require logic gates to resolve
the state of all 32 address lines to properly decode the specific address of any device. This
increases the cost of adding hardware to the machine.
Port-mapped IO (PMIO or Isolated IO):
I/O devices are mapped into a separate address space. This is usually accomplished by having
a different set of signal lines to indicate a memory access versus a port access. The address
lines are usually shared between the two address spaces, but less of them are used for
accessing ports. An example of this is the standard PC which uses 16 bits of port address
space, but 32 bits of memory address space.
P a g e | 12
Embedded Systems CREC
SIETK
The advantage to this system is that less logic is needed to decode a discrete address and
therefore less cost to add hardware devices to a machine. On the older PC compatible
machines, only 10 bits of address space were decoded for I/O ports and so there were only
1024 unique port locations; modern PC's decode all 16 address lines. To read or write from a
hardware device, special port I/O instructions are used.
From a software perspective, this is a slight disadvantage because more instructions are
required to accomplish the same task. For instance, if we wanted to test one bit on a memory
mapped port, there is a single instruction to test a bit in memory, but for ports we must read
the data into a register, then test the bit.
Memory-mapped IO Port-mapped IO
Same address bus to address memory and I/O Different address spaces for memory
devices and I/O devices
IO is treated as memory IO is treated as IO
16-bit addressing is used 8-bit addressing is used
More decoder hardware is used Less decoder hardware is used
Can access 216 = 64k locations theoretically Can address 216 =256 locations
Access to the I/O devices using regular Uses a special class of CPU instructions
instructions to access I/O devices
Memory instructions are used Special IN and OUT instructions
Arithmetic and logic operations can be Arithmetic and logic operations cannot
performed directly on data be performed directly on data
Data transfer b/w accumulator and I/O
Data transfer b/w register and I/O
P a g e | 13
Timer and
Counting Devices:
Timing Devices
• A device, which counts the input at regular interval (δT) using clock pulses at
its input.
• The counts are incremented on each pulse and stored in a register, called
count register.
• A timer is a specialized type of clock which is used to measure time
intervals.
• A timer uses the frequency of the internal clock, and generates delay.
• Evaluation of Time
• The counts multiplied by the interval δT gives the time.
• For example, if a particular clock’s frequency is 1 MHz (period 1 µs), and
we have counted 3000 pulses on the clock signal, then the elapsed time is
3000 microseconds.
• The (present counts -initial counts) xδT interval gives the time interval
between two instances when present count bits are read and initial counts
were read or set.
• Suppose, we want to measure the time elapsed between any two successive
events.
• Lets assume that when the first event occurs, the timer is reset to zero, and
when the second event occurs, the timer output is 25000. If we know that
the input clock has period of 1 µs, then the time elapsed between the two
events is 25000×1 µs = 25 milliseconds.
• The (present counts -initial counts) xδT interval gives the time interval
between two instances when present count bits are read and initial counts
were read or set.
• Since this timer’s counter can count from 0 to 65535 (2 16-1), this particular
arrangement can measure time ranging from 0 to 65535 x 1 µs = 65.535
milliseconds, with a resolution of 1 µs.
• Has an input pin (or a control bit in control register) for resetting it for all
count bits = 0s.
• Has an output pin (or a status bit in status register) for output when all count
14
bits = 0s after reaching the maximum value, which also means after timeout
or overflow.
Counting Devices
• device, which counts the input due to the events at irregular or regular
intervals.
• A counter is a device that stores (and sometimes displays) the number of
times a particular event or process occurred, with respect to a clock signal.
• It is used to count the events happening outside the microcontroller.
• In electronics, counters can be implemented quite easily using register-type
circuits such as a flip- flop.
• A counter uses an external signal to count pulses.
• Free Running (Blind Counting) Device with a Pre-scaler, Compare and
Capture Registers.
• Pre-scalar can be programmed as p = 1, 2, 4, 8, 16, 32, .. by programming a
Pre-scaler register.
• Pre-scalar divides the input pulses as per the programmed value of p.
• Count interval = p xδT interval
• δ T = clock pulses period, clock frequency = δ T -1
• It has an output pin (or a status bit in status register) for output when all
count bits = 0s after reaching the maximum value, which also means after
timeout or overflow.
• Free running n-bit counter overflows after
p x( 2n -1)xδT interval
• This device useful for the Alarm or Processor Interrupts after preset
intervals with respect to another event from another source.
• For example, if we use a Prescaler to our previous 16-bit timer to divide the
clock frequency by 8, then the new range of the timer will be 65535 x 8 µs
15
= 524.280 milliseconds.
• Most microcontrollers are equipped with one or more precision timing
systems that can be used to perform a variety of precision timer functions
including generating events at specific times, determining the duration
between two events, or counting events.
• Example applications that require generating events include generating an
accurate 1 Hz signal in a digital watch, keeping a traffic light green for a
specific duration, or communicating bits serially between devices at a
specific rate, etc.
• Timer States
• A timer cum counting device is a counting device that has two functions.
• (1) It counts the input due to the events at irregular instances.
• (2) It counts the clock input pulses at irregular intervals.
16
Ten Forms of a Timer
17
• SWT
• Innovative concept –VIRTUAL Timing device.
• A software, which executes and increases or decreases a count-
variable(count value) on an interrupt from system timer output or real time
clock interrupt.
• The software timer also generates interrupt on overflow of count-value or
on finishing value of the count variable.
• System Clock
• A hardware-timing device programmed to tick at constant intervals δT.
• An interrupt at each tick
• A chain of interrupts thus occur at periodic intervals.
• δ T is as per a preset count value
• The interrupts are called system clock interrupts, when used to control the
schedules and timings in the system
SWT and System clock
✓ System clock has fixed program to tick at constant intervals δT.
✓ SWTs have fixed but programmable to tick at intervals δT.
✓ An interrupt at each tick in both
W
a
t
18
c
h
d
o
g
T
i
m
e
r
✓ A timing device such that it is set for a preset time interval and an event
must occur during that interval else the device will generate the timeout
signal on failure to get that event in the watched time interval.
E
x
a
m
p
l
e
19
Watchdog Timer Application
✓ An application in mobile phone is that display is off in case no GUI
interaction takes place within a watched time interval.
✓ The interval is usually set at 15 s, 20 s, 25 s, 30 s in mobile phone.
✓ Mobile thus saves the power
✓ An application in temperature controller
✓ If controller takes no action to switch off the current within preset
watched time interval, the current switched off
✓ Warning signal raised as indication of controller failureFailure to switch off
current may burst a boiler in which water is heated.
RTC Application
• Assume that a hardware timer of an RTC for calendar is programmed to
interrupt after every 5.15 ms (=1 day period/ 224)
• Assume each tick (interrupt) a service routine runs and updates at a memory
location. Within one day (86400 s) there will be 224 ticks, the memory
location will reach 0x000000 after reaching the maximum value 0xFFFFFF.
RTC with 5.5 ms tick
• Within 256 days there will be 232 ticks, the memory location will reach
0x00000000 after reaching the maximum value 0xFFFFFFFF.
• A battery is used to protect the
memory for long period RTC for
implementing a software timer
• A hardware 16-bit timer ticks from processor clock after 0.5 µs. It will
overflow and execute an overflow interrupt service routine after 215 µs =
32.768 ms.
• The interrupt service routine can generate a port bit output after every time
20
it runs or can call a software routine or send a message for a task. If n = 30,
the RTC initiated software will run every 30 × 32.768 ms, which is close to
1 s.
Unmask and reset to mask of real time interrupt
• RTI is set to unmask and reset to mask the real time interrupt locally.
• If RTI and I bits permit the interrupt request for real time, the
microcontroller fetches the lower and higher bytes of the interrupt servicing
routine address from the addresses 0xFFF0 (higher byte) and 0xFFF1
(lower byte)
I/O TYPES AND EXAMPLES:
A port at a device can transmit (send) or receive through wire or wireless. Input port means a
circuit to where bit or bits can be input (received) from an external device, peripheral or
system. Output port means a circuit from where bit or bits can be output (sent) to an external
device, peripheral or system. Input-Output (I/O) port means a circuit where bit(s) can be input
or output. There are two types of I/Os, serial and parallel. Serial means in series of successive
instants. Parallel means at the same instance.
1. Serial Input Serial input port means a circuit to where bits can be input (received) in
successive time intervals. The time interval is known to the receiver port. The port assembles
the bits on receiving at successive instances.
2. Serial Output Serial output port means a circuit from where bits can be output (sent) in
successive time intervals. A time interval is known to the external device or system. The
external device assembles the bits on receiving at successive instances from the output port.
3. Serial I/O Serial Input-Output (I/O) port means a circuit where serially received or sent bits
can be input or output.
4. Parallel Input Parallel input port means a circuit where bits can be input (received) at an
instant. The processor at the input device, circuit or system reads the bits from the port at next
instant.
5. Parallel Output Parallel output port means a circuit from where bits can be output (sent) at
an instant. The external trial device can read the bits at the output port.
6. Parallel I/O Parallel Input-Output (I/O) port means a circuit where received or sent bits in
parallel can be input or output.
7. I/O Types (i) Serial Input, (ii) Synchronous Serial Output, (iii) Asynchronous Serial Input,
(iv) Asynchronous Sena u..tput, (v) Parallel Port One-bit Input, (vi) Parallel Port One-bit
Output, (vii) Parallel Port Input, and (viii) Parallel. Port Output.
Synchronous serial input:
The upper part of figure shows a synchronous input serial port at a device or system. Each bit
in each byte is in synchronisation and each received byte is in synchronisation.
Synchronisation means separation by a constant time interval or phase difference. A port
(device) processing element reads a successive instances and saves each byte at a port buffer
(register).
21
Synchronous serial output:
The middle part of Figure shows a synchronous output serial port. The serial port device
optionally also sends the clock pulses at clock pin SCLK. Each bit in each byte is in
synchronisation with a clock. The serial port at device optionally sends the clock pulses at
SCLK pin.
Fig(1.a)
22
Synchronous Serial Input/Output:
Figure at the left lower part shows a synchronous serial I/O port. Each bit in each byte is in
synchronisation at input with a clock input (optional) and each bit in each byte is in
synchronisation at output with the clock output (output). The bytes are sent or received at
constant rates
Asynchronous Serial Input:
Figure (b) on the left side shows asynchronous input serial port line SI (receive data). Each
bit is received in each byte at fixed intervals but each received byte need not be in
synchronisation. The bytes can separate by the variable intervals or phase differences.
Each bit at input port separates by T and bit transfer rate (for the serial line bits) is (1/T) baud
per second (bps), but different bytes are received at varying intervals. Baud is taken from a
German word for raindrops. Bytes pour from the sender like raindrops at irregular intervals.
The sender does not send the clock pulses along with the hits.
Asynchronous Serial Output:
Figure (1.b) on the left side shows as output serial port line SO (transmit data). Each bit in
each byte is at fixed intervals but each output byte need not in synchronisation (separates by a
variable interval or phase difference).
Fig(2) (a)m-bit parallel ports with m = 1,2,…7,8 (b) Two m/2 bit subsets for output bits in
parallel.
23
Serial Communication and Advanced I/O:
Refer 5th unit “Synchronous/Asynchronous Interfaces (like UART, SPI,
I2C, and USB)” topic
Buses between the Networked Multiple Devices:
24
multiple slaves. This is really useful when you want to have more than one microcontroller
logging data to a single memory card or displaying text to a single LCD.
I2C protocol uses two wires for data transfer between devices: Serial Data Line (SDA) and
Serial Clock Line (SCL). The reduction in number of pins in comparison with parallel data
transfer is evident. This reduces the cost of production, package size and power consumption.
I2C is also best suited protocol for battery operated devices. I2C is also referred as two wire
serial interface (TWI).
SDA (Serial Data) – The line for the master and slave to send and receive data.
SCL (Serial Clock) – The line that carries the clock signal.
I2C is a serial communication protocol, so data is transferred bit by bit along a single wire
(the SDA line).
Like SPI, I2C is synchronous, so the output of bits is synchronized to the sampling of bits by
a clock signal shared between the master and the slave. The clock signal is always controlled
by the master.
CAN: A number of devices located and are distributed in a Vehicular Control Network
automobile uses a number of distributed embedded controllers. The controllers provide the
controls for brakes, engines. electric power. lamps. temperature, air conditioning, car gate.
front display panels. and cruising.
25
The embedded controllers are networked and are controlled through a controller network bit.
Figure (a) shows a network of number of CAN controllers and CAN devices on a CAN bus.
Figure (b) shows six fields and interframe bits during a transfer of data bits on CAN bus, and
timing formats and sequences of frame bits.
26
Various versions USB:
USB1.0: USB 1.0 is the original release of USB having the capability of transferring
12Mbps, supporting up to 127 devices. This USB 1.0 specification model was introduced in
January 1996.
USB1.1: USB 1.1 came out in September 1998. USB 1.1 is also known as full-speed USB.
This version is similar to the original release of USB; USB version 1.1 supported two speeds,
a full speed mode of 12Mbits/s and a low speed mode of 1.5Mbits/s.
USB2.0: Hewlett-Packard, Intel, LSI Corporation, Microsoft, NEC, and Philips jointly led the
initiative to develop a higher data transfer rate than the 1.1 specifications. USB 2.0, also
known as hi-speed USB. This hi-speed USB is capable of supporting a transfer rate of up to
480 Mbps, compared to 12 Mbps of USB 1.1. That's about 40 times as fast!
USB3.0: It is also called as Super-Speed USB having a data transfer rate of 4.8Gbps(~5Gbps)
That means it can deliver over 10x the speed of today's Hi-Speed USB connections
USB 3.1 : is the latest version of USB also known as Super-Speed USB+, which having data
transfer rate of 10Gbps.
The USB system is made up of a host, multiple numbers of USB ports, and multiple
peripheral devices connected in a tiered-star topology.
27
Embedded System Design and Co-design Issues in System
Development Process:
There are two approaches for the embedded-system design. (1) The software development
life cycle ends and the life cycle for the process of integrating the software into the hardware
begin at the time when a system is designed. (2) Both cycles concurrently proceed when co-
designing a time-critical sophisticated system.
The final design, when implemented, gives the targeted embedded system, and thus the final
product. Therefore, an understanding of the (a) software and hardware designs and
integrating both into a system, and (b) hardware-software co-designing are important aspects
of designing embedded systems. There is a hardware- software trade-off.
The selection of the hardware during hardware design and an understanding of the
possibilities and capabilities of hardware during software design are critical especially for a
sophisticated embedded-system development.
Choosing the Right Platform
1. Hardware- software trade-off -There is a trade-off between the hardware and software. It is
possible that certain subsystems in hardware, I/O memory access, real-time clock, system
clock, pulse-width modulation, timer, and serial communication are also implemented by the
software.
Hardware implementation provides the following advantages (i) Reduced memory for the
program (ii)Reduced Number of chips but an increased cost (iii) Simple coding for the device
drivers (iv) Internally embedded codes, which are more secure than at the external ROM.
Software implementation provides the following advantages: (i) Easier to change when new
hardware versions become available (ii) Programmability for complex operations (iii) faster
development time (iv) Modularity and portability (v) Use of a standard software-engineering
model (vi) RTOS (vii) Faster speed of operation of complex functions with high-speed
microprocessors (viii) Less cost for simple systems.
Choosing a Right Platform- A timer is a specialized type of clock which is used to measure
time intervals. A timer that counts from zero upwards for measuring time elapsed is often
called a stopwatch. It is a device that counts down from a specified time interval and
used to generate a time delay, for example, an hourglass is a timer.
A counter is a device that stores (and sometimes displays) the number of times a
particular event or process occurred, with respect to a clock signal. It is used to count
the events happening outside the microcontroller. In electronics, counters can be
implemented quite easily using register-type circuits such as a flip-flop.
Timer Counter
A timer uses the frequency of the A counter uses an external signal to count pulses.
internal clock, and generates delay.
2. System design of an embedded system also involves choosing a right platform. A platform
consists of a number of following units.
Processor, ASIP or ASSP, Multiple Processors, System-on-Chip, Memory Other Hardware
Units of System, Buses, Software language, RTOS, Code generation tools, tools for finally
embedding the software into binary image.
3. Embedded System Processors' Choice
■ Processor-Less System -We have an alternative to a microprocessor microcontroller or
DSP. Figure (a) shows the use of a PLC in place of a processor. We can use a PLC for the
clothes-in clothes-out type system. A PLC fabricates by the programmable gates, PALs
GALs, PLDs and CPLDs.
31
embedded system implies that both software and hardware are being designed in parallel.
Although this isn’t always the case, it is a reality for many designs today. The profound
implications of this simultaneous design process heavily influence how systems are designed.
Figure shows the development process or an embedded system and Figure edit-test-debug
cycle during implementation phase of the development process. There are cycles of editing-
testing-debugging during the development phase, Whereas the processor part once chosen
remains fixed, the application software codes have to be perfected by a number of runs and
tests. Whereas the cost of the processor is quite small. The cost of developing a final targeted
system is quite high and needs a larger time frame Man the hardware circuit design.
The developer uses four main approaches to the edit-test-debug cycles.
I. An IDE or prototype tool
2. A simulator without any hardware
3. Processor only at the target system and uses an in-between ICE (in-circuit-emulator).
4. Target system at the lest stage.
An in-circuit emulator (ICE) provides a window into the embedded system. The
programmer uses the emulator to load programs into the embedded system, run them, step
through them slowly, and view and change data used by the system's software.
32
An emulator gets its name because it emulates (imitates) the central processing unit
(CPU) of the embedded system's computer. Traditionally it had a plug that inserts into the
socket where the CPU integrated circuit chip would normally be placed. Most modern
systems use the target system's CPU directly, with special JTAG-based debug access.
Emulating the processor, or direct JTAG access to it, lets the ICE do anything that the
processor can do, but under the control of a software developer.
ICEs attach a computer terminal or personal computer (PC) to the embedded system.
The terminal or PC provides an interactive user interface for the programmer to investigate
and control the embedded system. For example, it is routine to have a source code level
debugger with a graphical windowing interface that communicates through a JTAG adapter
(emulator) to an embedded target system which has no graphical user interface.
Notably, when their program fails, most embedded systems simply become inert
lumps of non-functioning electronics. Embedded systems often lack basic functions to detect
signs of software failure, such as a memory management unit (MMU) to catch memory
access errors. Without an ICE, the development of embedded systems can be extremely
difficult, because there is usually no way to tell what went wrong. With an ICE, the
programmer can usually test pieces of code, then isolate the fault to a particular section of
code, and then inspect the failing code and rewrite it to solve the problem.
Note: Debugging is the process of finding and resolving defects or problems within a
computer program that prevent correct operation of computer software or a system.
33
Use of Software Tools for Development of an Embedded System
Refer 1st unit topic “Software Tools used for Development of an Embedded
System”
35