embedded system(www.citystudentsgroup.blogspot.com)
TRANSCRIPT
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
1/722
Module1
IntroductionVersion 2 EE IIT, Kharagpur 1
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
2/722
Lesson
1Introduction to Real TimeEmbedded Systems Part I
Version 2 EE IIT, Kharagpur 2
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
3/722
Example, Definitions, Common Architecture
Instructional Objectives
After going through this lesson the student would be able to
Know what an embedded system is
distinguish a Real Time Embedded System from other systems
tell the difference between real and non-real time
Learn more about a mobile phone
Know the architecture
Tell the major components of an Embedded system
Pre-Requisite
Digital Electronics, Microprocessors
Introduction
In the day-to-day life we come across a wide variety of consumer electronic products. Weare habituated to use them easily and flawlessly to our advantage. Common examples are TV
Remote Controllers, Mobile Phones, FAX machines, Xerox machines etc.
However, we seldom ponder over the technology behind each of them. Each of these
devices does have one or more programmable devices waiting to interact with the environment
as effectively as possible. These are a class of embedded systems and they provide service inreal time. i.e. we need not have to wait too long for the action.
Let us see how an embedded system is characterized and how complex it could be? Takeexample of a mobile telephone: (Fig. 1.1)
Version 2 EE IIT, Kharagpur 3
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
4/722
Fig. 1.1 Mobile Phones
Version 2 EE IIT, Kharagpur 4
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
5/722
When we want to purchase any of them what do we look for?
Let us see what are the choices available?
Phone
Price
Weight
/ Size
Screen Games Camera Radio Ring tones Memory
Phone 1
Rs5000/-
88.1 x
47.6 x23.6 mm
116 g
TFT1
65kColor
96x32screen
Stauntman2
&Monopoly3
includedmore
downloadable
Yes
4 x Zoom
No Polyphonic
Phone 2
Rs6000/-
89 x 49
x 24.8mm
123 g
TFT
65kColor
176x220
screen
J2ME
Games:Stauntman
and
MonopolyMore
downloadable
Integrated
DigitalCamera
1 M Pixel
No Polyphonic
and MP3
Phone 3Rs
5000/-
133.7 x69.7 x
20.2mm
137g
176 x208
pixel
backlitscreen
with
4096colors
Symbian andJava
download
games orpackaged on
MMC cards
No FMStereo
3.4 MBuser
memory
built in.
Besides the above tabulated facts about the mobile handset, being a student of technology you
may also like to know the followingNetwork type GSM
2or CDMA
3(Bandwidth),
Battery: Type and ampere hour Talk-time per one charge, Standby time
1Short forthinfilmtransistor, a type of LCD flat-panel display screen, in which each pixel is controlled by from
one to four transistors. The TFT technology provides better resolution of all the flat-panel techniques, but it is alsothe most expensive. TFT screens are sometimes calledactive-matrixLCDs.
2short form ofGlobal System forMobile Communications, one of the leading digital cellular systems. GSM usesnarrowband Time Division Multiple Access (TDMA), which allows eight simultaneous calls on the same radio
frequency. GSM was first introduced in 1991. As of the end of 1997, GSM service was available in more than 100
countries and has become the de facto standard in Europe and Asia.
3 Short form ofCode-DivisionMultipleAccess, a digital cellular technology that uses spread-spectrum techniques.
Unlike competing systems, such as GSM, that use TDMA, CDMA does not assign a specific frequency to each user.
Instead, every channel uses the full available spectrum. Individual conversations are encoded with a pseudo-random
digital sequence. CDMA is a military technology first used during World War II by the English allies to foil German
attempts at jamming transmissions. The allies decided to transmit over several frequencies, instead of one, making itdifficult for the Germans to pick up the complete signal.
Version 2 EE IIT, Kharagpur 5
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
6/722
From the above specifications it is clear that a mobile phone is a very complex device which
houses a number of miniature gadgets functioning coherently on a single device.
Moreover each of these embedded gadgets such as digital camera or an FM radio along with the
telephone has a number of operating modes such as:
you may like to adjust the zoom of the digital camera,
you may like to reduce the screen brightness,
you may like to change the ring tone,
you may like to relay a specific song from your favorite FM station to your friendusing your mobile
You may like to use it as a calculator, address book, emailing device etc.
These variations in the functionality can only be achieved by a very flexible device.
This flexible device sitting at the heart of the circuits is none other than a Customized
Microprocessor better known as an Embedded Processor and the mobile phone housing anumber of functionalities is known as an Embedded System.
Since it satisfies the requirement of a number of users at the same time (you and your friend,
you and the radio station, you and the telephone network etc) it is working within a time-constraint, i.e. it has to satisfy everyone with the minimum acceptable delay. We call this as to
work in Real Time. This is unlike your holidaying attitude when you take the clock on your
stride.
We can also say that it does not make us wait long for taking our words and relaying them as
well as receiving them, unlike an email server, which might take days to receive/deliver your
message when the network is congested or slow.
Thus we can name the mobile telephone as a Real Time Embedded System (RTES)
Definitions
Now we are ready to take some definitions
Real Time
Real-time usually means time as prescribed by external sourcesFor example the time struck by clock (however fast or late it might be). The timings generated by
your requirements. You may like to call someone at mid-night and send him a picture. Thisexternal timing requirements imposed by the user is the real-time for the embedded system.
Version 2 EE IIT, Kharagpur 6
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
7/722
Embedded (Embodiment)
Embodied phenomena are those that by their very nature occur in real time and real space
In other words,A number of systems coexist to discharge a specific function in real time
Thus A Real Time Embedded System (RTES) is precisely the union of subsystems to
discharge a specific task coherently. Hence forth we call them as RTES. RTES as a generic termmay mean a wide variety of systems in the real world. However we will be concerned about
them which use programmable devices such as microprocessors or microcontrollers and havespecific functions. We shall characterize them as follows.
Characteristics of an Rtes
Single-Functioned
Here single-functioned means specific functions. The RTES is usually meant for very
specific functions. Generally a special purpose microprocessor executes a program over andover again for a specific purpose. If the user wants to change the functionality, e.g. changing the
mobile phone from conversation to camera mode or calculator mode the program gets flushed
out and a new program is loaded which carries out the requisite function. These operations are
monitored and controlled by an operating system called as Real Time Operating System (RTOS)which has much simpler complexity but more rigid constraints as compared to the conventional
operating systems such as Micro Soft Windows and Unix etc.
Tightly Constrained
The constraints on the design and marketability of RTES are more rigid than their non-real-
time non-embedded counter parts. Time-domain constraints are the first thing that is taken carewhile developing such a system. Size, weight, power consumption and cost
4are the other major
factors.
Reactive and Real Time
Many embedded systems must continually react to changes in the systems environment and
must compute certain results in real time without delay. For example, a cars cruise controller
continually monitors and reacts to speed and brake sensors. It must compute acceleration ordeceleration amounts repeatedly within a limited time; a delayed computation could result in a
failure to maintain control of the car. In contrast a desktop computer system typically focuses on
computations, with relatively infrequent (from the computers perspective) reactions to inputdevices. In addition, a delay in those computations, while perhaps inconvenient to the computer
user, typically does not result in a system failure.
4 Very few in India will be interested to buy a mobile phone if it costs Rs50,000/- even if it provides you a faster
processor with 200MB of memory to store your address, your favorite mp3 music and plays them , acts as a small-
screen TV whenever you desire, takes your call intelligentlyHowever in USA majority can afford it !!!!!!
Version 2 EE IIT, Kharagpur 7
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
8/722
Common Architecture of Real Time Embedded Systems
Unlike general purpose computers a generic architecture can not be defined for a Real Time
Embedded Systems. There are as many architecture as the number of manufacturers.
Generalizing them would severely dilute the soul purpose of embodiment and specialization.
However for the sake of our understanding we can discuss some common form of systems atthe block diagram level. Any system can hierarchically divided into subsystems. Each sub-
system may be further segregated into smaller systems. And each of these smaller systems mayconsist of some discrete parts. This is called Hardware configuration.
Some of these parts may be programmable and therefore must have some place to keep these
programs. In RTES the on-chip or on-board non-volatile memory does keep these programs.
These programs are the part of the Real Time Operating System (RTOS) and continually run aslong as the gadget is receiving power. A part of the RTOS also executes itself in the stand-by
mode while taking a very little power from the battery. This is also called the sleep mode of the
system.
Both the hardware and software coexist in a coherent manner. Tasks which can be both
carried out by software and hardware affect the design process of the system. For example amultiplication action may be done by hardware or it can be done by software by repeated
additions. Hardware based multiplication improves the speed at the cost of increased complexity
of the arithmetic logic unit (ALU) of the embedded processor. On the other hand software based
multiplication is slower but the ALU is simpler to design. These are some of the conflictingrequirements which need to be resolved on the requirements as imposed by the overall system.
This is known asHardware-Software Codesignor simply Codesign.
Let us treat both the hardware and the imbibed software in the same spirit and treat them as
systems or subsystems. Later on we shall know where to put them together and how. Thus wecan now draw a hierarchical block diagram representation of the whole system as follows:
Version 2 EE IIT, Kharagpur 8
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
9/722
Components
Subsystems
System
= interfaces
= key interface
= uses open standards
Fig. 1.2 The System Interface and Architecture
The red and grey spheres in Fig.1.2 represent interface standards. When a system is
assembled it starts with some chassis or a single subsystem. Subsequently subsystems are added
onto it to make it a complete system.
Let us take the example of a Desktop Computer. Though not an Embedded System it can
give us a nice example of assembling a system from its subsystems.
You can start assembling a desktop computer (Fig.1.3) starting with the chassis and then
take the SMPS (switched mode power supply), motherboard, followed by hard disk drive,
CDROM drive, Graphic Cards, Ethernet Cards etc. Each of these subsystems consists of severalcomponents e.g. Application Specific Integrated Circuits (ASICs), microprocessors, Analog as
well as Digital VLSI circuits, Miniature Motor and its control electronics, Multilevel Power
supply units crystal clock generators, Surface mounted capacitors and resistors etc. In the end
you close the chassis and connect Keyboard, Mouse, Speakers, Visual Display Units, EthernetCable, Microphone, Camera etc fitting them into certain well-defined sockets.
As we can see that each of the subsystems inside or outside the Desktop has cables fittingwell into the slots meant for them. These cables and slots are uniform for almost any Desktop
you choose to assemble. The connection of one subsystem into the other and vice-versa is known
as Interfacing. It is so easy to assemble because they are all standardized. Therefore,standardization of the interfaces is most essential for the universal applicability of the system and
its compatibility with other systems. There can be open standards which makes it exchange
Version 2 EE IIT, Kharagpur 9
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
10/722
information with products from other companies. It may have certain key standards, which is
only meant for the specific company which manufactures them.
CDROM drive
SMPS
Hard Disk drive
Interface Cables
Mother Board
Fig. 1.3 Inside Desktop Computer
A Desktop Computer will have more open standards than an Embedded System. This isbecause of the level of integration in the later. Many of the components of the embedded systems
are integrated on to a single chip. This concept is known as System on Chip(SOC) design. Thus
there are only few subsystems left to be connected.
Analyzing the assembling process of a Desktop let us comparatively assess the possible
subsystems of the typical RTES.
One such segregation is shown in Fig.1.4. The explanation of various parts as follows:
User Interface: for interacting with users. May consists of keyboard, touch pad etc
ASIC: Application Specific Integrated Circuit: for specific functions like motor control, data
modulation etc.
Microcontroller(C): A family of microprocessors
Version 2 EE IIT, Kharagpur 10
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
11/722
Real Time Operating System (RTOS): contains all the software for the system control and user
interface
Controller Process: The overall control algorithm for the external process. It also providestiming and control for the various units inside the embedded system.
Digital Signal Processor(DSP) a typical family of microprocessors
DSP assembly code: code for DSP stored in program memory
Dual Ported Memory: Data Memory accessible by two processors at the same time
CODEC: Compressor/Decompressor of the data
User Interface Process: The part of the RTOS that runs the software for User Interface activities
Controller Process: The part of the RTOS that runs the software for Timing and Controlamongst the various units of the embedded system
User Interface
CASIC RTOSUser InterfaceProcess
S stem Bus
DSPassembly code
Digital Signal
ProcessorDigital Signal
Processor
Dual-port memory CODEC
Hardware
DSPassembly code
Controller Process
Software
Fig. 1.4 Architecture of an Embedded System
The above architecture represents a hypothetical Embedded System (we will see more realistic
ones in subsequent examples). More than one microprocessor (2 DSPs and 1 C) are employed
here to carry out different tasks. As we will learn later, the C is generally meant for simpler andslower jobs such as carrying out a Proportional Integral (PI) control action or interpreting the
user commands etc. The DSP is a more heavy duty processor capable of doing real time signalprocessing and control. Both the DSPs along with their operating systems and codes are
independent of each other. They share the same memory without interfering with each other.
This kind of memory is known as dual ported memory or two-way post-box memory. The Real
Time Operating System (RTOS) controls the timing requirement of all the devices. It executesthe over all control algorithm of the process while diverting more complex tasks to the DSPs. It
also specifically controls the C for the necessary user interactivity. The ASICs are specialized
Version 2 EE IIT, Kharagpur 11
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
12/722
units capable of specialized functions such as motor control, voice encoding,
modulation/demodulation (MODEM) action etc. They can be digital, analog or mixed signalVLSI circuits. CODECs are generally used for interfacing low power serial Analog-to-Digital
Converters (ADCs). The analog signals from the controlled process can be monitored through an
ADC interfaced through this CODEC.
Please click on
Version 2 EE IIT, Kharagpur 12
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
13/722
Questions and Answers
Q1 Which of the following is a real time embedded system? Justify your answer
(a)Ceiling Fan
(b)Microwave Oven
(c)Television Set
(d)Desktop Key Board
(e)Digital Camera
Ans:
(b) and (e) are embedded systems
(a) Ceiling Fans: These are not programmable.(b) & (e) obey all definitions of Embedded Systems such as
(i) Working in Real Time (ii) Programmable (iii) A number of systems coexist on asingle platform to discharge one function(single functioned)
(c) Television Set: Only a small part of it is programmable. It can work without beingprogrammable. It is not tightly constrained.
(d) Desktop Keyboard: Though it has a processor normally it is not programmable.
Definition of Real Time Systems
An operation within a larger dynamic system is called a real-time operation if the combinedreaction- and operation-time of a task operating on current events or input, is no longer than the
maximum delay allowed, in view of circumstances outside the operation. The task must also
occur before the system to be controlled becomes unstable. A real-time operation is notnecessarily fast, as slow systems can allow slow real-time operations. This applies for all types
of dynamically changing systems. The polar opposite of a real-time operation is a batch job with
interactive timesharing falling somewhere in between the two extremes.
Alternately, a system is said to be hard real-time if the correctness of an operation depends
not only upon the logical correctness of the operation but also upon the time at which it is
performed. An operation performed after the deadline is, by definition, incorrect, and usually hasno value. In a soft real-time system the value of an operation declines steadily after the deadline
expires.
Embedded System
An embedded system is a special-purpose system in which the computer is completely
encapsulated by the device it controls. Unlike a general-purpose computer, such as a personal
computer, an embedded system performs pre-defined tasks, usually with very specific
requirements. Since the system is dedicated to a specific task, design engineers can optimize it,reducing the size and cost of the product. Embedded systems are often mass-produced, so the
cost savings may be multiplied by millions of items.
Version 2 EE IIT, Kharagpur 13
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
14/722
Handheld computers or PDAs are generally considered embedded devices because of the
nature of their hardware design, even though they are more expandable in software terms. Thisline of definition continues to blur as devices expand.
Q.2 Write five advantages and five disadvantages of embodiment.
Ans:
Five advantages:1. Smaller Size2. Smaller Weight3. Lower Power Consumption4. Lower Electromagnetic Interference5. Lower Price
Five disadvantages
1. Lower Mean Time Between Failure
2. Repair and Maintenance is not possible3. Faster Obsolesce4. Unmanageable Heat Loss5. Difficult to Design
Q3. What do you mean byReactive in Real Time. Cite an example.
Ans:
Many embedded systems must continually react to changes in the systems environment andmust compute certain results in real time without delay. For example, a cars cruise controller
continually monitors and reacts to speed and brake sensors. It must compute acceleration or
deceleration amounts repeatedly within a limited time; a delayed computation could result in afailure to maintain control of the car. In contrast a desktop computer system typically focuses on
computations, with relatively infrequent (from the computers perspective) reactions to input
devices. In addition, a delay in those computations, while perhaps inconvenient to the computeruser, typically does not result in a system failure.
Q4. Give at least five examples of embedded systems you are using/watching in your day to day
life.
(i) Mobile Telephone (ii)Digital Camera (iii) A programmable calculator (iv) An iPod (v) A
digital blood pressure machine
iPod: The iPod is a brand of portable media players designed and marketed by Apple Computer.
Devices in the iPod family are designed around a central scroll wheel (except for the iPod
shuffle) and provide a simple user interface. The full-sized model stores media on a built-in hard
drive, while the smaller iPod use flash memory. Like many digital audio players, iPods can serve
as external data storage devices when connected to a computer.
Version 2 EE IIT, Kharagpur 14
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
15/722
Q5. Write the model number and detailed specification of your/friends mobile telephone.
Manufacturer
Model:
Network Types: EGSM/ GSM /CDMAForm Factor: The industry standard that defines the physical, external dimensions of a particular
device. The size, configuration, and other specifications used to describe hardware.Battery Life Talk (hrs):
Battery Life Standby (hrs):Battery Type:
Measurements
Weight:
Dimensions:
Display Display Type: Colour or Black & WhiteDisplay Size (px):
Display Colours:
General Options
Camera:
Mega Pixel:
Email Client:Games: Yes
High Speed Data:
MP3 Player:PC Sync: Yes
Phonebook:Platform Series
Polyphonic Ring tones:
Predictive Text:Streaming Multimedia:
Text Messages:
Wireless Internet: Opera
Other Options
Alarm:
Bluetooth:Calculator:
Calendar:
Data Capable:EMS:
FM Radio:
Graphics (Custom):Infrared:
Speaker Phone:
USB:
Vibrate:
Version 2 EE IIT, Kharagpur 15
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
16/722
Module1
IntroductionVersion 2 EE IIT, Kharagpur 1
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
17/722
Lesson
2Introduction to Real Time
Embedded Systems Part IIVersion 2 EE IIT, Kharagpur 2
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
18/722
Structure and Design
Instructional Objectives
After going through this lesson the student will
Learn more about the numerous day-to-day real time embedded systems
Learn the internal hardware of a typical mobile phone
Learn about the important components of an RTES
Learn more about a mobile phone
Learn about the various important design issues
Also learn the design flow
Pre-Requisite
Digital Electronics, Microprocessors
Common Examples Of Embedded Systems
Some of the common examples of Embedded Systems are given below:
Consumer electronics cell phones, pagers, digital cameras, camcorders, DVD players, portablevideo games, calculators, and personal digital assistants etc.
Fig. 2.1(a) Digital Camera
Version 2 EE IIT, Kharagpur 3
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
19/722
Fig. 2.1(b) Camcorder
Fig. 2.1(c) Personal Digital Assistants
Home appliances microwave ovens, answering machines. thermostats, home security systems,washing machines. and lighting systems etc.
Fig. 2.1(d) Microwave Oven
Fig. 2.1(e) Washer and Dryers
Version 2 EE IIT, Kharagpur 4
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
20/722
office automation fax machines, copiers, printers, and scanners
Fig. 2.1(f) Fax cum printer cum copier
business equipment electronic cash registers, curbside check-in, alarm systems, card readersproduct scanners, and automated teller machines
Fig. 2.1(g) Electronic Cash Registers
Fig. 2.1(h)Electronic Card Readers
Fig. 2.1(i)Automated Teller Machines
Version 2 EE IIT, Kharagpur 5
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
21/722
automobiles Electronic Control Unit(ECU) which includes transmission control, cruise control,fuel injection, antilock brakes, and active suspension in the same or separate modules.
Fig. 2.1(j)ECU of a Vehicle
Mobile Phone
Let us take the same mobile phone as discussed in Lesson 1 as example for illustrating thetypical architecture of RTES.
In general, a cell phone is composed of the following components:
A Circuit board (Fig. 2.2)
Antenna Microphone
Speaker
Liquid crystal display (LCD)
Keyboard
Battery
Version 2 EE IIT, Kharagpur 6
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
22/722
Fig. 2.2 The Cell Phone Circuitry
Antenna
RF receiver (Rx)
RF transmitter (Tx)
DSP
Micro-
controller
Speaker
Microphone
Display
Keyboard
Fig. 2.3 The block diagram
A typical mobile phone handset (Fig. 2.3) should include standard I/O devices (keyboard, LCD),
plus a microphone, speaker and antenna for wireless communication. The Digital SignalProcessor (DSP) performs the signal processing, and the micro-controller controls the userinterface, battery management, call setup etc. The performance specification of the DSP is verycrucial since the conversion has to take place in real time. This is why almost all cell phonescontain such a special processor dedicated for making digital-to-analog (DA) and analog-to-digital(AD) conversions and real time processing such as modulation and demodulation etc. TheRead Only Memory (ROM) and flash memory (Electrically Erasable and ProgrammableMemory) chips provide storage for the phones operating system(RTOS) and various data suchas phone numbers, calendars information, games etc.
Version 2 EE IIT, Kharagpur 7
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
23/722
Components of an Embedded System
By this time we know where are our Embedded Systems and what makes them stand out fromother systems like Calculators, Desktop Computers, and our Old Television Sets. We have alsodeveloped some 6
thsense to guess the components of an RTES.
1. Microprocessor
This is the heart of any RTES. The microprocessors used here are different from the generalpurpose microprocessors like Pentium Sun SPARC etc. They are designed to meet some specificrequirements. For example Intel 8048 is a special purpose microprocessor which you will find inthe Keyboards of your Desktop computer. It is used to scan the keystrokes and send them in asynchronous manner to your PC. Similarly mobile phones Digital Cameras use special purposeprocessors for voice and image processing. A washer and dryer may use some other type ofprocessor forReal Time Control and Instrumentation.
2. MemoryThe microprocessor and memory must co-exit on the same Power Circuit Board(PCB) or samechip. Compactness, speedand lowpowerconsumption are the characteristics required for thememory to be used in an RTES. Therefore, very low power semiconductor memories are used inalmost all such devices. For housing the operating system Read Only Memory(ROM) is used.The program or data loaded might exist for considerable duration. It is like changing the setup ofyour Desktop Computer. Similar user defined setups exist in RTES. For example you may like tochange the ring tone of your mobile and keep it for some time. You may like to change thescreen color etc. In these cases the memory should be capable of retaining the information evenafter the power is removed. In other words the memory should be non-volatile and should beeasily programmable too. It is achieved by using Flash
1memories.
3. Input Output Devices and Interfaces
Input/Output interfaces are necessary to make the RTES interact with the external world. Theycould be Visual Display Units such as TFT screens in a mobile phone, touch pad key board,antenna, microphones, speakers etc. These RTES should also have open interfaces to otherdevices such as Desktop Computers, Local Area Networks (LAN) and other RTES. For exampleyou may like to download your address book into your personal digital assistant (PDA). Or youmay like to download some mp3 songs from your favorite internet site into your mp3 player.These input/output devices along with standard software protocols in the RTOS provide the
necessary interface to these standards.
1 A memory technology similar in characteristics to EPROM(Erasable Programmable Read Only Memory) memory,with the exception that erasing is performed electrically instead of via ultraviolet light, and, depending upon theorganization of the flash memory device, erasing may be accomplished in blocks (typically 64k bytes at a time)instead of the entire device.
Version 2 EE IIT, Kharagpur 8
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
24/722
4. Software
The RTES is the just the physical body as long as it is not programmed. It is like the human bodywithout life. Whenever you switch on your mobile telephone you might have marked someactivities on the screen. Whenever you move from one city to the other you might have noticedthe changes on your screen. Or when you are gone for a picnic away from your city you might
have marked the no-signal sign. These activities are taken care of by the Real Time OperatingSystem sitting on the non-volatile memory of the RTES.
Besides the above an RTES may have various other components and Application SpecificIntegrated Circuits (ASIC) for specialized functions such as motor control, modulation,demodulation, CODEC.
The design of a Real Time Embedded System has a number of constraints. The following sectiondiscusses these issues.
Design Issues
The constraints in the embedded systems design are imposed by external as well as internalspecifications. Design metrics are introduced to measure the cost function taking into accountthe technical as well as economic considerations.
Design Metrics
A Design Metric is a measurable feature of the systems performance, cost, time forimplementation and safety etc. Most of these are conflicting requirements i.e. optimizing oneshall not optimize the other: e.g. a cheaper processor may have a lousy performance as far asspeed and throughput is concerned.
Following metrics are generally taken into account while designing embedded systems
NRE cost (nonrecurring engineering cost)
It is one-time cost of designing the system. Once the system is designed, any number of units canbe manufactured without incurring any additional design cost; hence the term nonrecurring.
Suppose three technologies are available for use in a particular product. Assume thatimplementing the product using technology A would result in an NRE cost of $2,000 and unit
cost of $100, that technology B would have an NRE cost of $30,000 and unit cost of $30, andthat technology C would have an NRE cost of $100,000 and unit cost of $2. Ignoring all otherdesign metrics, like time-to-market, the best technology choice will depend on the number ofunits we plan to produce.
Unit cost
The monetary cost of manufacturing each copy of the system, excluding NRE cost.
Version 2 EE IIT, Kharagpur 9
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
25/722
Size
The physical space required by the system, often measured in bytes for software, and gates ortransistors for hardware.
Performance
The execution time of the system
Power Consumption
It is the amount of power consumed by the system, which may determine the lifetime of abattery, or the cooling requirements of the IC, since more power means more heat.
Flexibility
The ability to change the functionality of the system without incurring heavy NRE cost. Softwareis typically considered very flexible.
Time-to-prototype
The time needed to build a working version of the system, which may be bigger or moreexpensive than the final system implementation, but it can be used to verify the systemsusefulness and correctness and to refine the systems functionality.
Time-to-market
The time required to develop a system to the point that it can be released and sold to customers.The main contributors are design time, manufacturing time, and testing time. This metric hasbecome especially demanding in recent years. Introducing an embedded system to themarketplace early can make a big difference in the systems profitability.
Maintainability
It is the ability to modify the system after its initial release, especially by designers who did notoriginally design the system.
Correctness
This is the measure of the confidence that we have implemented the systems functionalitycorrectly. We can check the functionality throughout the process of designing the system, and wecan insert test circuitry to check that manufacturing was correct.
The Performance Design Metric
Performance of a system is a measure of how long the system takes to execute our desired tasks.
Version 2 EE IIT, Kharagpur 10
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
26/722
The two main measures of performance are:
Latency or response time
This is the time between the start of the tasks execution and the end. For example, processing animage may take 0.25 second.
Throughput
This is the number of tasks that can be processed per unit time. For example, a camera may beable to process 4 images per second
These are the some of the cost measures for developing an RTES. Optimization of the overallcost of design includes each of these factors taken with some multiplying factors depending ontheir importance. And the importance of each of these factors depends on the type of application.For instance in defense related applications while designing an anti-ballistic system the executiontime is the deciding factor. On the other hand, for de-noising a photograph in an embedded
camera in your mobile handset the execution time may be little relaxed if it can bring down thecost and complexity of the embedded Digital Signal Processor.
The design flow of an RTES involves several steps. The cost and performance is tuned and fine-tuned in a recursive manner. An overall design methodology is enumerated below.
Design Methodology (Fig. 2.4)
System Requirement and SpecificationsDefine the problemWhat your embedded system is required to do?Define the requirements (inputs, outputs, control)What are the inputs and outputs of your system?Write down the specifications for themSpecify if the signals are in digital or analogue form. Specify the voltage levels, frequency etc.The design task can be further segregated into the following steps
System level Design
Find out the possible subsystems of the system and the interconnections between them.
Sub-system or Node Level design
Each of these subsystems can be termed as the nodes. Elaborate on each of these subsystems andfurther make the block diagram and component level interconnections.
Processor Level Design
Each subsystem may consist of processor, memory, I/O devices. Specification and design at thislevel is required now.
Version 2 EE IIT, Kharagpur 11
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
27/722
Task Level Design
Complete interconnection of these subsystems depending on the tasks they would perform.
Input to the design
Output to node level design
System level designNode Level Specifications
Output to processor level design
Node level designProcessor LevelSpecifications
Output to task level design
Processor level designTask Specifications
Task level design
Overall System specifications
Fig. 2.4 The design approach
Conclusion
The scope of embedded systems has been encompassing more and more diversedisciplines of technology day by day. Obsolescence of technology occurs at a much fasterpace as compared to the same in other areas. The development of Ultra-Low-Power VLSImixed signal technology is the prime factor in the miniaturization and enhancement ofthe performance of the existing systems. More and more systems are tending to becompact and portable with the RTES technology. The future course of embedded systemsdepends on the advancements of sensor technology, mechatronics and battery technology.
The design of these RTES by and large is application specific. The time-gap between the
conception of the design problem and marketing has been the key factor for the industry.
Most of the cases for very specific applications the system needs to be developed usingthe available processors rather than going for a custom design.
Version 2 EE IIT, Kharagpur 12
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
28/722
Questions
Q1. Give one example of a typical embedded system other than listed in this lecture. Draw theblock diagram and discuss the function of the various blocks. What type of embeddedprocessor they use?
Ans:
Example 1: A handheld Global Positioning System Receiver
For details please http://www.gpsworld.com/
A GPS receiver receives signals from a constellation of at least four out of a total of 24 satellites.Based on the timing and other information signals sent by these satellites the digital signalprocessor calculates the position using triangulation.
Version 2 EE IIT, Kharagpur 13
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
29/722
The major block diagram is divided into (1) Active Antenna System (2)RF/IF front end (3) TheDigital Signal Processor(DSP)
The Active Antenna System houses the antenna a band pass filter and a low noise amplifier(LNA)
The RF/IF front end houses another band pass filter, the RF amplifier and the demodulator andA/D converter.
The DSP accepts the digital data and decodes the signal to retrieve the information sent by theGPS satellites.
Q2. Discuss about the Hard Disk Drive housed in your PC. Is it an RTES?
Ans:
Hard drives have two kinds of components: internal and external. External components arelocated on a printed circuit board called logic board while internal components are located in asealed chamber called HDA or Hard Drive Assembly.
For details browse http://www.hardwaresecrets.com/article/177/3
The big circuit is the controller. It is in charge of everything: exchanging data between the harddrive and the computer, controlling the motors on the hard drive, commanding the heads to reador write data, etc.
All these tasks are carried out as demanded by the processor sitting on the motherboard. It can beverified to be single-functioned, tightly constrained,
Therefore one can say that a Hard Disk Drive is an RTES.
Version 2 EE IIT, Kharagpur 14
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
30/722
Q3. Elaborate on the time-to-market design metric.
Ans:
The time required to develop a system to the point that it can be released and sold to customers.The main contributors are design time, manufacturing time, and testing time. This metric has
become especially demanding in recent years. Introducing an embedded system to themarketplace early can make a big difference in the systems profitability.
Q4. What is Moores Law? How was it conceived?
Moore's law is the empirical observation that the complexity of integrated circuits, with respectto minimum component cost, doubles every 24 months. It is attributed to Gordon E. Moor, a co-founder of Intel.
Version 2 EE IIT, Kharagpur 15
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
31/722
References and Further Reading
[1] Richard Bohuslav Kosik , Digital ignition & Electronic fuel injection Department ofComputer Science and Electrical Engineering The University of Queensland, Australia,Bachelors Thesis, October 2000
[2] Frank Vahid, Tony Givargis, Embedded System Design, A Unified
Hardware/Software Introduction,John Wiley and Sons Inc, 2002[3] Wayne Wolf, Computers as Components, Morgan Kaufmann, Harcourt India,2001[4] A.M Fox, J.E. Cooling, N.S. Cooling, Integrated Design approach for real time
embedded systems, Proc. IEE-Softw., Vo.146, No.2., April 1999, page 75-85.[5] Phen Edwards, Luciano Lavagno, Dward A. Lee.Alberto Sangiovanni- Vincentelli ,
Design of Embedded Systems: Formal Models, Validation, and Synthesis,PROCEEDINGS OF THE IEEE, VOL. 85, NO. 3, MARCH 1997, page-366-390
[6] J.A. Debardelaben, V. K. Madisetti, A. J. Gadeint, Incorporating Cost Modeling inEmbedded-System Design, IEEE Design and Test of Computers, July-September-1997, Page 24-35
Version 2 EE IIT, Kharagpur 16
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
32/722
Module1
IntroductionVersion 2 EE IIT, Kharagpur 1
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
33/722
Lesson
3Embedded SystemsComponents Part I
Version 2 EE IIT, Kharagpur 2
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
34/722
Structural Layout with Example
Instructional Objectives
After going through this lesson the student would
Know the structural layout
The specifications of major components of an Embedded system
Especially learn about a single board computer
Pre-Requisite
Digital Electronics, Microprocessors
Introduction
The various components of an Embedded System can be hierarchically grouped as
System Level Components to Transistor Level Components. A system (subsystem) component isdifferent than what is considered a "standard" electronic component. Standard components are
the familiar active devices such as integrated circuits, microprocessors, memory, diodes,
transistors, etc. along with passives such as resistors, capacitors, and inductors. These are thebasic elements needed to mount on a circuit board for a customized, application-specific design.
A system component on the other hand, has active and passive components mounted oncircuit boards that are configured for a specific task. (Fig. 3.1) System components can be either
single- or multi-function modules that serve as highly integrated building blocks of a system. A
system component can be as simple as a digital I/O board or as complex as a computer withvideo, memory, networking, and I/O all on a single board. System components support industry
standards and are available from multiple sources worldwide.
Version 2 EE IIT, Kharagpur 3
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
35/722
Processor Level Components
(Integrated Circuits)
(Microprocessors, Memory, I/O devices etc)
Subsystems
(PCBs)
Gate Level Components
Generally inside the
Integrated Circuits rarely outside
System
Fig. 3.1 The Hierarchical Components
Structure of an Embedded System
The typical structure of an embedded system is shown in Fig. 3.2. This can be compared
with that of a Desktop Computer as shown in Fig. 3.3. Normally in an embedded system the
primary memory, central processing unit and many peripheral components including analog-to-digital converters are housed on a single chip. These single chips are called as Microcontrollers.
This is shown by dotted lines in Fig. 3.2.
On the other hand a desktop computer may contain all these units on a single Power
Circuit Board (PCB) called as the Mother Board. Since these computers handle much larger
dimension of data as compared to the embedded systems there has to be elaborate arrangements
for storage and faster data transfer between the CPU and memory, CPU and input/output devicesand memory and input/output devices. The storage is accomplished by cheaper secondary
memories like Hard Disks and CDROM drives. The data transfer process is improved by
incorporating multi-level cache and direct memory access methods. Generally no sucharrangements are necessary for embedded systems. Because of the number of heterogeneous
components in a desktop computer the power supply is required at multiple voltage-levels
(typically 12, 5, 3, 25 volts). On the other hand an Embedded Systems chip may just needone level DC power supply (typically +5V).
In a desktop computer various units operate at different speeds. Even the units inside a
typical CPU such as Pentium-IV may operate at different speeds. The timing and control units
are complex and provide multi-phase clock signal to the CPU and other peripherals at different
voltage levels. The timing and control unit for an Embedded system may be much simpler.
Version 2 EE IIT, Kharagpur 4
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
36/722
PowerSup
ply
Central Processing Unit
Input Output Devices
(AD Converters, UARTs, Infrared Ports)
Primary Memory
AD Converter-Analog to Digital Converter
UART Universal Asynchronous Receiver and Transmitter
Fig. 3.2 The typical structure of an Embedded System
Primary Memory
Cache Memory
Keyboard, Hard Disk Drive,
Network Card,
Video Display Units
PowerSupply
Microprocessor
Input Output Interfaces
DirectMemoryA
ccess
Fig. 3.3 The structural layout of a desktop Computer
Typical Example
A Single Board Computer (SBC)
Version 2 EE IIT, Kharagpur 5
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
37/722
Since you are familiar with Desktop Computers, we should see how to make a desktop
PC on a single power circuit board. They will be called Single Board Computers orSBC.These SBCs are typical embedded systems custom-made generally for Industrial
Applications. In the introductory lectures you should have done some exercises on your PC.
Now try to compare with this SBC with your desktop.
Let us look at an example of a single board computer from EBC-C3PLUS SBC fromWinsystems1.
Fig. 3.4 The Single Board Computer (SBC)
Let us discuss and try to understand the features of the above single board Embedded computer.This will pave the way of our understanding more complex System-On-Chip (SOC) type of
systems.
The various unit and their specifications are as follows
VIA 733MHz or 1 GHz low power C3 processor EBX-compliant board (Fig. 3.5)
This is the processor on this SBC. VIA represents the company which manufactures theprocessor (www.via.com.tw), 733MHz or 1GHz is the clock frequency of this processor. C3 is
1 Courtesy WinSystems, Inc. 715 Stadium Drive, Arlington Texas 76011http://sbc.winsystems.com/products/sbcs/ebcc3plus.html
Version 2 EE IIT, Kharagpur 6
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
38/722
the brand name as P3 and P4 for Intel. (You must be familiar with Intel processors as your PC
has one)
Fig. 3.5 The Processor
32 to 512MB of system PC133 SDRAM supported in a 168-pin DIMM socket
32 to 512 MB tells the possible Random Access Memory size on the SBC. SDRAM stands for
Synchronous Dynamic RAM. We will learn more about this in the memory chapter. 168-pinDIMM stands for Dual-In-Line Memory-Modules which holds the memory chips and can fit into
the board easily.
DIMMs Look like this
Fig. 3.6 DIMM
Socket for up to 1Giga Byte bootable DiskOnChip or 512KB SRAM or 1MB EPROM
These are Static RAMs (SRAM) or EPROM which houses the operating system just like theHard Disk in a Desktop computer
Type I and II Compact Flash (CF) cards supportedIt is otherwise known as semiconductor hard-disk or floppy disk.
Flash memory is an advanced form of Electrically Erasable and Programmable Read Only
Memory (EEPROM). Type I and Type II are just two different designs Type II being more
compact and is a recent version.
Version 2 EE IIT, Kharagpur 7
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
39/722
Fig. 3.7 Flash Memory
PC-compatible supports Linux, Windows CE.NET and XP, plus other x86-compatible RTOS
This indicates the different types of operating systems supported on this SBC platform.
High resolution video controller supports: Color panels supported with up to 36-bits/pixel
Supports resolutions up to 1920 x 1440
This is the video quality supported by the on-board video chips
Simultaneous CRT and LCD operation: 4X AGP local bus for high speed operation: LVDS
supported
CRT is for cathode ray terminal, LCD for Liquid Crystal Display terminal
AGP means Accelerated Graphic Port4X represents the speed of the graphic port
Accelerated Graphics Port: An extremely fast expansion-slot and bus (64 bit) designed for high-
performance graphics cards
LVDS Low Voltage Differential Signaling, a low noise, low power, low amplitude method for
high-speed (gigabits per second) data transmission over copper wire on the Power Circuit
Boards.
Dual 10/100 Mbps Intel PCI Ethernet controllers
The networking interface
4 RS-232 serial ports with FIFO, COM1 & COM2 with RS-422/485 support
The serial interface FIFO stands for First in First Out,
RS-232/RS-422/RS-485: These are the serial communication standards which you will study in
due course. COM1 and COM2 stands for the same RS232 port. (your desktop has COM ports)
Bi-directional LPT port supports EPP/ECP
LPT stands for Line Printer Terminal: EPP/ECP stands for Enhanced Parallel Port and Extended
Capabilities Port
48 bi-directional TTL digital I/O lines with 24 pins capable of event sense interrupt generation
These are extra digital Input/Output lines. 24 lines are capable of sensing interrupts.
Four USB ports onboard
USB Universal SerialBus, an external bus standard that supports data transfer rates of 12 Mbps.
A single USB port can be used to connect up to 127 peripheral devices, such as mouse, modems,and keyboards.
Version 2 EE IIT, Kharagpur 8
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
40/722
Two, dual Ultra DMA 33/66/100 EIDE connectors
Ultra DMA
DMA stands for Direct Memory Access. It is a mode to transfer a bulk of data from the memory
to hard-drive and vice-versa
EIDE
Short for Enhanced Integrated Drive Electronics (IDE), a newer version of the IDE mass storage
device interface. It supports higher data rates about three to four times faster than the old IDEstandard. In addition, it can support mass storage devices of up to 8.4 gigabytes, whereas the old
standard was limited to 528 MB. The numbers 33/66/100 indicates bit rates in Mbps
Floppy disk controller supports 1 or 2 drives
AC97 Audio-Codec 97
Audio Codec '97 (AC'97) is the specification for, 20-bit audio architecture used in many desktop
PCs. The specification was developed in the old Intel Architecture Labs in 1997 to providesystem developers with a standardized specification for integrated PC audio devices. AC'97
defined a high-quality audio architecture for the PC and is capable of delivering up to 96kHz/20-
bit playback in stereo and 48kHz/20-bit in multi-channel playback modes
PC/104 and PC/104-Plus expansion connectors
PC104 gets its name from the popular desktop personal computers initially designed by IBM
called the PC, and from the number of pins used to connect the cards together (104). PC104cards are much smaller than ISA-bus cards found in PC's and stack together which eliminates the
need for a motherboard, backplane, and/or card cage
AT keyboard controller and PS/2 mouse support
An 84-key keyboard introduced with the PC /AT. It was later replaced with the 101-key
Enhanced Keyboard.
Two interrupt controllers and 7 DMA channels, Three, 16-bit counter/timers, Real Time Clock,Watch Dog Timer and Power on Self Test
The interrupt controllers, DMA channels, counter/timers and Real Time Clock are used for real
time applications.
Specifications
+5 volt only operation
Mechanical
Dimensions: 5.75" x 8.0" (146mm x 203mm)Jumpers: 0.025" square posts
ConnectorsSerial, Parallel, Keyboard: 50-pin on 0.100" gridCOM3 & 4: 20-pin on 0.100" grid
Floppy Disk Interface: 34-pin on 0.100" grid
EIDE Interface: 40-pin on 0.100" grid (Primary)
44-pin on 2mm grid (Primary)40-pin on 0.100" grid (Secondary)
50-pin 2mm Flash connector
Parallel I/O: Two, 50-pin on 0.100" grid
Version 2 EE IIT, Kharagpur 9
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
41/722
CRT: 14-pin on 2-mm. grid
FP-100 Panel: Two, 50-pin on 2-mm. gridLVDS 20-pin on 0.100" grid
Ethernet: Two RJ-45
PC/104 bus: 64-pin 0.100" socket, 40-pin 0.100" socketPC/104-Plus 120-pin (4 x 30; 2mm) stackthrough with shrouded header
USB Four, 4-pin 0.100Audio Three, 3.5mm stereo phone jacks
Power: 9-pin in-line MolexEnvironmental
Operating Temperature:
-40 to +85C (733MHz)-40 to +60C (1GHz)
Non-condensing relative humidity: 5% to 95%
Fig. 3.8 Another Single Board Computer
Conclusion
It is apparent from the above example that a typical embedded system consist of by and large the
following units housed on a single board or chip.
Version 2 EE IIT, Kharagpur 10
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
42/722
1. Processor2. Memory3. Input/Output interface chips4. I/O Devices including Sensors and Actuators5. A-D and D-A converters6. Software as operating system
7. Application Software
One or more of the above units can be housed on a single PCB or single chipIn a typical Embedded Systems the Microprocessor, a large part of the memory and major I/O
devices are housed on a single chip called a microcontroller. Being custom-made the embedded
systems are required to function for specific purposes with little user programmability. The userinteraction is converted into a series of commands which is executed by the RTOS by calling
various subroutines. RTOS is stored in a flash memory or read-only-memory. There will be
additional scratch-pad memory for temporary data storage. If the CPU sits on the same chip asmemory then a part of the memory can be used for scratch-pad purposes. Otherwise a number of
CPU registers will be required for the same. CPU communicates with the memory through the
address and data bus. The timing and control of these data exchange takes place by the controlunit of the CPU via the control lines. The memory which is housed on the same chip as the CPU
has the fastest transfer rate. This is also known as the memory band-width or bit rate. The
memory outside the processor chip is slower and hence has a lesser transfer rate. On the other
hand Input/Output devices have a varied degree of bandwidth. These varying degrees of datatransfer rates are handled in different ways by the processor. The slower devices need interface
chips. Generally chips which are faster than the microprocessor are not used.
Architecture of a typical embedded-system is shown in Fig. 3.8. The hardware unit consists ofthe above units along with a digital as well as an analog subsystem. The software in the form of a
RTOS resides in the memory.
EMBEDDED SYSTEM
software
hardware
digital
subsystem
analog
subsystem
actuators
sensors
mechanical
optical
subsystem
Fig. 3.9 Typical Embedded System Architecture
Version 2 EE IIT, Kharagpur 11
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
43/722
Question Answers
Q1. What are the Hierarchical components in a embedded system design.
Ans:
Processor Level Components
(Integrated Circuits)
(Microprocessors, Memory, I/O devices etc)
Subsystems
(PCBs)
Gate Level Components
Generally inside the
Integrated Circuits rarely outside
System
The Hierarchical Components
Q.2. What is LVDS?
Ans:
Known as Low Voltage Differential Signaling. The advantages of such a standard is low noise
and low interference such that one can increase the data transmission rate. Instead of 0 and 5 Vor 5V a voltage level of 1.5 or 3.3 V is used for High and 0 or 1 V is used for Low. The Low to
High voltage swing reduces interference. A differential mode rejects common mode noises.
Q.3. Is there any actuator in your mobile phone?
Ans:
There is a vibrator in a mobile phone which can be activated to indicate an incoming call ormessage. Generally there is a coreless motor which is operated by the microcontroller for
generating the vibration.
Version 2 EE IIT, Kharagpur 12
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
44/722
Module1
IntroductionVersion 2 EE IIT, Kharagpur 1
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
45/722
Lesson
4Embedded SystemsComponents Part II
Version 2 EE IIT, Kharagpur 2
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
46/722
Overview on Components
Instructional Objectives
After going through this lesson the student would
Overview of the following
o Processors
o Memory
o Input/Output Devices
Pre-Requisite
Digital Electronics, Microprocessors
You are now almost familiar with the various components of an embedded system. In thischapter we shall discuss some of the general components such as
Processors
Memory
Input/Out Devices
Processors
The central processing unit is the most important component in an embedded system. It exists in
an integrated manner along with memory and other peripherals. Depending on the type ofapplications the processors are broadly classified into 3 major categories
1. General Purpose Microprocessors
2. Microcontrollers
3. Digital Signal Processors
For more specific applications customized processors can also be designed. Unless the demand is
high the design and manufacturing cost of such processors will be high. Therefore, in most of the
applications the design is carried out using already available processors in the market. However,the Field Programmable Gate Arrays (FPGA) can be used to implement simple customized
processors easily. An FPGA is a type of logic chip that can be programmed. They supportthousands of gates which can be connected and disconnected like an EPROM (ErasableProgrammable Read Only Memory). They are especially popular for prototyping integrated
circuit designs. Once the design is set, hardwired chips are produced for faster performance.
General Purpose Processors
A general purpose processor is designed to solve problems in a large variety of applications as
diverse as communications, automotive and industrial embedded systems. These processors are
Version 2 EE IIT, Kharagpur 3
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
47/722
generally cheap because of the manufacturing of large number of units. The NRE (Non-recurring
Engineering Cost: Lesson I) is spread over a large number of units. Being cheaper themanufacturer can invest more for improving the VLSI design with advanced optimized
architectural features. Thus the performance, size and power consumption can be improved.
Most cases, for such processors the design tools are provided by the manufacturer. Also thesupporting hardware is cheap and easily available. However, only a part of the processor
capability may be needed for a specific design and hence the over all embedded system will notbe as optimized as it should have been as far as the space, power and reliability is concerned.
I/O
PC IR
Memory
Registers
ALU
Controller Control/Status
DatapathControl unit
Processor
Fig. 4.1 The architecture of a General Purpose Processor
Pentium IV is such a general purpose processor with most advanced architectural features.
Compared to its overall performance the cost is also low.
A general purpose processor consists of a data path, a control unit tightly linked with the
memory. (Fig. 4.1)
The Data Path consists of a circuitry for transforming data and storing temporary data. It
contains an arithmetic-logic-unit(ALU) capable of transforming data through operations such asaddition, subtraction, logical AND, logical OR, inverting, shifting etc. The data-path also
contains registers capable of storing temporary data generated out of ALU or related operations.
The internal data-bus carries data within the data path while the external data bus carries data toand from the data memory. The size of the data path indicates the bit-size of the CPU. An 8-bit
data path means an 8-bit CPU such as 8085 etc.
The Control Unitconsists of circuitry for retrieving program instructions and for moving data to,from, and through the data-path according to those instructions. It has a program counter(PC) to
hold the address of the next program instruction to fetch and an Instruction register(IR) to hold
Version 2 EE IIT, Kharagpur 4
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
48/722
the fetched instruction. It also has a timing unit in the form of state registers and control logic.
The controller sequences through the states and generates the control signals necessary to readinstructions into the IR and control the flow of data in the data path. Generally the address size is
specified by the control unit as it is responsible to communicate with the memory. For each
instruction the controller typically sequences through several stages, such as fetching theinstruction from memory, decoding it, fetching the operands, executing the instruction in the data
path and storing the results. Each stage takes few clock cycles.
Microcontroller
Just as you put all the major components of a Desktop PC on to a Single Board Computer (SBC)if you put all the major components of a Single Board Computer on to a single chip it will be
called as a Microcontroller. Because of the limitations in the VLSI design most of the
input/output functions exist in a simplified manner. Typical architecture of such amicroprocessor is shown in Fig. 4.2.
Parallel
Port
Parallel
Port
Serial
Port
Interrupt
Controller
WDU
Timers
MDU
A
D
IRAM XRAM
ROMAddressBu
s
C500 Core
(1 or 8 Datapointer)
Access
Control
Ext.
ControlALE
XTAL
Housekeeper
Control
Port0/Port2
Peripheral
Bus
DataBus
RST
EA
PSEN
Fig. 4.2 The architecture of a typical microcontroller named as C500 from
Infineon Technology, Germany
*The double-lined blocks are core to the processor. Other blocks are on-chip
The various units of the processors (Fig. 4.2) are as follows:
TheC500 Core contains the CPU which consists of the Instruction Decoder, Arithmetic LogicUnit (ALU) and Program Control section
The housekeeper unit generates internal signals for controlling the functions of the individual
internal units within the microcontroller.
Port 0 and Port 2 are required for accessing external code and data memory and for emulationpurposes.
Version 2 EE IIT, Kharagpur 5
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
49/722
The external control blockhandles the external control signals and the clock generation.
The access control unitis responsible for the selection of the on-chip memory resources.The IRAMprovides the internal RAM which includes the general purpose registers.
The XRAMis another additional internal RAM sometimes provided
The interrupt requests from the peripheral units are handled by anInterrupt Controller Unit.Serial interfaces, timers, capture/compare units, A/D converters, watchdog units (WDU), or a
multiply/divide unit (MDU) are typical examples for on-chip peripheral units. The externalsignals of these peripheral units are available at multifunctionalparallel I/O ports or at dedicated
pins.
Digital Signal Processor (DSP)
These processors have been designed based on the modified Harvard Architecture to handle real
time signals. The features of these processors are suitable for implementing signal processingalgorithms. One of the common operations required in such applications is array multiplication.
For example convolution and correlation require array multiplication. This is accomplished by
multiplication followed by accumulation and addition. This is generally carried out by Multiplier
and Accumulator (MAC) units. Some times it is known as MACD, where D stands for Datamove. Generally all the instructions are executed in single cycle.
Address
Instructions
AddressOpcodeStatus
Result/Operands
Program
MemoryControl
Unit
Data
MemoryProcessing
Unit
Fig. 4.3 The modified Harvard architecture
The MACD type of instructions can be executed faster by parallel implementation. This is
possible by separately accessing the program and data memory in parallel. This can beaccomplished by the modified architecture shown in Fig. 4.3. These DSP units generally use
Multiple Access and Multi Ported Memory units. Multiple access memory allows more than one
access in one clock period. The Multi-ported Memory allows multiple addresses as well Dataports. This also increases the number of access per unit clock cycle.
Version 2 EE IIT, Kharagpur 6
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
50/722
Dual Port
MemoryData Bus 2
Data Bus 1
Address Bus 2
Address Bus 1
Fig. 4.4 Dual Ported Memory
The Very Long Instruction Word (VLIW) architecture is also suitable for Signal Processing
applications. This has got a number of functional units and data paths as seen in Fig. 4.5. Thelong instruction words are fetched from the memory. The operands and the operation to be
performed by the various units are specified in the instruction itself. The multiple functional
units share a common multi-ported register file for fetching the operands and storing the results.Parallel random access to the register file is possible through the read/write cross bar. Execution
in the functional units is carried out concurrently with the load/store operation of data between
RAM and the register file.
. . . . . . .Functional
UnitnFunctional
Unit 1
Instruction Cache
Read/Write Cross Bar
Multi-ported Register File
Progra
mC
ontrolUnit
Fig. 4.5 Block Diagram ofVLIWarchitecture
Microprocessors vs Microcontrollers
A microprocessor is a general-purpose digital computers central processing unit. To make a
complete microcomputer, you add memory (ROM and RAM) memory decoders, an oscillator,
and a number of I/O devices. The prime use of a microprocessor is to read data, performextensive calculations on that data, and store the results in a mass storage device or display the
results. These processors have complex architectures with multiple stages of pipelining and
parallel processing. The memory is divided into stages such as multi-level cache and RAM. The
development time of General Purpose Microprocessors is high because of a very complex VLSIdesign.
Version 2 EE IIT, Kharagpur 7
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
51/722
Analog I/O
D/A
A/D
PWM
Serial I/O
Parallel I/O
Timer
Input and
output
ports
Input andoutput
ports
Microprocessor
RAM
EEPROMROM
Fig. 4.6 A Microprocessor based System
The design of the microcontroller is driven by the desire to make it as expandable and flexibleas possible. Microcontrollers usually have on chip RAM and ROM (or EPROM) in addition to
on chip i/o hardware to minimize chip count in single chip solutions. As a result of using on chip
hardware for I/O and RAM and ROM they usually have pretty low performance CPU.
Microcontrollers also often have timers that generate interrupts and can thus be used with theCPU and on chip A/D D/A or parallel ports to get regularly timed I/O. The prime use of a
microcontroller is to control the operations of a machine using a fixed program that is stored in
ROM and does not change over the lifetime of the system. The microcontroller is concerned withgetting data from and to its own pins; the architecture and instruction set are optimized to handle
data in bit and byte size.
Version 2 EE IIT, Kharagpur 8
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
52/722
Fig. 4.7 A Microcontroller
The contrast between a microcontroller and a microprocessor is best exemplified by the fact thatmost microprocessors have many operation codes (opcodes) for moving data from external
memory to the CPU; microcontrollers may have one or two. Microprocessors may have one or
two types of bit-handling instructions; microcontrollers will have many.
A basic Microprocessors vs a basic DSP
DataMemory
ProgramMemory
Processor
Digital PWM
Analog out
Filter
Analog in
ROM EEPROM
RAM
Microcontroller
Timer
Parallel I/O
Serial I/O
PWM
A/D
CPU core
Fig. 4.8 The memory organization in a DSP
DSP Characterization
1. Microprocessors specialized for signal processing applications
2. Harvard architecture
3. Two to Four memory accesses per cycle
4. Dedicated hardware performs all key arithmetic operations in 1 cycle
Version 2 EE IIT, Kharagpur 9
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
53/722
5. Very limited SIMD(Single Instruction Multiple Data) features and Specialized, complexinstructions
6. Multiple operations per instruction
7. Dedicated address generation units
8. Specialized addressing [ Auto-increment Modulo (circular) Bit-reversed ]
9. Hardware looping.
10.Interrupts disabled during certain operations
11.Limited or no register Shadowing
12.Rarely have dynamic features
13.Relatively narrow range of DSP oriented on-chip peripherals and I/O interfaces
14.synchronous serial port
Processor Memory
Fig. 4.9 Memory Organization in General Purpose Processor
Characterization of General Purpose Processor
1. CPUs for PCs and workstations E.g., Intel Pentium IV
2. Von Neumann architecture
3. Typically 1 access per cycle
4. Most operations take more than 1 cycle
5. General-purpose instructions Typically only one operation per instruction
6. Often, no separate address generation units
7. General-purpose addressing modes
8. Software loops only
9. Interrupts rarely disabled
10.Register shadowing common
11.Dynamic caches are common
12.Wide range of on-chip and off-chip peripherals and I/O interfaces
13.Asynchronous serial port...
Memory
Memory serves processor short and long-term information storage requirements while
registers serve the processors short-term storage requirements. Both the program and the dataare stored in the memory. This is known as Princeton Architecture where the data and program
occupy the same memory. In Harvard Architecture the program and the data occupy separate
Version 2 EE IIT, Kharagpur 10
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
54/722
memory blocks. The former leads to simpler architecture. The later needs two separate
connections and hence the data and program can be made parallel leading to parallel processing.The general purpose processors have the Princeton Architecture.
The memory may be Read-Only-Memory or Random Access Memory (RAM). It mayexist on the same chip with the processor itself or may exist outside the chip. The on-chip
memory is faster than the off-chip memory. To reduce the access (read-write) time a local copyof a portion of memory can be kept in a small but fast memory called the cache memory. The
memory also can be categorized as Dynamic or Static. Dynamic memory dissipate less powerand hence can be compact and cheaper. But the access time of these memories are slower than
their Static counter parts. In Dynamic RAMs (or DRAM) the data is retained by periodic
refreshing operation. While in the Static Memory (SRAM) the data is retained continuously.SRAMs are much faster than DRAMs but consume more power. The intermediate cache
memory is an SRAM.
In a typical processor when the CPU needs data, it first looks in its own data registers. If
the data isn't there, the CPU looks to see if it's in the nearby Level 1 cache. If that fails, it's off to
the Level 2 cache. If it's nowhere in cache, the CPU looks in main memory. Not there? The CPUgets it from disk. All the while, the clock is ticking, and the CPU is sitting there waiting.
Input/Output Devices and Interface Chips
Typical RTES interact with the environment and users through some inbuilt hardware.
Occasionally external circuits are required for communicating with user, other computers or anetwork.
In the mobile handset discussed earlier the input output devices are, keyboard, the displayscreen, the antenna, the microphone, speaker, LED indicators etc. The signal to these units may
be analog or digital in nature. To generate an analog signal from the microprocessor we need anDigital to Analog Converter(DAC) and to accept analog signal we need and Analog to DigitalConverter (ADC). These DAC and ADC again have certain control modes. They may also
operate at different speed than the microprocessor. To synchronize and control these interface
chips we may need another interface chip. Similarly we may have interface chips for keyboard,
screen and antenna. These chips serve as relaying units to transfer data between the processorand input/output devices. The input/output devices are generally slower than the processor.
Therefore, the processor may have to wait till they respond to any request for data transfer.
Number of idle clock cycles may be wasted for doing so. However, the input-output interfacechips carry out this task without making the processor to wait or idle.
Actuator
Processor Memory
D-A
Converter
A-DConverter
Amplification
Signal Conditioningand Amplification
Sensor
Fig. 4.10 The typical input/output interface blocks
Version 2 EE IIT, Kharagpur 11
Downloaded from www.citystudentsgroup.blogspot.com
Downloaded from www.citystudentsgroup.blogspot.com
www.citystu
dentsgro
up.blogspo
t.com
-
7/22/2019 Embedded System(Www.citystudentsgroup.blogspot.com)
55/722
Conclusion
Besides the above units some real time embedded systems may have specific circuits included on
the same chip or circuit board. They are known as Application Specific Integrated Circuit
(ASIC). Some examples are
1. MODEMs (modulator, demodulator units)
It is used to modulate a digital signal into high-frequency analog signal for wire-less
transmission. There are various methods to convert a digital signal into analog form.
Amplitude Shift Keying (ASK)Frequency Shift Keying (FSK)
Phase Shift Keying (PSK)
Quadrature Phase Shift Keying (QPSK)The same unit is also used to demodulate the analog signal into digital forms.
2. CODECs (Compress and Decompress Units)It is generally used to process digital video and/or audio files. A CODEC reduces the amount of
data to be transmitted by discarding redundant data on the transmitting end and reconstituting the
signal on the receiving end.
3. Filters
Filters are used to condition the incoming signal by eliminating the out-band noise and oth