Chapter 1 Introduction
Chapter 1 Introduction
Chapter 1 Introduction
INTRODUCTION
An embedded system can be defined as a computing device that does a specific focused job.
Appliances such as the air-conditioner, VCD player, DVD player, printer, fax machine, mobile phone etc.
are examples of embedded systems. Each of these appliances will have a processor and special hardware
to meet the specific requirement of the application along with the embedded software that is executed
by the processor for meeting that specific requirement. The embedded software is also called “firm
ware”. The desktop/laptop computer is a general purpose computer. You can use it for a variety of
applications such as playing games, word processing, accounting, software development and so on. In
contrast, the software in the embedded systems is always fixed listed below:
Embedded systems do a very specific task they cannot be programmed to do different things.
Embedded systems have very limited resources, particularly the memory. Generally, they do not have
secondary storage devices such as the CDROM or the floppy disk. Embedded systems have to work
against some deadlines. A specific job has to be completed within a specific time. In some embedded
systems, called real-time systems, the deadlines are stringent. Missing a deadline may cause a
catastrophe-loss of life or damage to property. Embedded systems are constrained for power. As many
embedded systems operate through a battery, the power consumption has to be very low. Some
embedded systems have to operate in extreme environmental conditions such as very high temperatures
and humidity.
Embedded systems are not general-purpose computers. Embedded system designs are Optimized
for a specific application. Many of the job characteristics are known before the hardware is designed.
This allows the designer to focus on the specific design constraints of a well defined application. As such,
there is limited user reprogram ability. Some embedded systems, however, require the flexibility of
reprogrammability. Programmable DSPs are common for such applications.
A typical embedded systems model responds to the environment via Sensors and control the
environment using actuators. This requires embedded systems to run at the speed of the environment.
This characteristic of embedded system is called “reactive”. Reactive computation means that the system
(primarily the software component) executes in response to external events.
External events can be either periodic or aperiodic. Periodic events make it easier to schedule
processing to guarantee performance. Aperiodic events are harder to schedule. The maximum event
arrival rate must be estimated in order to accommodate worst case situations. Most embedded systems
have a significant reactive component.
2.1.1.4. Heterogeneous
Embedded systems often are composed of heterogeneous architectures (Figure 4). They may
contain different processors in the same system solution. They may also be mixed signal systems. The
combination of I/O interfaces, local and remote memories, and sensors and actuators makes embedded
system design truly unique. Embedded systems also have tight design constraints, and heterogeneity
provides better design flexibility.
2.1.2. Requirements
Embedded systems are unique in several ways, as described above. When designing
Embedded systems, there are several categories of requirements that should be Considered:
· Functional Requirements
· Temporal Requirements (Timeliness)
· Dependability Requirements.
Functional Requirements
Functional requirements describe the type of processing the system will perform. This
Processing varies, based on the application. Functional requirements include the Following;
· Data Collection requirements
· Sensor requirements
· Signal conditioning requirements
· Alarm monitoring requirements
· Direct Digital Control requirements
· Actuator control requirements
· Man-Machine Interaction requirements
(Informing the operator of the current state of a controlled object for example. These interfaces
can be as simple as a flashing LED or a very complex GUI-based system. They include the ways
that embedded systems assist the operator in controlling the object/system.
2.1.3.Processor selection.
Typically, as the application complexity increases, the need for a greater bit-width
processor increases. The selection of the CPU will greatly impact performance of the overall
system. Specifically, features like 8 / 16 / 24 / 32 bit architecture, RISC / CISC / DSP
architecture, cache, MMU, pipelining, branch prediction and super-scalar architecture, all affect
the speed of a system.Depending on system needs, these features may be necessary to achieve
peak performance of the system.
There are various benchmarking threshold data available for various 8/16/32 bit processors
like MIPS (Million Instructions per Second), EEMBC, Dhrystone, MIPS/MHz etc, which can be
taken as reference or comparison base.
CISC Vs RISC.
CISC is an acronym for Complex Instruction Set Computer and are chips that are easy to
program and which make efficient use of memory. Since the earliest machines were programmed
in assembly language and memory was slow and expensive, the CISC philosophy made sense,
and was commonly implemented in such large computers as the PDP-11 and the DECsystem 10
and 20 machines. Most common microprocessor designs such as the Intel 80x86 and Motorola
68K series followed the CISC philosophy. But recent changes in software and hardware
technology have forced a re-examination of CISC and many modern CISC processors are
hybrids, implementing many RISC principles.
The design constraints that led to the development of CISC (small amounts of slow memory
and fact that most early machines were programmed in assembly language) give CISC
instructions sets some common characteristics:
· A 2-operand format, where instructions have a source and a destination. Register to
register, register to memory, and memory to register commands. Multiple addressing modes for
memory, including specialized modes for indexing through arrays
· Variable length instructions where the length often varies according to the addressing
mode
· Instructions which require multiple clock cycles to execute.
· Most CISC hardware architectures have several characteristics in common:
· Complex instruction-decoding logic, driven by the need for a single instruction to support
multiple addressing modes.
· A small number of general purpose registers. This is the direct result of having
instructions which can operate directly on memory and the limited amount of chip space not
dedicated to instruction decoding, execution, and microcode storage.
· Several special purpose registers. Many CTSC designs set aside special registers for the
stack pointer, interrupt handling, and so on. This can simplify the hardware design somewhat, at
the expense of making the instruction set more complex.
· A 'Condition code" register which is set as a side-effect of most instructions. This register
reflects whether the result of the last operation is less than, equal to, or greater than zero and
records if certain error conditions occur.
At the time of their initial development, CISC machines used available technologies to
optimize computer performance.
Designers soon realized that the CISC philosophy had its own problems, including:
· Earlier generations of a processor family generally were contained as a subset in every
new version - so instruction set & chip hardware become more complex with each generation of
computers.
· So that as many instructions as possible could be stored in memory with the least possible
wasted space, individual instructions could be of almost any length - this means that different
instructions will take different amounts of clock time to execute, slowing down the overall
performance of the machine.
· Many specialized instructions aren't used frequently enough to justify their existence
-approximately 20% of the available instructions are used in a typical program.
· CISC instructions typically set the condition codes as a side effect of the instruction. Not
only does setting the condition codes take time, but programmers have to remember to examine
the condition code bits before a subsequent instruction changes them.
As memory speed increased, and high-level languages displaced assembly language, the
major reasons for CISC began to disappear, and computer designers began to look at ways
computer performance could be optimized beyond just making faster hardware.
One of their key realizations was that a sequence of simple instructions produces the same results
as a sequence of complex instructions, but can be implemented with a simpler (and faster)
hardware design. (Assuming that memory can keep up.) RISC (Reduced Instruction Set
Computers) processors were the result. CISC and RISC implementations are becoming more and
more alike. Many of today’s RISC chips support as many instructions as yesterday's CISC chips.
And today's CISC chips use many techniques formerly associated with RISC chips.
Nearly 99 per cent of the processors manufactured end up in embedded systems. The
embedded system market is one of the highest growth areas as these systems are used in very market
segment- consumer electronics, office automation, industrial automation, biomedical engineering,
wireless communication, data communication, telecommunications, transportation, military and so on.
At home we use a number of embedded systems which include digital camera, digital diary, DVD
player, electronic toys, microwave oven, remote controls for TV and air-conditioner, VCO player, video
game consoles, video recorders etc. Today’s high-tech car has about 20 embedded systems for
transmission control, engine spark control, air-conditioning, navigation etc. Even wrist watches are now
becoming embedded systems. The palmtops are powerful embedded systems using which we can carry
out many general-purpose tasks such as playing games and word processing.
The office automation products using embedded systems are copying machine, fax machine, key
telephone, modem, printer, scanner etc.
Today a lot of industries use embedded systems for process control. These include
pharmaceutical, cement, sugar, oil exploration, nuclear energy, electricity generation and transmission.
The embedded systems for industrial use are designed to carry out specific tasks such as monitoring the
temperature, pressure, humidity, voltage, current etc., and then take appropriate action based on the
monitored levels to control other devices or to send information to a centralized monitoring station. In
hazardous industrial environment, where human presence has to be avoided, robots are used, which are
programmed to do specific jobs. The robots are now becoming very powerful and carry out many
interesting and complicated tasks such as hardware assembly.
2.2.4 Medical electronics:
Almost every medical equipment in the hospital is an embedded system. These equipments
include diagnostic aids such as ECG, EEG, blood pressure measuring devices, X-ray scanners; equipment
used in blood analysis, radiation, endoscopy etc. Developments in medical electronics have paved way
for more accurate diagnosis of diseases.
Computer networking products such as bridges, routers, Integrated Services Digital Networks
(ISDN), Asynchronous Transfer Mode (ATM), X.25 and frame relay switches are embedded systems which
implement the necessary data communication protocols. For example, a router interconnects two
networks. The two networks may be running different protocol stacks. The router’s function is to obtain
the data packets from incoming pores, analyze the packets and send them towards the destination after
doing necessary protocol conversion. Most networking equipments, other than the end systems
(desktop computers) we use to access the networks, are embedded systems.
2.2.6 Telecommunications:
Avances in mobile communications are paving way for many interesting applications using
embedded systems. The mobile phone is one of the marvels of the last decade of the 20’h century. It is a
very powerful embedded system that provides voice communication while we are on the move. The
Personal Digital Assistants and the palmtops can now be used to access multimedia services over the
Internet. Mobile communication infrastructure such as base station controllers, mobile switching centers
are also powerful embedded systems.
2.2.8 Insemination:
Testing and measurement are the fundamental requirements in all scientific and engineering
activities. The measuring equipment we use in laboratories to measure parameters such as weight,
temperature, pressure, humidity, voltage, current etc. are all embedded systems. Test equipment such as
oscilloscope, spectrum analyzer, logic analyzer, protocol analyzer, radio communication test set etc. are
embedded systems built around powerful processors. Thank to miniaturization, the test and measuring
equipment are now becoming portable facilitating easy testing and measurement in the field by field-
personnel.
2.2.9 Security:
Security of persons and information has always been a major issue. We need to protect our
homes and offices; and also the information we transmit and store. Developing embedded systems for
security applications is one of the most lucrative businesses nowadays. Security devices at homes,
offices, airports etc. for authentication and verification are embedded systems. Encryption devices are
nearly 99 per cent of the processors that are manufactured end up in~ embedded systems.
2.2.10 Finance:
Financial dealing through cash and cheques are now slowly paving way for transactions using
smart cards and ATM (Automatic Teller Machine, also expanded as Any Time Money) machines. Smart
card, of the size of a credit card, has a small micro-controller and memory; and it interacts with the
smart card reader! ATM machine and acts as an electronic wallet. Smart card technology has the
capability of ushering in a cashless society. Well, the list goes on. It is no exaggeration to say that eyes
wherever you go, you can see, or at least feel, the work of an embedded system.
Every embedded system consists of custom-built hardware built around a Central Processing
Unit (CPU). This hardware also contains memory chips onto which the software is loaded. The software
residing on the memory chip is also called the ‘firmware’.
Now, let us see the details of the various building blocks of the hardware of an embedded system.
· Input Devices
· Output devices
· Communication interfaces
.Application-specific circuitry
Fig 2.2 Working of cpu in arm7
The Central Processing Unit (processor, in short) can be any of the following: microcontroller,
microprocessor or Digital Signal Processor (DSP). A micro-controller is a low-cost processor. Its main
attraction is that on the chip itself, there will be many other components such as memory, serial
communication interface, analog-to digital converter etc. So, for small applications, a micro-controller is
the best choice as the number of external components required will be very less. On the other hand,
microprocessors are more powerful, but you need to use many external components with them. D5P is
used mainly for applications in which signal processing is involved such as audio and video processing.
Memory:
The memory is categorized as Random Access 11emory (RAM) and Read Only Memory (ROM).
The contents of the RAM will be erased if power is switched off to the chip, whereas ROM retains the
contents even if the power is switched off. So, the firmware is stored in the ROM. When power is
switched on, the processor reads the ROM; the program is program is executed.
Input devices:
Unlike the desktops, the input devices to an embedded system have very limited capability.
There will be no keyboard or a mouse, and hence interacting with the embedded system is no easy task.
Many embedded systems will have a small keypad-you press one key to give a specific command. A
keypad may be used to input only the digits. Many embedded systems used in process control do not
have any input device for user interaction; they take inputs from sensors or transducers 1’fnd produce
electrical signals that are in turn fed to other systems.
Output devices:
The output devices of the embedded systems also have very limited capability. Some embedded
systems will have a few Light Emitting Diodes (LEDs) to indicate the health status of the system modules,
or for visual indication of alarms. A small Liquid Crystal Display (LCD) may also be used to display some
important parameters.
Interfaces:
The embedded systems may need to, interact with other embedded systems at they may have to
transmit data to a desktop. To facilitate this, the embedded systems are provided with one or a few
communication interfaces such as RS232, RS422, RS485, Universal Serial Bus (USB), IEEE 1394, Ethernet
etc.
Application-specific circuitry:
Sensors, transducers, special processing and control circuitry may be required fat an embedded
system, depending on its application. This circuitry interacts with the processor to carry out the
necessary work. The entire hardware has to be given power supply either through the 230 volts main
supply or through a battery. The hardware has to design in such a way that the power consumption is
minimized.
Wireless Communication: