SlideShare a Scribd company logo
Instant Ebook Access, One Click Away – Begin at ebookgate.com
Embedded Systems Architecture Programming and
Design 2nd Edition Raj Kamal
https://ebookgate.com/product/embedded-systems-architecture-
programming-and-design-2nd-edition-raj-kamal/
OR CLICK BUTTON
DOWLOAD EBOOK
Get Instant Ebook Downloads – Browse at https://ebookgate.com
Click here to visit ebookgate.com and download ebook now
Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...
Embedded Systems Design 2nd Edition Steve Heath
https://ebookgate.com/product/embedded-systems-design-2nd-edition-
steve-heath/
ebookgate.com
Programming embedded systems with C and GNU development
tools 2nd Edition Michael Barr
https://ebookgate.com/product/programming-embedded-systems-with-c-and-
gnu-development-tools-2nd-edition-michael-barr/
ebookgate.com
Making Embedded Systems Design Patterns for Great Software
2nd Edition Elecia White
https://ebookgate.com/product/making-embedded-systems-design-patterns-
for-great-software-2nd-edition-elecia-white/
ebookgate.com
Fast and Effective Embedded Systems Design 1st Edition Rob
Toulson
https://ebookgate.com/product/fast-and-effective-embedded-systems-
design-1st-edition-rob-toulson/
ebookgate.com
Software Development for Embedded Multi core Systems A
Practical Guide Using Embedded Intel Architecture 1st
Edition Max Domeika
https://ebookgate.com/product/software-development-for-embedded-multi-
core-systems-a-practical-guide-using-embedded-intel-architecture-1st-
edition-max-domeika/
ebookgate.com
Design Patterns for Embedded Systems in C An Embedded
Software Engineering Toolkit 1st Edition Bruce Powel
Douglass
https://ebookgate.com/product/design-patterns-for-embedded-systems-in-
c-an-embedded-software-engineering-toolkit-1st-edition-bruce-powel-
douglass/
ebookgate.com
TCP IP Lean Web Servers for Embedded Systems 2nd Edition
Jeremy Bentham
https://ebookgate.com/product/tcp-ip-lean-web-servers-for-embedded-
systems-2nd-edition-jeremy-bentham/
ebookgate.com
Real Time UML Workshop for Embedded Systems 2nd Edition
Bruce Powel Douglass
https://ebookgate.com/product/real-time-uml-workshop-for-embedded-
systems-2nd-edition-bruce-powel-douglass/
ebookgate.com
Embedded System Design Third Edition Santanu Chattopadhyay
https://ebookgate.com/product/embedded-system-design-third-edition-
santanu-chattopadhyay/
ebookgate.com
Embedded Systems Architecture Programming and Design 2nd Edition Raj Kamal
,:.
.·,
,
Embedded
. Sy
stems
Architecture. Programming and Design
Second Edition
Raj Kamal
004.16 KAM
Ill11111IIIIII
12994
Acknowledgements
am immensely grateful to my teachers al the Indian Institute of Technology. Delhi (1966-72), and the University of
Jppsala, Sweden (1978—79, 1984), for teaching me the importance of self-learning and the essence of keeping up with
merging technology. I would like to thank Prof. MS Sodha. FNA, for hi.s support and blessings throughout my academic
fe. I acknowledge my Indore colleagues—Dr PC Sharma, Dr PK Chande, Dr Sanjeev Tokekar, Mrs VrindaTokekar, Dr AK
.amani. Dr Maya Ingle, Dr Sanjay Tanwani, Ms Preeti Saxena. Ms Shraddha Masih, Ms Apama Dev, and Ms Vasanti G
arulkarand other university academicians. Dr PS Grover (Delhi). Dr HarvinderSingh Saini (Hyderabad), Dr S Radhakrishnan
Srivilliputtur), Dr TV Gopal (Anna University) and Dr KM Mehata (Anna University)—for lheir constant encouragement
nd appreciation of my efforts. I am thankful to the editorial team at McGraw-Hill Education India for their reviews and
.iggestions. I acknowledge my late colleague Dr MK Sahu. Head. Computer Centre of the University, who will miss seeing
iis new edition as he passed away during the last phase of the preparation of this book.
I would also like to thank all (hose reviewers who look out lime to go through rhe script and give me their feedback.
heir names are listed below.
Ramanaryan Reddy
>ept. ofComputer Science and Engineering,
idira Gandhi Institute of Technology, New Delhi
lilima Fulmare
Hindustan College ofScience and Technology. Agra
JikhiJ Kothari
)ept. of Electronics and Communication Engineering,
>haram Sinh Desai Institute of Technology. Gujarat
upriya Kelkar
'umniins Institute of Engineering and Technology,
'nne University
himli Adhikari
>ept. ofElectronics and Communication and Engineering,
'alcutta Institute ofEngineering and Management. Kolkata
Hpankar Ghosh
)ept. of Electronics and Communication Engineering
■engal Institute of Technology. Kolkata
lebashish De
>ept. of Electronics and Communication Engineering.
leghnad Saha Institute of Technology, Kolkata
I
P Kabisatpathy
Dept, of Electronics and Instrumentation Engineering.
College of Engineering and Technology. Bhubaneswar
KK Mohapatra
Dept, ofElectronics.
National Institute of Technology, Rourkela
JK Mendiratta
Dept, ofElectronics and Communication and Engineering.
II. K College of Engineering. Bangalore
Lyla B Das
Dept, of Electronics Engineering,
National Institute of Technology, Calicut
Santa Kumari
Dept, of Electronics and Communication Engineering.
Andhra University. Vishakhapafnafn
V Murlidharan
Dept, of Computer Science and Engineering.
MS Ramaiah Institute of Technology. Bangalore
Josephine P Kumar
Dept, of Computer Science and Engineering.
MV.I College of Engineering. Bangalore
Stanley Johnson
Invensys India Pvt. Ltd., Chennai
Finally, I acknowledge my wife, Sushil Mittal, and my family members—Shalin Mittal. Needhi Mittal. Dr Ami
Londaskar, Dr Shilpi Kondaskar, and Ms Arushi Kondaskar—for lheir immense love, understanding, and support during
le writing of this revised edition.
Contents
Preface to the Second Edition
Preface to the First Edition
1. Introduction to Embedded Systems
1.1 Embedded Systems 3
1.2 Processor Embedded into a System 5
1.3 Embedded Hardware Units and Devices in a System 10
1.4 Embedded Software in a System 19
1.5 Examples of Embedded Systems 27
1.6 Embedded System-on-chip (Soc) and Use of VLSI Circuit Design Technology 29
1.7 Complex Systems Design and Processors 32
1.8 Design Process in Embedded System 37
1.9 Formalization of System Design 42
1. 10 Design Process and Design Examples 43
1.11 Classification of Embedded Systems 52
1.12 Skills Required for an Embedded System Designer 53
2. 8051 and Advanced Processor Architectures, Memory Organization and
Real-world Interfacing
2.1 8051 Architecture 62
2.2 Real World Interfacing 72
2.3 Introduction to Advanced Architectures 84
2.4 Processor and Memory Organization 96
2.5 Instruction-Level Parallelism !04
2.6 Performance Metrics 106
2.7 Memory-Types, Memory-Maps and Addresses 106
2.8 Processor Selection 113
2.9 Memory Selection 118
3, Devices and Communication Buses for Devices Network
3.1 IO Types and Examples 130
3.2 Serial Communication Devices 134
3.3 Parallel Device Pons 143
3.4 Sophisticated Interfacing Features in Device Ports 150
3.5 Wireless Devices 151
3.6 Timer and Counting Devices 152
3.7 Watchdog Timer 157
3.8 Real Time Clock 158
3.9 Networked Embedded Systems 159
3.10 Serial Bus Communication Protocols 160
3.11 Parallel Bus Device Protocols—Parallel Communication
Network Using ISA. PCI, PCI-X and Advanced Buses 166
3.12 Internet Enabled Systems—Network Protocols 170
3.13 Wireless and Mobile System Protocols 175
4. Device Drivers and Interrupts Service Mechanism
4 1 Programmed-I/O Busy-wail Approach without Interrupt Service Mechanism 189
vii
ix
I
128
187
Contents
■ n
xiv j
4.2 ISR Concept 192
4.3 Interrupt Sources 200
4.4 Interrupt Servicing (Handling) Mechanism 203
4.5 Multiple Interrupts 209
4.6 Context and the Periods for Context Switching, Interrupt Latency and Deadline 211
4.7 Classification of Processors Interrupt Service Mechanism from
Context-Saving Angle 217
4.8 Direct Memory Access 2/8
4.9 Device Driver Programming 220
.5. Programming Concepts and Embedded Programming in C, C++ and Java
5.1 Software Programming in Assembly Language (ALP) and in High-Level
Language ‘C’ 235
5.2 C Program Elements: Header and Source Files and Preprocessor Directives 237
5.3 Program Elements: Macros and Functions 239
5.4 Program Elements: Data Types, Data Structures, Modifiers, Statements,
Loops and Pointers 24/
5.5 Object-Oriented Programming 262
5.6 Embedded Programming in C++ 263
5.7 Embedded Programming in Java 264
6. Program Modeling Concepts
6.1 Program Models 274
6.2 DFG Models 277
6.3 State Machine Programming Models for Event-controlled Program Flow 282
6.4 Modeling of Multiprocessor Systems 288
6.5 UML Modelling 295
Interprocess Communication and Synchronization of Processes, Threads and Tasks
7.1 Multiple Processes in an Application 305
7.2 Multiple Threads in an Application 306
7.3 Tasks 308
7.4 Task States 308
7.5 Task and Data 310
7.6 Clear-cut Distinction between Functions, ISRS and Tasks by their Characteristics 311
1 ."7 Concept of Semaphores 314
7.8 Shared Data 326
7.9 Interprocess Communication 330
7.10 Signal Function 332
7.11 Semaphore Functions 334
7.12 Message Queue Functions 335
7.13 Mailbox Functions 337
7.14 Pipe Functions 339
7.15 Socket Functions 34/
7.16 RPC Functions 345
8. Real-Time Operating Systems
8.1 OS Services 351
8.2 Process Management 355
8.3 Timer Functions 356
8.4 Event Functions 358
8.5 Memory Management 359
234
273
303
3S0
Contents
8.6 Device. File and IO Subsystems Management 36!
8.7 Interrupt Routines in RTOS Environment and Handling of Interrupt Source Calls 366
8.8 Real-time Operating Systems 370
8.9 Basic Design Using an RTOS 372
8.10 Rios Task Scheduling Models, Interrupt Latency and Response of the Tasks as
Performance Metrics 385
8.11 OS Security Issues 401
9. Real-time Operating System Programming-I: Microc/OS-11 and VxWorks 406
9.1 Basic Functions and Types of RTOSES 408
9.2 RTOS mCOS-ll 410
9.3 RTOS VxWorks 453
10. Real-time Operating System Programming-ii: Windows CE, OSEK and Real-time
Linux Functions 477
10.1 Windows CE 478
10.2 OSEK 494
10.3 Linux 2.6.x and RTLinux 496
11. Design Examples and Case S’tudies of Program Modeling and Programming
with RTOS-1 511
11.1 Case Study of Embedded System Design and Coding for an Automatic 5/2
Chocolate Vending Machine (ACVM) Using Mucos RTOS
11.2 Case Study of Digital Camera Hardware and Sofware Architecture 531
11.3 Case Study of Coding for Sending Application Layer Byte Streams on a
TCP/IP Network Using RTOS Vxworks 537
12. Design Examples and Case Studies of Program Modeling and Programming with
RTOS-2 566
12.1 Case Study of Communication Between Orchestra Robots 567
12.2 Embedded Systems in Automobile 574
12.3 Case Study of an Embedded System for an Adaptive Cruise Control (ACC)
System in a Car 577
12.4 Case Study of an Embedded System for a Smart Card 593
12.5 Case Study of a Mobile Phone Software for Key Inputs 604
13. Embedded Software Development Process and Tools 618
13.1 Introduction to Embedded Software Development Process and Tools 620
13.2 Host and Target Machines 623
13.3 Linking and Locating Software 626
13.4 Getting Embedded Software into the Target System 630
13.5 Issues in Hardware-Software Design and Co-design 634
14. Testing, Simulation and Debugging Techniques and Tools 648
14.1 Testing on Host Machine 649
14.2 Simulators 650
14.3 Laboratory Tools 653
Appendix I: Roadmapfor Various Coi.'l^e Studies 662
Appendix 2: Select Bibliography 663
Index 668
Embedded Systems Architecture Programming and Design 2nd Edition Raj Kamal
Walkthrough
Introduction to EmtxxJded Snrorru
” 1.1 EMBEDDED SYSTEMS
1.1.1 System
1.1.2 Embedded System
Definition Qtu; of ihcdcllniiiun-. ul tmlxdded nJrm i' j- full..-v
"Art rmbeddrd tjilrnt » u ivMrm 'hut hat indudikd u>)ln>ur u"d i<Kiputcf->u>rd^irc. »liuh muLrs it
Rmtx'dJcd system*. have been defined in hi«>ks puhli'tud :
ufdefinitions from otherv in the Held:
Simple approach with interesting
examples and figures
Simple approach with figures to
explain complex topic of system
on chip for a mobile phone
E^twMcd Systems
•>. Other fcifieaftdmiltif units.
An ciemptiry application >if Mich an embedded Sn(' is die iiu*nlc plmrus Sinele psiRx*-.' pncewirs.
ASYSTEMONCMiP
SIN&.E PURPOSE BUSES
PROCESSORS
OSGiTAi.
asipi cmcuns
. . TWER
IP, MUX,
BtTAADORESS .. -
GENERATOR PORt
INTERFACES
PROGRAM PROGR-M. DUAC
AOORESS data
GENERATOR AN0PORT
UEMORT IN1ERRUPT
COHTROUCR
MUtlt-
PROCESSOR
CBCWTS.
• i5-2tr* -cm -a a%
AREA AREA AREA
i«t. J.}0 ASoCembeddedsyitetnanditscommonbutwithinternalASlPiintcniaiprocesson,
IPl shored memories andperipheral interfaces
A syStem t' 4 *” wnrClllg. organizing or dimly- nW •» male. '.< .1- si'irilnli; In J 11sei. plan, pc.glani.ir
•<t ofrok‘. A spk-inisalw.an MrangeiTk-ni m which all ■!' umis a.w-mHe amt <nrk u-gilbc'according tnthe
plan or prugrani.
Consider a watch, It is a tnne-di-play .y.lcn, Ils pails j>< n. hardware. needles ami hatiery with Ihe
huuliful dial, chassis and strap ffu-n- i*jrn iv Jinn* ttic real nine cicry s<v«Hid and cuntinwwsly
update the lime every second. The system.program updates the display using three needles alterexh second.
Itfutluwio let ofruin. Someoflhc.<c rules are astulli.ws <u All needles move only clockwise. tin A thin and
long needle routes every second such dial it return. to same pr.inon after a minute (nil A lung needle rutiles
every nunw'esuch that itneiunutn same position after an hour, (in A shun needle nnatese>cry hour such dial
il returns n> same position after twelve nours tvi All three needles return to the vane inclination alter twelve
hours each day.
Consirfcr a washing machine. It is an automatic clothes-washing system, lie impurunl hardware pans
include its 'Ulus display panel, the switches and dials for u-er-defined programming, a tin.tor to rotate or
spin, its power supply and control unit, an inner water level vow. a solenoid salve tor letting waler in and
another valve fur letting water drain out. /here f^'ti wrguniw to wash clothes autunuticuHy accixding to a
program preset hy a user. The rv.trrny-pr>'errwi rs activated Io wash llK dirty d<dn*s plxcd in a lank, whwh
rotates or spins in preprogrammed steps and stages, fr fulton a ui "f nilrt Suioc of these roles arc as
follows: (il Follow the step* strictly in ihc ii.llm.mg scipn-ricc Step 1. Wash hy .pinning the motor according
to a programmed period. -Step II: Rinse in trcsli waler alter drarmng vol the dirty water, aid rinse a second
lime ifthe system isnutprogrammedin waler-saving nude. Step lit Alter draining imii the watercompletely,
spin the motor fast fora programmed (dud for drying by wniriiugingout waler Irunt ihr clothes. Step IV:
Show the Wash-overstatus hy a blinking display. Stund the alarm tut a minute to signal that the wa‘h cycle is
evmplcie. IiiI Al each step, display lhe pridess stage of the system. <m> fn ea-a: til an iiiierropuoti. eiecute
only lhe remaining part i'f lhe program. Mailing from the p'siiion wldn ihi- process was interrupted There
Canbe m> rerxniion from Slept unless the u-arr resets the sysigmby in-efting another sc"1' clothesand rc.-els
thr program
xviii Walkthrough
Oswaw^ SysWi Pwyjs’wu^-U C£. O9€K.*« Awr-Tmc Inu .
Summary, keywords and their
definitions, review questions
and practice exercises in each
chapter
Review Questions
f i— . ■ ।
5. ‘5?’’“s' Practice Exercises
Walkthrough xix
_
___>'
'pTCpaMrfrqCcneaptiaM&'«MiMadP'ognMr*qhC.C*« arddeva
1 Aa Java codn are fini interpreted by dieJVMdrum comparatively elowly. Thiadisadvantagecan he
overcomeaafollowa-. Javabyte rode* can heconvenedtoriMsve nwtunecodesftx faw .•jraimg using
jusl-rn-time (JlTJcompilalitm. A Jiva accdoalor teo-pwever) can be used in the system ft* fast
code-run.
X jAvabytncoderthatarcprtendeefresafalargermemory. AncntbedWJavatyOcm mayneedaminimum
CfSI2kB POM and 512 kB RAM becameofthe needto fire tnoalJ 1VM and run the application.
5.7.4 J2ME
(J»eofJ2ME/Java 2 Micro Edition) twJav*Cardc*EmbeddedJavahelpsinreducing the rude luetuK kH
for (he uaual application! likeman card. How? The foUowiogarc the method!
I, Use roteetaacaonly.Claueaftwbalkron-timcenvironment fetmtheVM interns! t'ormai araloMy
(he programmer"* newJavaclauea are not tn internal formal.
X Provideforconfiguring therun-time enviroctrneti. Eaamplcaofconfiguring aredrfetmg rAeesrepnun
haniling clout), mer-defincdcluitloader),fileciautl. AWTclout), rrni'hnmitedthread), thread
groufi. tnoill-dmmtiaularray) and Jong mdflooring data ryptt Ochercwfiguring examples are
adding che specific cluaea—daugnme. input, output and streams fr> connecttons to network when
needed.
3. Create one object at a time when running the multiple threads.
4. Reuse the object! insteadofusing a largernumber ofobjects.
3. Usescalar types only as long u feasible.
JavaCard. EmbeddedJava and J2ME are three venioro of Jiva that generate a reduced cede siu. J2ME
provides the optimized run-lime environment. Instead ofthe use of package. J2ME provides fur the codes
for the core classes only. 'These codes are stored al the ROM of the embedded system, fl provides for two
alltmaiivecoctfiguraliooa.connecteddeviceconfiguration(CDClarsticonrcctcdlimiteddesireconfigurations
rrtno CDCinheritsafewclasses frompackagesforoet.security,io.reflect,sccurity-cea test.leu.resources,
util, jar and zip.CLDCdoes oct provide feethe applets, swt, bears, math, net, rmi. security and *ql and ten
packages hr jiva.lang. There is ■ separate javu.mircoedrtiaa.so package itr CLDC cunfiguration. A PDA
ipenonal digital assistant)or mobile phene uses CDC or CLDC.
There is scaleable OS future inJ2ME. Thereit newvirtual machine. KVM nr analternative 10JVM. When
using the KVM. the system needs a 64 kfi instead of 512 iB run-time environment. KVM features arc as
follows:
1. Useoffollowing data types is optional, (a) Multi-dimensional arrays. (bl long 64-bil integer and tel
floating points.
2. Errors are handled by the program ctasaes, which rahenl only a few seeded error-handling lit'-*'
from thejava bO package farthe exceptions.
3. Ute ofaseparate setofAPIs(applicationprogram interlaces) insteadufJINI. JINI importable. But in
(he embedded system, the ROM hu the application alreadyported and the user does not change it.
4. There is no verificationnf theclasses. KVM presumes the elistc as already validated
t. Thereis m>object finaliUUoii thegarbage collectordoesnorhave tojx-rti*111 InlK-viinwiviigrtungcv
in theobject ter fiml'utiioo.
6, The class loader is not available to the user program. The KVM provides the loader.
7. Thread groups are not available.
8. There is no use ofjava.Ung.rcflection, Thus, there are no interfaces that do the object serialization,
debugging and profiling.
Simple way of point-wise
presentation of the details by
using lists and tables
Program ModafctgConcops
Table 6.2 UML Basic Elements
I Mndrllixy
j CM"
Widl dot) itrmitl
are! thtra-'
Class defines the states. aoribum ano tadunt**. A
clau canaltobe aa active or atucract clAv
i Afcvxi
1 Cl-ll!
Object
Active
object
A ciaM ingeneral may he abstract whencitherrarer*
thorn states, operaon* <■ behaviour u eornpieiety
defined, being h anabroadage.or when it is not
fur creating objects but only a class, which c*tend>.
implencau the abstract behaviours (iMthedil and
specifies (he aharam roritues (fields ,* nremo)
that class can creMc theobject.
Aninstanceofadaathate.afunctionalcsaityfumed
by copyingthetula.Stribum and hehavicw from 1
class.
Anactiveclassdefinesw> activecfcjeninsurern(an
active etass. A processor threadh equivalent 10 ite
activeobject inUML becaascactive object poststhe
signals like rhrewl and cart wait before sirring or
rewriting the operationusing the mcdsoA.
Anactiveclassac*>athreadetathathas 1defined
slate, attributes, behaviours and behaviours foe the
signals. Active dsa in addition, define* the -natroi
by signal betevun (for a signalling oi^ct. which
canbepouedandrarwhichitowy wailbeforestarting
or resuming). Thus there is control on rhe class
behaviour.
Etreuilnrv Diutrurrvrviti.'
ftriirr.enluh.a.
Kev'Luigvtar hut uiih dissolves a. dsown
in Figure ft IfX-’l ft* etas ccinic* I.* it. -
identity, attributes and behaviuur. |
(o[ciaiio<l' or mcihudt vr iouIUa-i <w j
1un.-iH*tsi
Rr.tangvlar hot with din.no. for eU.x
names for its identity, alirihutrs and
opetvnns. but with prefit abstract w*b I
each ahorjct behaioiur ami aliirtarc
i
kectangutu bus with ob^ct identity I
follirwcd by wniKohm and class idcnlitv i
as sfs—n in Figure ft Ittifi
Rcvanpita For withitijcfl tienni
followed by scmtrokei amiebss j
identity,lair with prefic «tivc with ■
ibjevt idcniHy. j
Rectangular hoi with thick border lines I
arilinnerUivisiiMH ft* theciaM narr*v !
for the identity,anritxuesand Fehavnwn j
foyuratnXB *id signals), hit with peefis
as-ttvc withetar sdreeily.
I
Signal Anobject,wttidi itkm (postal)frontoneactiveetas
(activeobject)tosaoiherwaiveetas,wpidiuufoe
Man er resumption. Signal obsea tahaviuw tlcfines
the behaviour(operation roahod)ofthe kaspmeeas
eoasmmiatioiL (Signal (Section 4X2) is software
ihslncttm or method (tncuon). which gtaeralea
rmcrruftl Signal object tins attribute* (peatnctcrsl.
ASribute maybejusta flagofI-tit.
Signal identity within two pai**of
iiacungandctaangsigns Ccshswral by
Ctai idcniity (StmitatosttrcoiypeK
Slereo-
IJT*
An Dspacked cofioficn <4 dements (tfritam or
bdHvfrw)tiufB repeatedlytoed.
Rectangularbos withstereotype identity
ttme given ■ifhhIhe iwnpairsof
aurring wadekmirg signsMbvnfbychr
classickwkyasshownin figure 6.lf(r>. |
IGmafi
Walkthrough
c^. SUM of UoMng andProgmmmmg -«n RTOS->
)/• End«/Cotte Cwd^pVyTLmeCtecftmclkm•/
69. r BR coda farpo*Vg■*»<■ farlap U>TM.Cfc<*«y •/
SR_TIneU<tt <>( , _
y.r^f— far crMseg * nvtragrfar<r*and<fa*Cateeach >’»?mtmfl fate1VVMem
KTCfct’f
TO. OBMtaxIVs (MbosTuacD^StrMsg, timcDaac);
71. )7>En>c(13R_TtmeDate euV’l
"11.2 CASE SHIMOF DIGITAL CAMERA HARDWARE ANDSOFWARE
ARCHfTECTURE
TKdigitalOWiwasiiuroduccdearlierinSection l.hl.4.Athgiialeainen issneeam^cidSrX.ISeetteilA I
1.10.4 Ihied tV camera funetkte. hardwwcaruj wdiwwc units. Hjirt' 1.14 4u—rd tWrdwwe
tn) wfiwarccnmfeeicnu in * wnpted>g*al earner*.
Scrtiou 11.2.t oral 11.2-2 gi't iVdcugn Ucyw cd* digital camera. Scslnwv 11 2.-* am) 11 24 dcwnV
hvdware and telware atvfaitciurc.
11.2.1 Requirements
RcquirmeW'ufiVdigital earner* e» he undcruond througha requirtmenttable given m Table II I
nr OruiMfunrtumiiuU* duearner*an aifaOm:
I. A « <9 onurcdlen crnuol Jitdicr. flash. <froexample, for pcnfdtcnh. direct mermuy KCOS. nJ
fote*r. neo facts and eye-ball image control. GUI consist* of the IXD display tor graphics. and
<wils-ViandIwueassf« inputs al camera. A liaahxrcen n amaher ahemaurc!•»VXD an)keypad.
TV user give* commands for twitching on the omen. Huh. diuricr, adyvrl brightness. couth.
s-ulnr.tare nJ transfer.Thet»crcnmmaruKvc in thehemoftruerropr ogaah.Eachsagnalgroerate*
farm aute inpul fromant^craiedtwitchorburton. Uhen a bunucr(oropeningthedwuern prewol.
a Ilash lanq) ghros and a self*timercircuitswitcVv offthe lamp aulcenalicaJIy.
2. IV (Vrarc generate light, which fill, m tV CCD array, which through an ADC tranuraw the bib
far eachpitetineach row in the frame, and alsofor1Vdark area pitch ineachrow in a veriKsl scrip
lie nflri cwrcctirm in CCDsignaledlight intensities far nit row. IV srnp t*m adjacentframe
3. A pkswvcrwvriHedanumberofpilets. TV numberofprset'usedfir:pcturedeterminesffwilroiiuL
f*Kpicture sirtsoasof a number oThcrnnmlaJ and tenical pitch. Fur 2592 < 1944 (wtcKthereare
2592 * 1*44 s SO.'KMK arts cdcelts. i-Vti *ct of pixel hat three cells. fir the red. erren and blue
nimprnuin J piacf. EachcellgetsespuaedIoa picture when tV shutter ufcanwruiysensim amet
command. 7he »anrro ffrnrds rtepictures ironga rtarge-tiwipWdesires iCCDramy 0>r array
crourtsefa UrgerutrnberofCCD cells. throe ateachpitch J
L
T.
a
/
K
C,
o
■J
'£
c
T
/
‘1/
Mx mt/ fruMrmAardtLJ m/rmi dr»iffi th?thtrr•i/’e* ihm/iuM */lt4 in t*wi
t*toi/M«*fuW(ovrm rWw<rrkipwr 7V/i • uir i(mJ* tv1iAnouttRaniif<Avriita'*
rr^tfMliufXCVM/!■AteA»H' rJaj•h/nn tn*r I.Hl2 /A/ •-^<
it^fh ittifmilmrn«it«'rJru'br<iA ) V)4 <*'4
*/ fcAiiA rvi tWAJtHfiicii'hr' ia < //
/V ubftxD.n lAf»* itJw urr Ut i
t !•* irvn» hrv ti* irf44 ijirrm uzr
liilftL
2. Ta At* UHl. n wi/ u> iV^rnx*it-f/Ar ijifr***.
J. Tit {ett'n fo defint htrdtrtft m/i tttprt’cri u>t •••
7i>AumA*ki(Afbv*^Arwjhiw*rAiQcWrA fv r<rrv/w* tumid*•
platedrfUmi *Ar ia^*ufT i*ru
<7«iyK«KHJ>, /VTItftTfrM «/M^AaKr
1 T<t feat* lading fur d/ttin impUfnfnialion un^r A/VCVZY u*/ VrUti/li
#T7V.V’. dlx« /V uif r/ tT( f,u fiu* ivniAa*<«/iin uaJ < w'rrn;
*11.1 CASE STUDY OF EMBEDDED SYSTEM DESIGN AND
COOING FOR AN AC/TOMATfC CHOCO1ATE
VENDING MACHINE |ACVM) USING MUCOS RTOS
ACVM wi* 1arodueerfcaiIiftNafiwn I H>,2. h ACVm fafKlic*'.hMJwjre
i/xlWiwdc unib. Fipjfc t.U *1**01 j diagrarrunjcic ripvtxflLiui«nH ACVM
SechnM JI I.Mo IIJ.AgivethedeMgnan AC'VM. V.2ik'wnt'cd
MUCOS StTOS. It ta a portable. ROMabk. scabbte. proemfioe. real nn« jai!
multiuskififkemeLSection 11.J.?4ncnhe* Gm AC'VM tohin^MUCtA**KHAS
(Scctiw 9.2) propimrung envmmmrnl.
11.1.1 Requirements
TIk crifui/ttwntt td dtf mo;hinr rm he uMentm«J lhAAigh j rrquftc/ncTM IjNc
pun in Table N.I.
11.1.2 Specifications
The ACVMspccircAik*i in briefarc v Jullu»>.
1. Ct h<s an ulfd^nunffie keypad <w» iftc l"p the flixhi/w TJol cnjhte* J
chihJtoimencl»rth11whenboviacarbwciParr The«r»nerc.m Jw*cy*iimji-1
jnJ <nicr*xt uch the ’iijchihc
Explains modeling of programs and software engineering practices for system design by
case studies of systems for automatic chocolate vending machine, digital camera, TCP/
IP stack creation, robot orchestra, automatic cruise control, smart card and mobile phone
Embedded SyUemi
4h, /• Wriie IV imy element* ufkr encry^irwi. •!
ApplSirw SmanOStiiwiypi <rruwnUp,< DfSi.
5mirtU$Ql*ud (MtgQSun. AfT*Su>;
49. !• gaum Ddlyed uA uA.PW. •/
SmanOSTiincDlyRcura: (Lni.PWPmmijrp
//•Eid ofWhilekxf’l
iO.V'EndcfUttjln^Cnia. V
.
..............*........
22.5 CASE STUDY OF A MOBILE PHONE SOFTWARE FOR KEY INPUTS
Mobile pbmo arc wtiarl. Each fdmne fan many APlt Eumple ofAPI* are pfamc. SM5 I*bnr1 me*ugc
uncrl MMS (nihimcdia mouxiny lenfoe). e-mail, akku book, —ell bmwung. enlendar, ladt-i.Hfo
lul. WimtfVL Pncket-VfanLi^ta-ExcH. awe-pad frv mono*, portd-ri'f., -Irk <bow andcamera.
Meiile phurw witha large icudbem 0fe a vsloal keypad Mrtile pKxw witha -mall wrecn u*e* T9
keypad.TVpreirffcasestudyrelatein'SALScreacapplkatirti' bia ombilepfame wiipT9 keypsd farinput*
Section 115.1 gives tV icquiranrautd SUS create and *cnd applii-ainwi'. Sectuut 12-5.2 give* thr
ulusesandclxa diagrams. SccuM IISJgives tV abac diagram art! Scttam 12.5.4 gives cnminjmeaiiun
hardwn. SerJon 1155 describes wfrwoeachVdure. Section 12 5.6 ck-w-nN-t the bnfiwnre lash, ud
Syacteuriuiiun Afodclforrhe atgAotm
12.5.1 Requirements
Apmcoaor.keypad,acieea.snxlchpadnrestery,penbleace rnemLCyandcreiimunicationunit*arc required
heSMSocaeandoutappUcajraxScnucbpdaiaooryadihtMSorusedfuricntpnrarysavingofchmcieet
foytes) duriaf the appiicaiirai. PcnVoics tthjaory addresses are used u^q *m+i ihar as scam a change i*
made m the byte, it prrats era afterlhe pow ewiictes off. Further, when tVn. is a change there, an
idenCaidtangcisrefleoedino/Vrcnrreiasedcbjeca.Forexample,a rtuncholueuina (V fietVCwcts.
de<me dtmgclaftcsin thefile forMhosboot forndiiig tVe-onils.
figure IUDshowsspeeife MS.whichMtBwdfortV SMS factnaeappUcataui.TV smen ismedfor
(EflttayttgiVnsmLHgweIUDdtowsthadiacoefourCErux5cys(up.diwiLleft aMn^uldeixnedby ri.
Cl Cland C4.Inoaugaiterkeybad. fear(Sifcreeaemerkeysaremed.TV mobilena»rkeyin tVkcy^J
i-jradilhait fti’rtS.nsasfocxkeys Whenthetcyis(msad towardsdie left iVinnurmmea left foLuta
'.rmgvcndtti.'' a»thetightdieeunwrwncsngbat-sk.aadseenfori^,Tyro drum<11
la edditkr. there are fmrcommand keys(righKomersccoodupw. kfi<omcr Kturxl-row. rigli-cnmer
firU-rowand left-eonerTintmwldeaaedbykeyULowLkcyiRowlkcylRnwl atrikeyIRtiwI.Also,there
arr. mne TVkeys faroumben I to 9 b wtf!a foralphabetsa to a.(« A io Z>. TVre we iwo modr-keys
ftcyMI andkcyM2)andonekeyOkeyfarbyi^inantcharacteroianVrQnr yxav. A)/tcavn>cnc>cnio
mallcase or eapiul case is controlled by amode-key'sstate. Teucharacw entered tn keying dependson
Alate ofdie TV key.|Recall Rumples 5.6 and 6J andSectfon 63|. .
Walkthrough xxi
ErrMdod Sr»*™
4
'£
A
K
K
I
Q
o
E
c
-r
i
E
5
K* B'jJf /mm iht f'JL^ing j/i rAn ,ipkf.
fu Bu.<k ftinchotu andnpti vffTOSti
hi' XTPX pCOS-lt ai MUCOX «n fht lent thrvugh iff riMwipffr—
tMtinplf1V.I m 920. WAararymi*iUj artpaiwrfuafirfeMnJwJanminted
fttr rtii h <0V/i MUCO31 finiftw* •ill 6r cj^w«A Itartin* *ht m<v «/
in rV AWCOJij tMp'fcvv/«ra remit• tvtn t]onaAtr UFOSit
urdUtttf Jhit-diAr/pf/r«jrfvmwUrritum&AffrijJhmcW- and
mhrddrdJtfTAVi lairt <m.
ran k'rHo/Lj fuim Wtnd Hiivr* Stitmi m ofiff an HTOS far »^ph/ifiiand
tfdmMrJ irifi'MJ vi/A fuivttfal tuyl loppy*• thniugh irnn tuirtplct^
Ktamplfi 9.21 *•• 9.27. bifffnnftx brtntrt <Ar ftHart1 irm*tpAarrt
wwiJfestti u</4*/wi irirt ftQVdtvAai ofMUCOS ndlht •"•litfltof
O»pw K* •rffdrxfr&tlAc Hv>fowt Ct OSfiX reirf-f*mrfjftufflTfa/uui.
5.1 BASK FUNCTIONS AND TYPES OF RTOSes
A rumple* rnd'jtt*tirt£ embedded QUem detigfi re/juicc* (he dcvelapmcm of
thwwghly tcUeJhupfree cafe* fa
l. JAtegnacd devtJapmeft efivinmment
2 Tuk furwiiixnin emhakfcdC «emtakferf C**
V Rcif-tinv ckxk-bwed hiftjwwt ind mftwireumen
a. Scheduler
V (Tevet driven «nd devicemiMger
6 Funetn«> f« [HTj vtiftg the vgMh. event (U< fnwp. wmiptvrr-hiftUmg
fuHciiofti »d function* for the queue*, m*ilbu*fcvpipe ind wekeb.
7 AddiUauJ (qm'mjim. fur cutapte*TCMPof US8or RlwUjOth*a WIKof
IfDAMdGUh.
R Fjra md exception htftdtuig function.
v. (ruingand5,ucmdehuggirywrffwirtforIcwagRTOS a%«e11a<devchpcrf
embedded 4ppliCJ»f*,
9.UuJ shows the tag fumu*m* cipcttcd from the kmd of an RTOS.
The RTDS'% hi«c the fdJowing future* in genenl.
1 Ic/tkI fuiw'iiouand ichcduling.*preemptive e» pre-cmRrtcpluslime
dicing.
2 . Pnuniic* definicmns fur ihe CxsX> and 1ST.
V Pnoniy mhenuncctenure <«oRjm ci pnurity ceitag (eattfe.
J. Lmui fanumber of la«Xi
5. TA't synchroAUion md IPC function*.
6. IDE consisting of cdhew. platform builder. (iUI and trephre* wifiwjr?.
•.(Cipher, ikbugp3|! mxI hnsi urpci 'vpprihoA
?. (revue imaging tool and devicedriven.
(( f7iw*c /Y/SfX*(prwt f«qp<i_ini fvflnl*»n utrng lhe HJSf.Viparom tfr Tufbrw'ngs
<<I The tufKinAi R«d*«LMiU^ i ««cuu«t«<ethe Vt.Wiek*.Idwwy*ufcvwMiuwv(the KWX<>«w*
rhj DrfurKtun,^ i<w«rr. na^ vhner wlinkl JMUUuc.ck^andrmivcj.mdm*cw
tel DrftfAaamn^.wuHi i / the ailnbvicid*a RISIX speoc.
Ml 1he funciaau osteal < । mJ «fn_ftxi*e() unloAand M •<f«w.
IcJ The fiwitiqn<i_iUjty I t ugMh<oa tinglewarling ti'Alh*ihctma^e<* av«UMe The
mKv '*•<'* fcv a tab.whichha»hemtegrtrfedfaammTraik* IfegiUcrcd*ican*
Jaitfot ukctocMcUihcna^nutifyj.Thi* prwranineMfO^fymefo/fuowrvertuk. A *er>cr
tartKvcivertirm^iicatuMifroma drnt t*dc thruiighaMgndhaaikr fiuKtk* (like an JKKi
Hl lie fofeinm Ifrtfktct ihr aiuitarteirfaPDSLC (ftroc
fgt The rt)M .jane n^unlhik I 1net drun^Ac<f«wimrAhatcly hut petent*
the<nhc«U«Uln«rung the ifurnc l>ripeur»dl gsdouuyvd urdyifthe 11M usk cfane* ebe
ipcw.Jkak.iy iw b> dC'JtUxak* Ur nr'ruxy iMnriwd »ilhqmc IXB.
VcWitfU 4><vcbw»etJcrAfaanal hjhuwtng fnii/tc* djTiotcwieficwnamhe u<d. liilTwu
I-11-0 mdJok h«queue* bom hymultipleia*L* RfSIXqumaahavetheakiicavial firfh/wjag (e•kirr
U4 ft41freJKm mt**ea single *stu*g ttfk is ivaiUMe IftJthereOnbe U pri<rityk*d» in place
or imc|Wumly iocH.'KGfXTft VcWiniL
12. CVruAKfat*r»r drmcf»onuJ.+nir or //*Ck Wh0 a Uak oukx a tskJDalkKUto tScctnm 93.il.
When OMOg the uU<eUtorf fmtfiom. the nunAcr tailiidca Uak ideAtfy.Sranlariy. a prpefSaiiim 7.14i<m
mAidtSci.v*i 7 I$rim GteIStxdmX.6.?Iwhencruiei.afitedocrif*r<fetaurudUK m cmalmdanuntfrr.
Ge cample, id n xuigrrdmideveify Ac devcccroud. Tte numbs*h rnwgixd iffciclaHiimeg jxi rd Jr
numhen abpnJy aJkratrd Whe» mwij: Ac deviedreltfalImdiiMb. Aenmotierfarilitifca thedr*ice
The devuTfmrtMesampln arcvfen iv rodorwriteorgd Ufibur9vet9afifttucck“c tSnm<i X 61
A pqrit.VaWicts h i HFO^w. wbuch i* managed <MbyquortfCAnO/tn*Nit by the dc«icc4n«er
funutiiau. VtWud* ha* maoagcmlfuncucmf*M a pvpc-drHd(likeadeviceAixcrjpqw*/n*.Thi*11 analifiaA
l‘»ihe namedppedriwrmUwi. fipe*ahn in^Jcfncnttheunafrro.tjrmdiMtanauwtoftok.*.
FufKijiwi pipel'eiCfcaiC i’/jnp«//wprXo**r*. muuMki. maukfj/llytr/i crraici a pipe device named
ptfnHaon farmuinaim«toi*i<7mcMps E*h mageoa he ofni&Ktnis) ua Artec It cnicr*
ir.ma Iin uftk»ice*«mcrerfxuudev*f 1 fuiKtwnretrieve*th:1n(ofdevrfts withthede«uTnumbrrallftied
id Meh device including|wpcdencr*
Curuadu m cumplc (« crcAog a pipe namedupiprUurinfo.Aswnre itaa*1cachave a rottnfesn tX
fnurtncuagev i&crname. po**«d. ictephunc number and c-ruaitID.tadi the< cuO b: of a nuAimum
m/c of J2 byto iMify A gkXmi variablefJ»» an integer number farJfile docripfer that tdetuifeta (k*u*e
anmng a ninahcrof de»K^ at die IO *yucm. 77k ik*k*e can te a fife ur ppe or wekcl nr>*her dote.
K*ample V 26 ctpCam*Jk mde*torcreating. »*riimg and reading.
Example 9.26
I. * include Vedjh.h"P Indiofe du [0 librvy fmlicn*. */
pipeDrv l)./* Iroafl a ppe driwr. */
1.<* Declarefiledscnywt.♦I
mfdi
3. P Moderefer* 10 the pennhoan inat* NFS (Network RfeScrrerL Mate h rev 00 for urnurfeial
permi«tkM. *f
IDI
4.7*Create pipeMmeJ a* pipeUicftnfo forJ menagecart )2 bytamaairaa */
Comprehensive explanation with coding examples for
learning the widely used RTOSes- mCOS-ll, VxWorks,
Windows CE, OSEK and Real Time Linux
Embedded Syilents
inlcmaj cwnmuntcutiorf. E&ten.ion diKA nrtpermitcreationand deletion ol t^vls durinp run. l*Aienxii>ndefines
exh (1st<>fdifferentpriorityand activatesiiotfyinc taihecvdo. iMlcnsiim imi um; n>es<apequeues»1
vies semaphores as event flaponly with no askhavmp rvo-time deletion <T crvjlinn ofilr'C.
|" OSEhMKAoiMcit............
i (Throestandards: MOPISTARC,Carrarwiotai slackand NetworkManagement)
i'S "•
i EOfcientdesignol , ■
. artMMtm' The ..
■ hinttie.nl*rr
1 shall be
: contigurMe and '
I Tti'ih'r *~ I
, ana&eCO&n*
; adnBW»r<o<d» |>
■archdedixitod'e
jsoffcatnnri !'
1 queuian ‘f
।---------------1 -------------- ------ -
SMfleadondoesnotprascraierrotems-naonavertsandVws provisiono>aMoUrtn
independencewinregards to MMdualbgrtomenMenand&wrieithe pcxtaWey and
* resMMy apflicatenwAeare
I EHtenee the perfarmenca doveraltjean<Mo<k*pMngaddKondhardwaredueIo
I eoqkancad utBDtimcdthek*Ag«we(«Mngrensna)tMAutodin (he vehicle
I*Verfcation dfiesOonattyand Inqdemeraadon <•IsuUjpesn aalacledpantprefects
I__________________________ _
______ ______
Fig. J0.2 OSfKbasicftatures
Walkthrough
xxii
Omi^r*i Txts'. £*«* CUtaJJy.Cce 3>A
IMIItaam.May. 8U
rtMtopW. ArartrahIMI r^lra.TeyknBlFroch.0«. 3B5.
Ma*. USA.MM.
1)
9 mjKmmL
pwY» EdKf^B. $i*«E<L 2003.
11 K.VXL‘WaiJrffcd teSpw.-Cortpo.MpMrffofrjvvf-
fW l/<h» Drviwrh. 200).
0u^U» Bobftf WtOOVJCLNfT.UXA. 2OQ3.
CwAtlia."Dr4«v CnMWfiortwi'', M SAraa. CTR«2)>2W1
prwtC V CK..VUdGv^k AvhabDm.AAr jkr&iMft
A. PRINTED BOOKS
I. GrWwnFto<liF»B’ll9ten«mJ Mm KaA*.vLm«AjfiianttDr AMa^>OaGvaA
Fut^tSeixtanF^icliMSyriraA Uriah an".Springer, Mor.2006.
prairie Halt2001
$1MA 8. B«JL W*t4W Jynmr K^i ■brtf Druft, BaflD*vonb
itaam. Nw Mw. USA. 19%(T* Mfa. Mat 9021
Appendix 2:
Select Bibliography
us*,ro
4taf*Drdfa*,
(--o— w. Vajrara. Hitnrs^wr Syaaray. Aral Raw Mariydrtaf*.
Acporuiaj- 9etoa euto^icny
19. MpjVwvx.iMte nateAvs^lFx n^cntiog»»^ftiratMeit/ammsgujatl
20. lup/hraraEETAw.com(Frr rutecnlaAy ua W»l«otMted a>«KmrayUMel.
21 MpjrvwweRcnrWraibedBih |Fk wtaoibuf»• populareateftW lywem rra^mrat
’.2 tatIt w»«erMridtol-crranpiiucicotwelcacr IFor wbecrita*( » a pabular cotaddcd cooipuUf lyurm
maywraj
2) Mp/AraafomBModdmtA ppdareoMdriri ry*a ■%!
21 KiqrWaaaaa«wrt^oiaxizri IA pofarls world "ifcradBfCkvadiacm wt^Hc isdaily de Lcy-ttnni
m «*riawi M<f«n|
C. PRINTED JOURNAL PAPER REFERENCES
■ HuanLl KnthiRrinasmMm.FruhaHSheaoy. Rods*A.G«0ri«adH>eD.SwWney.•«<«<Woufrww
tat AralRawTeaAa M «oMrRoterirr", Jewraaio<SyacnaandSnftwwe.K>(1|. 962-971, 20%
2. C.R.<i«AN. Shnu. K-RawtiMhim.S.MrirwW.'EJIrriwhMnxSttrtnfxAmmuawAfpUcami:
A .wr Srad>~, Pnx at 11* tE£E WemarariGoo/erracu oo EnriedfedtaJ Tima Coanpding Syarirra lad
Afele&au" 2006
1 LrivBerre. FtBxkaaaiwad Knar. "CWfer Cnaien!frMdriAxotuotrn ttaxnrtj' IEEE Mem. 23r«).
M-». xm
4 Wayw Well, Bail Oia BM Tehaa La. "SwvrGracrar orCaaPaaAMSyumu**. IETF Micro. 22(5).46-35,
2002.
1 tearLmur Btlrt. 'EtgSadagHartrWCf>-dt»f*tA Wreea-UPm FFCA>~ /Zryi) Jcamd. gp
H-n. Saw,law,. 2UO2.
4 Ou-Tiny UM| and Hom hoy 'Or"*B UoftiatCndar CramedMA Caorararad Srrint StoMwy' law
Vehicle SyumaDyrunucr. Jl.fV- Jll-JJO. 1909.
7. Tldad Mmu, */*arriAru /*apr>urL AoJyei radAypteafaar”. hoc. (EEE. 77(4), $41-3W>. IM9
Detailed selected bibliography of books, journal references and
important web links at end of the book to facilitate building a startup
library for references and further studies in Embedded Systems
EnfeddM Systems
IS. Caiy F. M. >hmr.a>mKr,raadMv<eraw‘">-*-^'*wv'(,'^sT*n’raidHo^ww £atm"My.Os(cod
UnhEftUy tfew, Nev Yivt. 199?
<6 Balann F.M CluaS*. A luoeUa. N. H«h- A I. la'.yr.-.C Poecunme. A E Smyanaaai. Vteolelli.K
Scncn.ah. K Saruli, aM R TaMua. #/un>-orr,.'a^-«mO-flrarn n/frArdidSmr^i;A P.du A.TVa»fc
Nnrxcll.S!A.Klu.cc Academic PuAIrdvrv laid 19*7
17 Joan FrarcM Bman. FmMIOJ Snrm A'a.rramAary m CunjAiirmN.>. Vta Ncawri.RcmhcJd.Nc» Tert,
USA. 19%
M fticrS|axi..Ar«nAvn<ra*r rnAnrd,.- y*r4W2Z. l^EdW. fttnurcHoS. fi^mrandCldTAW. IOC*
39 FrrJ liilull. Ajiu C'lramaocuiwn C'ravulrryrmniic ami Oyra S.urau. 4i>i ESaxa. tancr Edvuuoa.
1996ilowth (ndon Rrynra. XDIi
90 Sdhcnchauend PR Calvin. OprnirMy Srarrai, Addrwai WWe*. Rearimy.MA. USA. 19%
VI. frier.MaramJrl. x*J GcalCamrai. t'nlrCratKa^tt FxtMti fr.rirri, Ahram AcademeniWicticn.
lux. Id*.*}.
92 Oanicl Tahah.AdranrrdArn'mpmrrairai.McGrsv.HiH, L'SA 199$.
9J. Gajcl.. Daeul 0 . Frus Vahrt. Sxnj.r SaijAand lieGraf.Spr.dL'oramandUrain KmArddrrf.9.irrau,
Enykwrod C'-IK NJ. Proiiee Hall. 1991
94. FranUinG. F. I I) fratII aaJ A. EAami-Nerai. frrdharl Cmi*Wrfthu&ue Snima, r* Ed, ArMicra
Walcy. Rc^uf. MA.USA. IMM.
9S. Sienan J.W.. Ar S»l Marnmnlkr—HaatMtr Stfium<rd Prance HaH, 1992
96. WilierI Grmdiam and TTrauiI-Vincera.MadrraGovralSyurwU-AAaluir<iAdUrvtra.Mo Wiley. 1901
47. Him, K. I andDanielTrial.Mmv.mmdfrn—*»r*o«r»ra iS4*o«mM/Adri«HMwif,McCmir-JIrU.
im.
%. JaaaGoouk.AriyPn.inxM>Me CnArdMSruew AndnacUSA. 1942.
99 GiemnddC. D, DwrjWCll Minra-mditr. Sanden Colkje PoUiahiat. 1991.
I®. Arina >. tt^Dtug* niiAA4rimrc»MAdkfldwJAGrnirT^rawm.TAcGraw Udl. 190.
B. WEBSITE REFERENCES
I
1. MrpVAra*abpvina<e.’i.CTn IFnrTeliai.jmnirim DSP Pwcuo.Secwn lie, 136)
2. teipJhravncnmrfcaodrandaa (FarSedrie IA|.
3. MipyfrrivjuairdicMeiei/ukMiedaleVvmTJain and anodjuni (ForScetina 2J3|.
4 InpJfmwjmaoISrnieo13J,Ftr ARM froesm).
3. bepJAn<xjLeoaAcAkici/lnhccttA2«racL,appApa»6MaJrtrt IFor Scam 2-16(
6. hBpZMnrxaibcor| IRartemteunlajrf|aifonuancea ti mdaatfrii Syacsa,Seaana2.6and 133.3],
7. hspJ/aww.jarajriiLCDcn.'fTOiiea/ja»«c«rd (ForSca™ 3.73).
<. tajrZArriw.nebc9edaxr»WrERW7<<cifiu»lin6_«rncnM>"IFa SBia 2 tl.
9. hip-jTw».nnx«n |ForSB%i9.3|.
in. kBpc/Araw^nd-vdLori [frr SaetiM IP 1|
tl. bnjtfnwwAioiixmi'eirScSiw '[K
11 hnp2Arwwza.«7xd»ad(ForCanfr' '.v,Mn*EniteddedSpanDo<o*eliai4eo<lWnrtiiyo<Calirvu
Rhttride,SecLoa llj(
13. tapjfrMu<4vn>aaal4-rrsMaMtHrax^era*Mfrr«i'irAcad (ForSecta IlJI.
14. tapJAraw.taBXoml-jjJanitariniiMttai jFcTluwiM “MBLSeco* till
13. IS^®c/2mmAteuxftteeAn|/taoriAVnMlira (For MIDI imafice. Seem 12.11
16. tapvKra*j(iiner(.ot (furSeaioa IZiwdbtGiiddiaettar<br VicofAcCLoefeafc sMeetataad
SoftwaretfM1SRA(MastbdaoySrfwereRriiabiliiy AiwriMimH.
17. bap^ArwwaacarcKtaxcira'ieraayscTni/icarrLhon (Fee Secta ll4l
IS. bspcffirwwftoavdJataeccnd-alind^^^erVusaRCardScarityZ(For Seetioo |14|.
Embedded System^ i
S.J«. INSTITUTE «F
technology library
BANGALORE - 5iO *60.
ACCN. NO.
DATE
Introduction to
£
E
2.
Section 1. 1
Definitions of system and embedded system
Section 1. 2
The processing unit ofan embedded system consists of
/. A processor
2. Commonly used microprocessors
3. Application-specific instruction set processors (ASIPs).
microcontrollers, DSPs and others
4. Single purpose processors
Section 1. 3
The hardware unit ofan embedded system consists of
I. An embedded system power source with controlled power­
dissipation
/I clock oscillator circuit andclocking unit that letsa processor
execute instructions
Timers and a real time clock (RTC)for various timing needs
ofthe system
Reset circuit and watchdog timer
System and external memories
System input output (10) ports, serial, parallel and wireless
communication, serial UniversalAsynchronous Receiverand
Transmitter (UART) and other port protocols and buses
7. Devices such as Digital to Analog Converter (DAC) using
Pulse Width Modulation (PWM), Analog to Digital Converter
(ADC), Light Emitting Diode (LED) and Liquid Crystal
Display (LCD) units, keypad and keyboard, touch screen,
pulse dialer, modem and transceiver
8. Multiplexers, demultiplexers, decoderfor interfacing ofthe
devices and buses
L 9. Interrupt controller (handler)
E Section 1.4
1. Languages that are used to develop embedded software for a system
J? 2. Program models
J. Multitasking using an operating system (OS), system device drivers, device
management and real time operating system (RTOS)
4. Software toolsfor system design
K Section 1.5
Examples of applications ofembedded systems
I Section 1.6
Designing an embedded system on a VLSI chip
Q
I. Embedded SoC (System on Chip) and examples of its applications
2. Uses ofApplication Specific Instruction Set Processor (ASIP) and Intellectual
Property (IP) core
3. Field Programmable Gate Array (FPGA) core with single or multiple processor
units on an ASIC chip
Section 1.7
0 The complex system consists of
1. Embedded microprocessors or GPPs in complex systems
e 2. Embedding ASIPs, microcontrollers. DSPs, media and network processors
3. Embedding application-specific system processors (ASSPs)
7
4. Embedding multiple processors in systems
Section 1.8
E
The design process has
1. Challenges in embedded system design
C
2. Design metrics optimi~ation
3. Co-design of hardware and software components
T
Section 1.9
The system design formalism is defined
I Section 1.10
The design of embedded hardware and software in an automatic chocolate vending
V machine, smart card, digital-camera, mobile phone, mobile computer and robot are
given as examples
E Section 1.11
Classification of embedded systems into three types ' 'ir'
S Section 1.12
Skills needed to design an embedded system
Introduction to Embedded Systems
I 3 ।
I__ )
1.1 EMBEDDED SYSTEMS
1.1.1 System
A system is a way of working, organizing or doing one or many tasks according to a fixed plan, program, or
set of rules. A system is also an arrangement in which all its units assemble and work together according to the
plan or program.
Consider a watch. It is a time-display system. Its parts are its hardware, needles and battery with the
beautiful dial, chassis and strap. These parts organize to show the real time every second and continuously
update the time every second. The system-program updates the display using three needles after each second.
Itfollows a set ofrules. Some of these rules are as follows: (i) All needles move only clockwise, (ii) A thin and
long needle rotates every second such that it returns to same position after a minute, (iii) A long needle rotates
every minute such that it returns to same position after an hour, (iv) A short needle rotates every hour such that
it returns to same position after twelve hours. (v) All three needles return to the same inclination after twelve
hours each day.
Consider a washing machine. It is an automatic clothes-washing system. The important hardware parts
include its status display panel, the switches and dials for user-defined programming, a motor to rotate or
spin, its power supply and control unit, an inner water-level sensor, a solenoid valve for letting water in and
another valve for letting water drain out. These parts organize to wash clothes automatically according to a
program preset by a user. The system-program is activated to wash the dirty clothes placed in a tank, which
rotates or spins in preprogrammed steps and stages. It follows a set of rules. Some of these rules are as
follows: (i) Follow the steps strictly in the following sequence. Step 1: Wash by spinning the motor according
to a programmed period. Step II: Rinse in fresh water after draining out the dirty water, and rinse a second
time if the system is not programmed in water-saving mode. Step III: After draining out the water completely,
spin the motor fast for a programmed period for drying by centrifuging out water from the clothes. Step IV:
Show the wash-over status by a blinking display. Sound the alarm for a minute to signal that the wash cycle is
complete, (ii) At each step, display the process stage of the system, (iii) In case of an interruption, execute
only the remaining part of the program, starting from the position when the process was interrupted. There
can be no repetition from Step 1 unless the user resets the system by inserting another set of clothes and resets
the program.
1.1,2 Embedded System
Definition One of the definitions of embedded system is as follows:
"An embedded system is a system that has embedded software and computer-hardware, which makes it
a system dedicated for an application(s) or specific part of an application or product or a part of a larger
system-.’’
Embedded systems have been defined in books published recently in several ways. Given below is a series
of definitions from others in the field:
Wayne Wolf author of Computers as Components - Principles ofEmbedded Computing System Design:
“What is an embedded computing system! Loosely defined, it is any device that includes a programmable
computer but is not itself intended to be a general-purpose computer” and “a fax machine or a clock built from
a microprocessor is an embedded computing system”.
S’**"
'>Morton author of Embedded Microcontrollers'. “Embedded Systems are electronic systems that
BBbotairi a microprocessor or microcontroller, but we do not think of them as computers—the computer is
* hidden or embedded in the system.”
David E. Simon author of An Embedded Software Primer: “People use the term embedded system to mean
any computer system hidden in any of these products.”
Tim Wilmshurst author of An Introduction to the Design ofSmall Scale Embedded Systems with examples
from PfC, 80C51 and 68HC05/08 microcontrollers; (1) “An embedded system is a system whose principal
function is not computational, but which is controlled by a computer embedded within it. The computer is
likely to be a microprocessor or microcontroller. The word embedded implies that it lies inside the overall
system, hidden from view, forming an integral part of [the] greater whole”. (2) “An embedded system is a
microcontroller-based, software-driven, reliable, real time control system, autonomous, or human- or network-
interactive, operating on diverse physical variables and in diverse environments, and sold into a competitive
and cost-conscious market”.
A computer is a system that has the following or more components.
1. A microprocessor
2. A large memory of the following two kinds:
(a) Primary memory (semiconductor memories: Random Access Memory (RAM), Read Only Memory
(ROM) and fast accessible caches)
(b) Secondary memory [(magnetic memory located in hard disks, diskettes and cartridge tapes, optical
memory in CD-ROMs or memory sticks (in mobile computers)] using which different user
programs can be loaded into the primary memory and run
3. I/O units such as touch screen, modem, fax cum modem, etc.
4. Input units such as keyboard, mice, digitizer, scanner, etc.
5. Output units such as an LCD screen, video monitor, printer, etc.
6. Networking units such as an Ethernet card, front-end processor-based server, bus drivers, etc.
7. An operating system (OS) that has general purpose user and application software in the secondary
memory
An embedded system is a system that has three main components embedded into it:
1. It embeds hardware similar to a computer. Figure 1.1 shows the units in the hardware of an embedded
system. As its software usually embeds in the ROM or flash memory, it usually do not need a secondary
hard disk and CD memory as in a computer
2. It embeds main application software. The application software may concurrently perform a series of
tasks or processes or threads
3. It embeds a real-time operating system (RTOS) that supervises the application software running on
hardware and organizes access to a resource according to the priorities of tasks in the system. It
provides a mechanism to let the processor run a process as scheduled and context-switch between the
various processes. (The concept of process, thread and task explained later in Sections 7.1 to 7.3.) It
sets the rules during the execution of the application software. (A small-scale embedded system may
not embed the RTOS.)
Characteristics An embedded system is characterized by the following; (1) Real-time and multirate
operations define the ways in which the system works, reacts to events, interrupts and schedules the system’s
functioning in real time. It does so by following a plan to control latencies and to meet deadlines. (Latency
refers to the waiting period between running the codes of a task or interrupt service routine and the instance
at which the need for the task or interrupt from an event arises). The different operations may take place at
Introduction to Embedded Systems
Input Devices
Interfacing/
Driver Circuits
Program
Memory
and Data
Memory
Serial
Communi­
cation
Ports
Parallel
Ports
Outputs Interfacing/
Driver Circuits
Fig. 1.1 The components of embedded system hardware
distinct rates. For example, audio, video, data, network stream and events have different rates and time
constraints. (2) Complex algorithms. (3) Complex graphic user interfaces (GUIs) and other user interfaces.
(4) Dedicated functions.
Constraints An embedded system is designed keeping in view three constraints: (I) available system­
memory, (2) available processor speed, (3) the need to limit power dissipation when running the system
continuously in cycles of ‘wait for events', ‘run', ‘stop’, ‘wake-up' and ‘sleep’.
The system design or an embedded system has constraints with regard to performance, power, size and
design and manufacturing costs.
1.2 PROCESSOR EMBEDDED INTO A SYSTEM
A processor is an important unit in the embedded system hardware. It is the heart of the embedded system.
Knowledge ofbasic concept of microprocessors and microcontrollers is must for an embedded system designer.
A reader may refer to a standard text or the texts listed in the ‘References’ at the end of this book for an in-
depth understanding of microprocessors, microcontrollers and DSPs that are incorporated in embedded system
design. Chapter 2 will explain 8051 and a few processors.
1.2.1 Embedded Processors in a System
A processhas two essential units: Program Flow Control Unit (CU) and Execution Unit (EU). The CU
includes a fetch unit for fetching instructions from the memory. The EU has circuits that implement the
instructions pertaining to data transfer operations and data conversion from one form to another. The EU
includes the Arithmetic and Logical Unit (ALU) and also the circuits that execute instructions for a program
0 Embedded Systems
control task, say, halt, interrupt, or jump to another set of instructions. It can also execute instructions for a call
or branch to another program and for a call to a function.
A processor runs the cycles of fetch-and-cxccute. The instructions, defined in the processor instruction
set, are executed in the sequence that they are fetched from the memory. A processor is in the form of an
[C chip; alternatively, it could be in core form in an Application Specific Integrated Circuit (ASIC) or
System on Chip (SoC). Core means a part of the functional circuit on the Very Large Scale Integrated (VLSI)
chip.
An embedded system processor chip or core can be one of the following.
1. General Purpose Processor (GPP): A GPP is a general-purpose processor with instruction set designed
not specific to the applications.
(a) Microprocessor. [Section l.2.2|
(b) Embedded Processor [Section 1.7.7]
2. Application Specific Instruction-Set Processor (ASIP). An ASIP is a processor with an instruction set
designed for specific applications on a VLSI chip.
(a) Microcontroller [Section I.2.3J
(b) Embedded microcontroller [Section 1.7.7]
(c) Digital Signal Processor (DSP) and media processor [Section 1.7.3]
(d) Network processor, IO processor or domain-specific programmable processor
3. Single Purpose Processors as additional processors: Single purpose processor examples are as follows:
(1) Coprocessor (e.g., as used forgraphic processing, floating point processing, encrypting, deciphering,
discrete cosine transformation and inverse transformation or TCP/IP protocol stacking and network
connecting functions). (2) Accelerator(e.g., fava codes accelerator). (3) Controllers (e.g., for peripherals,
direct memory accesses and buses). [Section 1.7.7]
4. GPP or ASIP cores integrated into either an ASIC or a VLSI circuit or a Field Programmable Gate Array
(FPGA) core integrated with processor units in a VLSI (ASIC) chip. [Sections 1.6 and 1.7]
5. Application Specific System Processor (ASSP). [Section 1.7.9]
6. Multicore processors or multiprocessor [Section 1.7]
For a system designer, the following are important considerations when selecting a processor:
1. Instruction set
2. Maximum bits in an operand (8 or 16 or 32) in a single arithmetic or logical operation
3. Clock frequency in MHz and processing speed in Million Instructions Per Second (MIPS) or in an
alternate metric Dhrystone for measuring processing performance [Section 2.6]
4. Processor ability to solve complex algorithms while meeting deadlines for their processing
A microprocessor or GPP is used because: (i) processing based on the instructions available in a
predefined general purpose instruction set results in quick system development, (ii) Once the board and I/O
interfaces are designed for a GPP, these can be used for a new system by just changing the embedded software
in the ROM. (iii) Ready availability of a compiler facilitates embedded software development in high-level
languages, (iv) Ready availability of well-tested and debugged processor-specific APIs (Application
Program Interfaces) and codes previously designed for other applications results in new systems developed
quickly.
1.2.2 Microprocessor
The CPU is a unit that centrally fetches and processes a set ofgeneral-purpose instructions. The CPU instruction
set includes instructions for data transfer operations, ALU operations, stack operations, IO operations and
Introduction to Embedded Systems 7
program control, sequencing and supervising operations. The general-purpose instruction set is always specific
to a specific CPU. Any CPU must possess the following basic functional units:
I. A control unit that fetches and controls the sequential processing of a given command or instruction
and communicates with the rest of the system.
2. An ALU that undertakes arithmetic and logical operations on bytes or words. It may be capable of
processing 8, 16, 32 or 64-bit words at an instant.
A microprocessor is a single VLSI chip that has a CPU and may also have some other units (e.g., caches,
floating point processing arithmetic unit, pipelining and superscaling units) that are additionally present and
that result in faster processing of instructions.
The earlier generation microprocessor’s fetch-and-execute cycle was guided by a clock frequency of the
order of -4 MHz. Processors now operate at a clock frequency of 4 GHz and even have multiple cores. In
early 2002, it became possible to design Gbps (Giga bit per second) transceiver and encryption engines in a
few highly sophisticated embedded systems using processors that operate on GHz frequencies. A transceiver
is a transmitting cum receiving circuit that has appropriate processing and controls units, for example, for
controlling bus-collisions. An encryption engine is a system that encrypts the data to be transmitted on the
network.
Intel 80x86 (also referred as x86) processors are the 32-bit successors of 8086. [The r here refers to an
8086 extended for 32 bits.] Examples of 32-bit processors in 80x86 series are Intel 80386,80486 and Pentiums'
(a new generation of32- and 64-bit microprocessors is the classic Pentium series). IBM PCs use 80x86 series
and the embedded systems incorporated inside the PC for specific tasks (like graphic accelerator, disk
controllers, network interface card) use these microprocessors.
High performance processors have pipeline and superscalar architecture, fast ALUs and Floating Point
Processing Units (FLPUs). [A pipeline architecture means that the instructions have between 3 and 9 stages.
Different instructions are at different stages of the pipeline at any given instance. A superscalar architecture
refers to two or more sets of instructions executing in parallel pipelines.]
The important microprocessors used in the embedded systems are ARM, 68HCxxx, 80x86 and SPARC
family of microprocessors.
Section 1.7 will describe the embedding of a microprocessor GPP in complex systems.
A microprocessor is used as general-purpose processor when large embedded software has to be located
in the external memory chips.
1.2.3 Microcontroller
A microcontroller is an integrated chip that has processor, memory and several other hardware units in it;
these form the microcomputer part of the embedded system. Figure 1.2 shows the functional circuits' present
(in solid boundary boxes) in a microcontroller. It also shows the application-specific units (in dashed boundary
boxes) in a specific version of a given microcontroller family.
Just as a microprocessor is the most essential part of a computing system, a microcontroller is the most
essentia) component of a control or communication circuit. A microcontroller is a single-chip VLSI unit (also
called ‘microcomputer^), wb/^h, though having limited computational capabilities, possesses enhanced input­
output capabilities and a number of on-chip functional units. [Refer to Section 1.3 for various functional
hardware units.] Microcontrollers are particularly suited for use in embedded systems for real-time control
applications with on-chip program memory and devices.
Embedded Systems
Functional Circuits in a Chip or Core of Microcontroller (Microcomputer)
Fig-1-2 Various functional circuits (solid boundary boxes) in a microcontroller chip or
core in an embedded system. Also shown are the application-specific units
(dashed boundary boxes) in a specific version of a microcontroller
A few of the latest microcontrollers also have dual core and high computational and superscalar processing
capabilities. Important microcontroller chips for embedded systems are 8051,8051 MX, 68HC1 Ixx, HC12xx,
HCloxx, PIC 16F84 or I6C76, 16F876 and PIC18, microcontroller enhancements of ARM9/ARM7 from
ARM, Intel, Philips, Samsung and ST microelectronics.
Figure 1.3 shows commonly used microcontrollers in small-, medium- and large-scale embedded systems.
Choosing a microcontroller as a processing unit depends upon the application-specific features in it.
A microcontroller is used when a small or part of the embedded software has to be located in the internal
memory and when on-chip functional units such as the interrupt-handler, port, timer, ADC, PWM and
CAN controller are required.
1.2.4 Single Purpose Processors
Single purpose processors used in embedded systems include:
1. Coprocessor (for example, for floating point processing).
Fig. 1.3 Commonly used microcontrollers in small-, medium- and large-scale embedded
systems
2. Graphics processor: An image consists ofa numberof pixels. Forexample. Quartercommon intermediate
format—Quarter-CIF images have 144 x 176 (horizontal x-axis x vertical y-axis) pixels. Video frames
have 525 x 625 pixels. The video graphic adapter (VGA) format of e-mailing and web pages has
640 x 480 = 307,200 pixels. A separate graphics processor is required for functions such as, forexample,
gaming, display from graphics memory buffers and to move (translate on screen) and rotate an image or its
segments.
3. Pixel coprocessor: High-resolution pictures have formats: 2592 x 1944 pixels = 5,038,848 pixels;
2592 x 1728 = 3.2 M; 2048 x 1536 = 3 M and 1280 x 960 = I M. A pixel coprocessor is required in
digital cameras for displaying images directly or after operations such as rotate right, rotate-left, rotate-
up, rotate-down, shift to next, shift to previous.
4. Encryption engine: A suitable algorithm runs in this processor to encrypt data for secure transmission.
5. Decryption engine: A suitable algorithm runs in this processor to decrypt the encrypted data at receiver’s
end.
6. A discrete cosine transformation (DCT) and inverse transformation (DCIT) processor is required in
speech and video processing.
7. Protocol stack processor: A protocol stack, which has a number of header words, is prepared before an
application data is sent to a network. At the receiver’s end, the protocol stack is received and application
data is accepted accordingly. A TCP/IP protocol stack processor processes TCP/IP network data.
8. Network processor: A network processor’s functions are to establish a connection, finish, send and
receive acknowledgements, send and receive retransmission requests and check and correct received
data frame errors. The network processor’s functions include all protocol stack-processing functions.
9. Accelerator (for example, Java codes accelerator). The accelerator is a coprocessor that accelerates
computations by taking advance actions that are just-in-time.comp^ations of the next object in Java
programs.
10. CODEC (Coder and Decoder): A CODEC is a processor circuit that encodes input and decodes the
encoded information or bits or signals into a complete set of bits or original signal. Voice, speech,
^"ioj Embedded Systems
image, video signals and bits are encoded for storing or transmission and decoded from the stored or
received bits or signal for display or playing. The CODEC functions as a compression and
decompression unit for voice, speech, image or video signals.
11. JPEG CODEC: This is a processor for jpg compression and decompression. The Joint Photographic
Experts Group (JPEG) is an International Telecommunication Union for Telecom (ITU-T) and
International Standards Organisation (ISO) committee.
12. MPEG CODEC: The Motion Pictures Experts Group (MPEG) recommends CODEC standards for
video. MPEG3 CODEC is a processor for mp3 compression and decompression. MPEG 2 or 3 or 4
compression of audio/video data streams is done before storing or transmitting, and decompression is
done before retrieving or playing files. For MPEG compression and decompression algorithms, if
GPP-embedded software is run, then separate DSPs are required to achieve real-time processing.
13. Controller (e.g„ for peripheral, direct memory access or bus).
Single purpose processors are used forspecific applications or computations or as controllers for peripherals,
direct memory accesses and buses.
" 1.3 EMBEDDED HARDWARE UNITS AND DEVICES IN A SYSTEM
1.3.1 Power Source
Most systems have a power supply of their own. The Network Interface Card (NIC) and Graphic Accelerator are
examples of embedded systems that do not have their own power supply and connect to PC power­
supply lines. The supply has a specific operation range or a range of voltages. Various units in an
embedded system operate in one of the following four power ranges: 5.0 V + 0.25 V, 3.3 V + 0.3 V, 2.0 V + 0.2 V
and 1.5 V + 0.2 V. There is generally an inverse relationship between propagation delay in the gates and operational
voltage. Therefore, the 5 V system processor and units are used in most high performance systems.
Certain systems do not have a power source of their own: they connect to external power supply or are
powered by the use of charge pumps (made up of a circuit of diode and capacitor that accumulate charge from
the bus signals through which they connect or network to the host or from wireless radiation).
Low voltage operations
I. In portable or hand-held devices such as a cellular phone [when compared to 5 V, a CMOS 2 V circuit
power dissipation reduces by one-sixth, - (2 V/5 V)2. This also increases the time intervals needed for
recharging a battery by a factor of six.].
2. In a system with smaller overall geometry, low voltage system processors and IO circuits generate
lesser heat and thus can be packed into a smaller space.
A power supply source or a charge pump is essential in every system.
*1.3.2 Clock Oscillator Circuit and Clocking Units
The clock controls the time for executing an instruction. After the power supply, the clock is the basic unit of
a system. A processor needs a clock oscillator circuit. The clock controls the various clocking requirements of
Introduction to Embedded Systems I 11 j
the CPU, of the system timers and the CPU machine cycles. The machine cycles are for fetching codes and
data from memory and then decoding and executing them at the processor and for transferring the results to
memory.
For processing units, a highly stable oscillator is required and the processor clock-out signal provides the
clock for synchronizing all system units with the processor.
1.3.3 System Timers and Real-time Clocks
A timer circuit is suitably configured as the system-clock, which ticks and generates system interrupts
periodically; for example, 60 times in is. The interrupt service routines then perform the required
operation.
A timercircuit is suitably configured as the real-time clock (RTC) that generates system interrupts periodically
for the schedulers, real-time programs and for periodic saving of time and date in the system.
The RTC or system timer is also used to obtain software-controlled delays and time-outs. An RTC functions
as driver for software timers (SWTs). [Sections 3.6 and 3.8]
Microcontrollers also provide internal timer circuits for counting and timing devices.
To schedule the various tasks and for real-time programming, an RTC or system clock is needed. The
clock also drives the timers for various timing and counting needs in a system,
1.3.4 Reset Circuit, Power-up Reset and Watchdog-Timer Reset
The program counter (PC) holds the address from where the instruction is to be fetched for execution. In
80x86 processors, the instruction pointer (IP) holds that address. A code segment register (CS) holds the base
address of the code memory segment. The CS address equals the code starting address when the IP = 0 at the
start of a code segment. The IP increments when the program executes the codes.
Reset means that the processor begins the processing of instructions from a starting address. That address
is one that is set by default in the processor PC (or IP and CS in x86 processors) on a power-up. From that
address in memory, program-instructions are fetched following the reset of the processor. A program that is
reset and runs on a power-up can be one of the following: (i) A system program that executes from the
beginning, (ii) A system boot-up program, (iii) A system initialization program.
In certain processors, for example, 68HCII and HCI2, there are two start-up addresses. One is based on
the power-up reset vector and the other on the reset vector after the reset instruction or after a time-out (for
example, from a watchdog timer). The processor fetches the bytes for the PC from the first power-up reset
vector on power-up. The processor fetches the bytes for the PC from the second reset vector on the watchdog
timer timing out or on executing the reset instruction.
The reset circuit activates for a fixed period (a few clock cycles) and then deactivates. The processor
circuit keeps the reset pin active and then deactivates to let the program proceed from a default beginning
address. The reset pin or the internal reset signal, if connected to the other units (for example, the IO interface
or the serial interface) in the system, is activated again by the processor; it become,s_an ongoing pin to enforce
a reset state in other sister units of the system. On deactivation ofthe reset that succeeds the processoractivation,
a program executes from a start-up address.
Reset can be activated by an external reset circuit that activates on power-up, on switching-on reset
of the system or on detection of a low voltage (e.g. <4.5 V when what is required is 5 V on the system
12 Embedded Systems
supply rails). This circuit output connects to a pin called the reset pin of the processor. This circuit may be a
simple RC circuit, an external IC circuit or a custom-built IC. Examples of ICs are MAX 6314 and Motorola
MC 34064.
Alternatively, it can also be activated by any one of the following: (i) software instruction; (ii) time-out by
a programmed timer known as a watchdog timer (or on an internal signal called COP in 68HC11 and 68HCI2
families); (iii) a clock monitor detecting a slowdown below certain frequencies.
The watchdog timer is a timing device that resets the system after a predefined timeout. It is activated
within the first few clock cycles after power-up. It has a number of applications. In many embedded systems
reset by a watchdog timer is very essential because it helps in rescuing the system ifa fault develops and the
program gets stuck. On restart, the system can function normally. Most microcontrollers have on-chip watchdog
timers. The watchdog timer device is described in detail in Section 3.7.
Consider a system controlling temperature. Assume that when the program starts executing, the sensor
inputs work all right. However, before the desired temperature is achieved, the sensor circuit develops some
fault. The controller will continue delivering the current nonstop if the system is not reset. Consider another
example of a system for controlling a robot. Assume that the interfacing motor control circuit in the robot arm
develops a fault during the run. In such cases, the robot arm may continue to move unless there is a watchdo"
timer control. Otherwise, the robot will break its own arm!
When a program executes the program counter increments or changes. An important circuit that associates
a system is its reset circuit that can change the program counter to a power-up default value A progr im
that is reset and runs on a power-up can be one of the following: (i) A system program that executes from
the beginning, (u) A system boot-up program, (iii) A system initialization program.
The watchdog timer reset is a required feature in control applications.
1.3.5 Memory
In a system, there are various types of memory. Figure 1.4 shows a chart for various forms of memory that are
present in systems. These are as follows:
I. Internal RAM of 256 or 512 bytes in a microcontroller for registers, temporary data and stack.
2. Internal ROM/PROM/E2PROM for about 4 kB to 64 kB of program (in the case of microcontrollers).
3. External RAM for the temporary data and stack (in most systems) or internal caches (in the case of
certain microprocessors).
Various Forms of System Memory
1
Internal
RAM at
Micro­
controller
1
RAM at
System-
on-
Chip
or
External
RAM
1
Internal
Caches
at
Microprocessor
[Hold Copies
of System
Memory- ,th
pages]
1
External
RAM
Chip(s)
1
Flash/
EEPROM
1
ROM/
PROM
Memory
Addresses
at
External
and/or
Internal
the System
Ports
Fig. 1.4 The various forms of memories in the system
r~~t
Introduction to Embedded Systems 13 j
4. Internal Hash (in many systems the results ofprocessing can be saved in nonvolatile memory: lor example,
system status periodically and images, songs, or speeches alter suitable formal compression).
5. Memory stick (or card): video, images, songs, or speeches and large storage in digital camera and
mobile systems. Sony memory stick Micro (M2) is of size 15x12.5x1.2 mm and has a flash memory
of 2 GB. Il has a data transfer rale of 160 Mbps (mega bit per second) and PRO-HG 4X0 Mbps and
120 Mbps write | since Dec. 2006. |
6. External ROM or PROM for embedding software (in almost all systems other than microcontroller-
based systems).
7. RAM memory buffers al ports.
8. Caches (in pipelined and superscalar microprocessors).
Table 1.1 details the functions assigned in embedded systems to the memories. ROM or PROM or EPROM
embeds the software specific to the system.
Table 1.1 Functions assigned to the memories in a system
Memory Needed Functions
ROM or EPROM
or flash
Storing application programs from where the processor fetches the instruction codes.
Storing codes for system booting, initializing, initial input data and strings. Codes for
RTOS. Pointers (addresses) of various interrupt service routines (ISRs).
RAM (internal and external)
and RAM for buffer
Storing the variables during program run and storing the stack. Storing input or output
buffers, for example, for speech or image.
Memory slick A flash memory stick is inserted in mobile computing system or digital-camera. It
stores high definition video, images, songs, or speeches after a suitable formal
compression and stores large persistent data.
EEPROM or Flash Storing nonvolatile results of processing.
Cache Storing copies of instructions and data in advance from external primary memory and
storing the results temporarily during processing.
A system embeds (locates) the following either in the internal flash or ROM, PROM or in an external flash
or ROM or PROM of the microcontroller: boot-up program, initialization data, strings or pictogram for
screen-display or initial state of the system, programs for various tasks, ISRs and operating system kernel.
The system has RAMs for saving temporary data, stack and buffers that are needed during a program run.
The system uses flash for storing nonvolatile results.
1.3.6 Input, Output and IO Ports, IO Buses and IO Interfaces
The system gets inputs from physical devices through the input ports. Examples arc as follows:
I. A system gets inputs from the touch screen, keys in a keypad or keyboard, sensors and transducer
circuits.
2. A controller circuit in a system gets inputs from the sensor and transducer circuits.
3. A receiverofsignals ora networkcard gets the input from acommunication system. |A communicalion
system could be a fax or modem, or a broadcasting serviced
4. Ports receives inputs from a network or peripheral.
0 Embedded Systems
Consider the system in an Automatic Chocolate Vending Machine. It gets inputs from a port that collects
the coins that a child inserts.
Consider the system in a mobile phone. A user inputs the mobile number through the buttons, directly or
indirectly (through recall of the number from its memory). Keypad keys connect to the system through an
input port.
A processor identifies each input port by its memory buffer addresses, called port addresses. Just as a
memory location holding a byte or word is identified by an address, each input port is also identified by the
address. The system gets the inputs by the read operations at the port addresses.
The system has output ports through which it sends output bytes to the real world. Examples are as follows:
1. Output may be sent to an light emitting diode (LED), liquid crystal display (LCD) or touch screen
display panel. For example, a calculator or mobile phone system sends the output-numbers or an SMS
message to the LCD display.
2. A system may send the output to a printer.
3. Output may be sent to a communication system or network.
4. A control system sends the outputs to alarms, actuators, furnaces or boilers.
5. A robot is sent output for its various motors.
Each output port is identified by its memory-buffer addresses (called port addresses). The system sends the
output by a write operation to the port address.
There are also general-purpose ports for both the input and output (10) operations. For example, a mobile
phone system sends output as well as gets input through a wireless communication channel. A mobile computing
system touch screen system sends output as well as gets input when a user touches the menu displayed or key
on the screen.
Each 10 port is also identified by an address to which the read and write operations both take place.
Ports can have serial or parallel communication with the system address and data buses. In serial communication
a one-bit data line is used and bits are sent serially in successive time slots. Universal Asynchronous Receiver
and Transmitter (UART) is a popular communication protocol for serial communication. In parallel
communication, several data lines are used and bits are sent in parallel.
A system port may have to send output to multiple channels. A demultiplexer or multiplexer circuit is then
used.
A demultiplexer is a digital circuit that sends digital outputs at any instance to one of the provided channels.
The channel to which the output is sent is the one that is addressed by the channel address bits at the
demultiplexer input. A demultiplexer takes the input and transfers it to a select channel output among the
multiple output channels.
A multiplexer is a digital circuit that receives digital inputs at any instance from multiple channels, and
sends data output only from a specific channel at an instance. The channel address bits are at multiplexer
input. A multiplexer takes the input from one among the multiple input channels and transfers a selected
channel input to the output.
A system unit (for example, memory unit or 10 port or device) may have to be selected from among the
multiple units in the system and activated. A decoder circuit when used as an address decoder decodes the input
addresses and activates the selected output channel from among the many outputs. For example, there are 8 units
of which one has to be selected. An address-select input of 3 bits is input to the decoder. Based on the input
address, the output select line among the 8 activates. If the input address bit is 000, then the 0lh output is active
and the 0lh unit activates. If the input address bit is I l-i'f the.'J*ihe 7th output is active and the 7lh unit activates.
Bus A system might have to be connected to a number of other devices and systems. A bus consists of a
common set of lines to connect multiple devices, hardware units and systems for communication between any
Introduction to Embedded Systems 15
____ >
two of these at any given instance. A bus communication protocol specifies how signals communicate on the
bus. A bus may be a serial or parallel bus that transfers one or multiple data bits at an instance, respectively.
The protocol also specifies the following: (i) ways of arbitration when several devices need to communicate
through the bus; (ii) ways of polling bus requirement from each device at an instance; (iii) ways of daisy
chaining the devices so that bus is granted to a device according to the device-priority in the chain.
For networking the distributed units or systems, there are different types ofserial and parallel bus protocols:
PC. CAN, USB, (SA, EISA and PCI. For wireless networking of systems there are 802.11, IrDA, Bluetooth
and ZigBee protocols.
Chapter 3 will describe the ports, devices, buses and protocols in detail.
A system connects to external physical devices and systems through parallel or serial I/O ports.
Demultiplexers and multiplexers facilitate communication of signals from multiple channels through a
common path. A system often networks to the other devices and systems through an I/O bus: for example,
PC, CAN. USB, ISA, EISA and PCI bus.
1.3.7 DAC Using a PWM and an ADC
DAC is a circuit that converts digital 8 or 10 or 12 bits to the analog output. The analog output is with respect
to the reference voltage. When all input bits are equal to I. then the analog output is the difference between
the positive and negative reference pin voltages; when all input bits equal 0, then the analog output equals
-ve reference pin voltage (usually 0 V).
Suppose a system needs to give the analog output of a control circuit for automation. The analog output
may be to a power system for d.c. motor or furnace.
A pulse width modulator (PWM) with an integrator circuit is used for the DAC. A PWM unit in the
microcontroller operates as follows: Pulse width is made proportional to the analog-output needed. PWM
inputs are from 00000000 to 11111111 for an 8-bit DAC operation. The PWM unit outputs to an external
integrator, which provides the desired analog output. From this information, the formula to obtain the analog
output from the bits in a given PWM register with bits ranging from 00000000 to 11111111 is as follows:
Analog output V = K-pw. where K is constant and pw is the pulse width.
Suppose a circuit (external to the microcontroller) gives an output of 1.024 V when the pulse width is 50%
of the total pulse time period, and 2.047 V when the width is 100%. When the width is made 25%. by
reducing by half the value in the PWM output control-register, the integrator output will become 0.512 V. The
constant K depends on integrator amplifier gain.
Assume that the integrator operates with a dual (plus-minus) supply. The PWM unit in the microcontroller
operates by another method, which is as follows. Assume that when an integrator circuit gives an output of
1.023 V. the pulse width is 100% of the total pulse time period and of-1.024 V when the width is 0%. When
the width is made 25% by reducing by halfthe value in an output control register, the integrator output will be
0.512 V; at 50% the output will be 0.0 V. From this information, the formula to obtain the analog output from
the bits in a given PWM register ranging from 00000000 to 11111111 in both situations is as follows: Analog ;
output V = 0.01. K'. (pw - 50), where K' is constant and pw is pulse width time in percentage with respect to
pulse time period. K' depends on integrator amplifier gain. r
Analog to Digital Converter ADC is a circuit that converts the analog input to digital 4, 8, 10 or 12
bits. The analog input is applied between the positive and negative pins and is converted with respect to the 1
reference voltage. When input is equal to difference of reference positive and negative voltages, then all i!
output bits equal 1; when equals negative reference voltage (usually 0 V), then all output bits equal 0.
16 j Embedded Systems
The ADC in the system microcontroller can be used in many applications such as data acquisition systems
(DAS), digital cameras, analog control systems and voice digitizing systems. Suppose a system gels the
analog inputs from sensors of temperature, pressure, heart-beats and other sources in a DAS. Suppose a
system gels the analog inputs from a digital camera. It has CCD (Charge Couple Device) which has tiny pixels
that charge up on exposure to light. The charging of each pixel depends upon the light intensity at that point
in the image. The analog inputs to lhe system generate from each pixel. Each pixel's analog input has to be
converted into bits to enable processing in the next stage.
Suppose a system needs to read an analog input from a sensor or transducer circuit. If converted to bits by
lhe ADC unit in the system, then these bits, after processing, can also give an output. This provides a control
for automation by a combined use of ADC and DAC features.
The convened bits can be given to the port meant for digital display. The bits may be transferred to a
memory address, a serial port or a parallel port.
A processor may process the converted bits and generate a Pulse Code Modulated (PCM) output. PCM
signals are used to digitize voice into a digital format.
Important points about the ADC are as follows.
I. Either a single or dual analog reference voltage-source is required in the ADC. It sets either the analog
input’s upper limit or the lower and upper limits both. For a single reference source, the lower limit is
set to 0 V (ground potential). When the analog input equals the lower limit, the ADC generates all bits
as Os. and when it equals the upper limit it generates all bits as Is. | As an example, suppose in an ADC
the upper limit or reference voltage is set to 2.255 V. Let the lower limit reference voltage be 0.255 V.
The difference in the limits is 2 V. Therefore, the resolution will be 2/256 V. If the 8-bit ADC analog­
input is 0.255 V, the converted 8 bits will be 00000000. When the input is 0.255 V + 1.000 V = 1.255 V,
the bits will be 10000000. When the analog input is 0.255 V + 0.50 V, the converted bits will be
01000000. [From this information, finding a formula io obtain converted bits for a given analog
input = v volt is as follows: Binary number n bits after conversion in an n-bit ADC corresponds to
decimal number N. Then N = v. (V|C|+ - V rcr_)/2". Here. Vld+ is the reference voltage that gives ail the
bits that are equal to I and Vrc|- is the reference voltage that gives all lhe bits that are equal Io 0. [
2. An ADC may be of 8. 10, 12, or 16 bits depending upon the resolution needed for conversion.
3. The start of the conversion (STC) signal or input initiates the conversion to 8 bits. In a system, an
instruction or a timer signals the STC.
4. There is an end of conversion (EOC) signal. A flag in a register is set to indicate the end of conversion
and the ADC generates an interrupt: the ISR reads the ADC bits and saves them in the memory buffer.
5. There is a conversion time limit in which the conversion is definite.
6. A Sample and Hold (S/H) unit is used to sample the input for a fixed time and hold till conversion is
over.
An ADC unit can be repeatedly used after the intervals equal to the conversion time. Therefore, one can
digitizes the DAS sensor signals, CCD signals, voice, music or video signals, or heart beat sensor signals in
different systems. An ADC unit in an embedded system microcontroller may have multichannels. It can then
take the inputs in succession from the various pins interconnected to different analog sources.
For automatic control and signal processing applications, a system provides necessary interfacing circuit
and software for the Digital to Analog Conversion (DAC) unit and Analog to Digital Conversion (ADC)
unit. A DAC operation is done with the help of a combination of a PWM unit in the microcontrollet'and ah
external integrator chip. ADC operations are required for data acquisition, image processing, voice
processing, video processing, instrumentation and automatic control systems.
Introduction to Embedded Systems 17
L_J
1.3.8 LCD, LED and Touchscreen Displays
A system requires an interfacing circuit and software to display the status or message for a line, for multiline
displays, orfor flashing displays. An LCD screen may show up a multiline display of characters or also show
a small graph or icon (called a pictogram). A recent innovation in the mobile phone system turns the screen
blue to indicate an incoming call. Third generation system phones have both image and graphic displays. An
LCD needs little power. A supply or battery (a solar panel in the calculator) powers it. The LCD is a diode that
absorbs or emits light and 3 to 4 V and 50 or 60 Hz voltage-pulses with currents less than -50 pA are required.
The pulses are applied with the same polarity on the crystal front and back plane for no light, and with
opposite polarity for light. Here, polarity means logic ‘ I' or ‘O'. A display-controller is often used in case of
matrix displays.
To indicate the ON status of the system, there may be an LED that glows. A flashing LED may indicate that
a specific task is under completion or is running or in wait status. The LED is a diode that emits yellow, green,
red or infrared light in a remote controller on application of a forward voltage of between 1.6-2 V. It needs
cunent up to 12 mA above 5 mA (less in flashing display mode). It is much brighter than the LCD, making it
suitable for flashing displays and for displays limited to a few digits.
A touchscreen is an input as well as an output device, which can be used to enter a command, a chosen menu
or to give a reply. The infomiation is input by physically touching at a screen position using a finger or a stylus.
A stylus is thin pencil-shaped object. It is held between the fingers and used just as a pen. The screen displays the
choices or commands, menus, dialog boxes and icons. The display-screen display is similar to a computer video
display unit screen. Newer touch screen senses the fingers even from proximity, for example, in Apple iPhone.
Sections 3.3.4 and 3.3.5 describe the LCD and touchscreen devices and their connections to the system.
The system may need the necessary interfacing circuit and software for the output to the LCD display
controller and the LED interfacing ports or for the I/Os with the touchscreen.
1.3.9 Keypad/Keyboard
The keypad or keyhoard is an important device for gelling user inputs. The system provides the necessary
interfacing and key-debouncing circuit as well as the software for the system to receive input from a set of
keys, from a keyboard, keypad or virtual keypad. A touchscreen provides for a virtual keypad in a mobile
computing system. A virtual keypad is a keypad displayed on the touch screen where the user can enter the
keys using a stylus or finger.
A keypad has upto a maximum of 32 keys. A keyboard may have 104 keys or more. The keypad or
keyboard may interface serially or parallelly to the processor directly through ports or through a controller.
Mobile phones may have a T9 keypad. A T9 keypad has 16 keys and four up-down right-left menu keys.
Using 0 to 9 keys text messages, such as SMS messages, are generated.
For inputs, a keypad or board may interface to a system. The system provides necessary interfacing circuit
and software to receive inputs directly from the keys or through a controller.
1.3.10 Pulse Dialer, Modem and Transceiver
For user connectivity through the telephone line, wireless or a network, a system provides the necessary
interfacing and circuits. It also provides the software for pulse dialing through the telephone line, for modem
I 18 Embedded Systems
interconnection for fax. for Internet packets routing and for transmitting and connecting to a wireless cellular
system or personal area wireless network. A transceiver is a circuit that can transmit as veil as receive
byte streams.
In communication system, a pulse dialer, modem or transceiver is used. A system provides the necessary
interfacing circuit and software for dialing and for the modem and transceiver, directly or through a
controller.
1.3.11 Interrupt Handler
A timing device sends a time-out interrupt when a preset time elapses or sends a compare interrupt when the
present-time equals the preset time. Assume that data have to be transferred from a keyboard to a printer. A
port peripheral generates an interrupt on receiving the input data or when the transmitting buffer becomes
empty. Each action generates an interrupt. A system may possess a number ofdevices and the system processor
has to control and handle the requirements of each device by running an appropriate 1SR (interrupt service
routine) for each. An interrupts-handling mechanism must exist in each system to handle interrupts from
variousprocesses andfor handling multiple interrupts simultaneously pending for service. Chapter4 describes
in detail the interrupts, ISRs, and their handling mechanisms in a system. Important points regarding the
interrupts and their handling by the program are as follows.
1. There can be a number of interrupt sources and groups of interrupt sources in a processor.
[Section 4.31 An interrupt may be a hardware signal that indicates the occurrence of an event.
[For example, a real-time clock continuously updates a value at a specified memory address; the
transition of that value is an event that causes an interrupt.) An interrupt may also occur
through timers, through an interrupting instruction of the processor program or through an error
during processing. The error may arise due to an illegal op-code fetch, a division by zero result or an
overtlow or underflow during an ALU operation. An interrupt can also arise through a software tinier.
A software interrupt may arise in an exceptional condition that may have developed while running a
program.
2. The system may prioritize sources and service them accordingly. [Section 4.5.|
3. Certain sources are not maskable and cannot be disabled. Some are assigned the highest priority
during processing.
4. The processor's current program has to divert to a service routine to complete that task on the occurrence
of the interrupt. For example, ifa key is pressed, then an ISR reads the key and stores the key value in
the processor memory address. If a sequence of keys is pressed, for instance in a mobile phone, then
an ISR reads the keys and also calls a task to dial the mobile number.
5..There is a programmable unit on-chip for the interrupt handling mechanism in a microcontroller.
6. The operating system is expected to control the handling of interrupts and running of routines for the
interrupts in a particular application. The system always gives priority to the ISRs over the tasks of an
application.
A system provides an interrupt handling mechanism for executing the ISRs in case of the interrupts from
physical devices, systems, software instructions and software exceptions.
Introduction to Embedded Systems
19;
1.4 EMBEDDED SOFTWARE IN A SYSTEM
The software is like the brain of the embedded system.
1.4.1 Final Machine Implementable Software for a System
An embedded system processor executes software that is specific io a given application of that system. The
instruction codes rind data in the final phase are placed in the ROM or flash memory for all the tasks that are
executed when the system runs. The software is also called ROM image. Why? Just as an image is a unique
sequence and arrangement of pixels, embedded software is also a unique placement and arrangement of bytes
for instructions and data.
Each code or datum is available only in the bits and bytes’ format. The system requires bytes at each
ROM address, according to the tasks being executed. A machine implementable software file is therefore
like a table having in each rows the address and bytes. The bytes are saved at each address of the system
memory. The table has to be readied as a ROM image for the targeted hardware. Figure 1.5 shows the ROM
image in a system memory: The image consists of the boot up program, stacks address pointers, program
counter address pointers, application programs. ISRs, RTOS, input data and vector addresses.
Interrupt Service I
Routine Vector .
Addresses of
2 Bytes each I
Bootup ;
Program j-
Codes i
Machine Codes;
for Real Time i
Operating f
System (RTOS)j
2 Bytes for j
Address of I
Stack J"
on i
Reset '
System ROM
Memory
1 2 Bytes for
■ Address from
I Where System
I Starts
Execution on
Power Up
' (Not Needed in
i 80x86,8051,80196,
.. )
Bytes for
- . i Data as
Inputs for each
Interrupt
< Service Routine
r Machine Specific
I Codes for
•. each
! Program, ISR -
L and Task
Fig. 1.5 System ROM memory embedding the software, RTOS, data and vector addresses
0 Embedded Systems
Final stage software is also called the ROM image. The final machine implementable software for a
product embeds in the once programmable Hash or ROM (or PROM) as an image in a frame. Bytes at each
address must be defined io create the ROM image. By changing this image, the same hardware platform
will work differently and can be used for entirely different applications or for new upgrades of the same
system.
1.4.2 Coding of Software in Machine Codes
During coding in this format, the programmer defines the addresses and the corresponding bytes or bits at
each address. In configuring some specific physical device or subsystem, machine code-based coding is used.
For example, in a transceiver, placing certain machine code and bits can configure it to transmit at specific
megabytes per second or gigabytes per second, using specific bus and networking protocols. Another example
is using certain codes for configuring a control register with the processor. During a specific code-section
processing, the register can be configured to enable or disable use of its internal cache. However, coding in
machine implementable codes is done only in specific situations because it is time consuming and the
programmer must first have to understand the processor instructions set and then memorize the instructions
and their machine codes.
1.4.3 Software in Processor Specific Assembly Language
A program or a small specific part can be coded in assemblv /mtguoge using an assembler after understanding
the processor and its instruction set. Assembler is software used for developing codes in assembly.
Assembly language coding is extremely useful for configuring physical devices like ports, a line-display
interface. ADC and DAC and reading into or transmitting from a buffer. These codes are also called low-level
codes for the device driver functions. (Sections 1.4.7 and 4.2.4.] They are useful to run the processor or
device-specific features and provide an optimal coding solution.
Lack of knowledge of writing device driver codes or codes that utilize the processor-specific features-
invoking codes in an embedded system design team can cost a lot. A vendor may charge for the APIs and also
charge intellectual property fees for each system shipped out of the company.
To make all the codes in assembly language may. however, be very time consuming. Full coding in assembly
may be done only for a few simple, small-scale systems, such as toys, automatic chocolate vending machines,
robots or data acquisition systems.
Figure 1.6 shows the process of converting an assembly language program into machine implementable
software file and then finally obtaining a ROM image file.
1. An assembler translates the assembly software into the machine codes using a step called assembling.
2. In the next step, called linking, a tinker links these codes with the other codes required. Linking is
necessary because of the number of codes to be linked for the final binary file. For example, there are
the standard codes to program a delay task for which there is a reference in the assembly language
program. The codes for the delay must link with the assembled codes. The delay code is sequential
from a certain beginning address. The assembly software code is also sequential from a certain beginning
address. Both the codes have to be linked at the distinct addresses as well as at the available addresses
in the system. The linked file in binary for run on a computer is commonly known as an executable file
or simply an ‘.exe’ file. After linking, there has to be reallocation of the sequences of placing the codes
before actually placing the codes in memory.
Introduction to Embedded Systems
! 21
I
Fig. 1.6 The process of converting an assembly language program into the machine codes
and finally obtaining the ROM image
3. In the next step, the loader program performs the task of reallocating the codes after finding the
physical memory addresses available at a given instant. The loader is a part of the operating system
and places codes into the memory after reading the '.exe' file. This step is necessary because the
available memory addresses may not start from 0x0000. and binary codes have to be loaded al different
addresses during the run. The loader finds the appropriate start address. In a computer, after the loader
loads into a section of RAM. the program is ready to run.
4. The final step of the system design process is locaiing these codes as a ROM image. The codes are
permanently placed at the addresses actually available in the ROM. In embedded systems, there is no
separate program to keep track oflhe available addresses at different times during the run. as in a computer.
In embedded systems, therefore, the next step instead of loader after linking is the use of a locaior.
which locates the IO tasks and hardware device driver codes al fixed addresses. Port and device addresses
are llxed for a given system as per the interfacing circuit between the system buses and ports or devices.
The locator program reallocates the linked file and creates a file fora permanent location of the codes in
a standard format. The file formal may be in the Intel Hex file format or Motorola S-record format. The
designer has to define the available addresses to locale and create files to permanently locate the codes.
5. Lastly, either (i) a laboratory system, called device programmer, takes as input the ROM image file
and finally burns the image into the PROM or flash or (ii) at a foundry, a mask is created for the ROM
of the embedded system from the ROM image file. |The process of placing the codes in PROM or
flash is also called burning. | The mask created from the image gives the ROM in 1C chip form.
To configure some specific physical device or subsystem such as the transceiver, machine codes can be
used straightaway. For physical device driver codes or codes that utilize processor-specific features-invoking
codes, ‘processor-specific’ assembly tahgua^b is used. A file is then created in three steps using an Assembler,
Linker and Locator. The file has the ROM image in a standard format. A device programmer finally bums
the image in the PROM or EPROM. A mask created from the image gives the ROM in IC chip form.
Embedded Systems
1.4.4 Software in High Level Language
Since the coding in assembly language is very lime consuming in most cases, software is developed in a high-
level language, ‘C’ or ‘C++’ or visual C++ or Java' in most cases. ‘C’ is usually the preferred language. The
programmer needs to understand only the hardware organization when coding in high level language. As an
example, consider the following problem.
Example 1.1
Add 127, 29 and 40 and print the square root.
An exemplary C language program for all the processors is as follows, (i) # include <stdio.h>
(ii) # include <math.h> (iii) void main (void) { (iv) int i1. i2, i3. a; float result', (v) il = 127;
i2 - 29; i3 = 40; a = il + i2 + i3; result = sqrt (a): (vi) printf(result);)
The coding for square root will need many lines of | ........ —~
code and can be done only by an expert assembly Preprocessor Commands
language programmer. To write the program in a high .. . ~ ~
level language is very simple compared to writing it in ----------------------i--------------------
assembly language. ‘C‘ programs have a feature that Interrupt Service Routines
adds the assembly instructions when using certain Tasks 1 N
processor-specific features and coding for a specific ------------------------------------------
section, for example, a port device driver. Figure 1.7 Kernel and Scheduler
shows the different programming layers in a typical Standard Library
embedded ‘C’ software. These layers are as follows. Functions Including
(i) Processor Commands, (u) Main Function. Functions for j
(iii) Interrupt Service Routine, (iv) Multiple tasks, say. Sending Stack and I
1 to N. (v) Kernel and Scheduler, (vi) Standard library Receiving Stack _____ i j
functions, protocol handling and stack functions. - ----------------------------------------------:
Figure 1.8 shows the process of converting a Fig 17 The different program |ayers in the
C program into the ROM image file. A compiler embedded software in C
generates the object codes. It assembles the codes
according to the processor instruction set and other specifications. The C compiler for embedded
systems must, as a final step of compilation, use a code-optimizer that optimizes the codes before
linking. After compilation, the linker links the object codes with other needed codes. For example, the
linker includes the codes for the functions printf and sep t codes. Codes for device and driver (device
control codes) management also link at this stage: for example, printer device management and driver
codes. After linking, the other steps for creating a file for ROM image are the same as shown earlier in
Figure 1.6.
Preprocessor Commands
Main Function
Interrupt Service Routines
Kernel and Scheduler
Standard Library
Functions Including
Network Protocol
Functions for
Sending Stack and
Receiving Stack
Tasks 1....N
C, C++, Java, Visual C++ are the languages used for software development. A C program has various
layers: processor commands, main function, task and library functions, interrupt service routines and kernel
(scheduler). The compiler generates an object file. Using a linker and locator, the file for the ROM image
is created for the targeted hardware.
Introduction to Embedded Systems
Fig. 1.8 The process of converting a C program into the file for ROM image
1,4.5 Program Models for Software Designing
The program design task is simplified if a program is modeled.
The different models that are employed during the design processes ofthe embedded software are as follows:
I. Sequential Program Model
2. Object Oriented Program Model
3. Control and Data flow graph or Synchronous Data Flow (SDF) Graph or Multi Thread Graph (MTG) Model
4. Finite State Machine for data path
5. Multithreaded Model for concurrent processing of processes or threads or tasks
UML (Universal Modeling language) is a modeling language for object oriented programming.
These models are explained Chapter 6.
1.4 fi Software for Concurrent Processing and Scheduling of Multiple
Tasks and ISRs Using an RTOS
An embedded system program is most often designed using multiple processes or multitasks or a
multithreads. | Refer to Sections 7.1 to 7.3 for definitions and understanding of the processes, threads and tasks. |
The multiple tasks are processed most often by the OS not sequentially but concurrently. Concurrent processing
tasks can be interrupted for running the ISRs, and a higher priority task preempts the running of lower priority
tasks.
An OS provides for process, memory, devices, 10s and file system management. A file system specifies
the ways in which a file is created, called, named, used, copied, saved or deleted, opened and closed. File
system is the software for using the files on a disk, flash memory, memory card or memory stick.
OS software have scheduling functions for all the processes (tasks, ISRs and device drivers) in the
system. Since the running of the tasks and ISRs may have real time constraints and deadlines for finishing the
tasks, an RTOS is required in an embedded system. The RTOS provides the OS functions for coding the
system, provides interprocess communication functicjis an,'/hcontrols the passing of messages and signals to
a task.
RTOS functions are highly complex. There are a number of popular and readily available RTOSs.
Chapters 8 to 12 describes the RTOS functions and examples of applications in the embedded systems.
24 Embedded Systems
RTOS is used in most embedded systems and the system does concurrent processing of multiple tasks
when the tasks have real time constraints and deadlines,.
1.4.7 Software for Device Drivers and Device Management in an
Operating System
An embedded system is designed to perform multipie functions and has to control multiple physical and
virtual devices. In an embedded system, there may be number ofphysicaldevices. Exemplary physical devices
arc timers, keyboards, display, flash memory, parallel ports and network cards.
A program is also be developed using the concept of virtual devices. Examples of virtual devices are as
follows.
I. A file (of records opened, read, written and closed, and saved as a stream of bytes or words)
2. A pipe (for sending and receiving a stream of bytes from a source to destination)
3. A socket (for sending and receiving a stream of bytes between the client and server software and
between source and destination computing systems)
4. A RAM disk (for using the RAM in a way similar to files on (he disk)
A file is a data structure (or virtual device) which sends the records (characters or words) to a data sink (for
example, a program function) and which stores the data from the data source (for example, a program function).
A tile in a computer may also be stored in the hard disk and in Hash memory in embedded system.
The term virtual device follows from the analogy that just as a keyboard gives an input to the processor for
a read, a tile also gives an input to the processor. The processor gives an output to a printer for a write.
Similarly, the processor writes an output to the file.
A device for the purpose of control, handling, reading and writing actions can be taken as consisting of
three components, (i) A control register or word that stores the bits that, on setting or resetting by a device
driver, control device actions, (ii) A status register or word that provides the flags (bits) to show the device
status to the device driver, (iii) A device mechanism that controls the device actions. There may be input and
output data buffers in a device, which may be written or read by a'device driver. Device driver actions are to
gel input into or send output from the control registers, input data buffers, output data buffers and status
registers of the device.
A device driver is software for opening, connecting or binding, reading, writing and closing or controlling
actions of the device. It is software written in a high level language. Il controls functions for device open
(configure), connect, bind, listen, read or write or close. The device driver executes after lhe programming of
the control register (or word) ofa peripheral or virtual device. The programming is called device initialisation
or registration or attachment. The driver reads the status register, gets the inputs and writes the outputs. It
executes on an interrupt to or from the device.
A driver controls three functions, (i) Initializing, which is activated by placing appropriate bits at the
control register or word, (ii) Calling an ISR on interrupt or on setting a status flag in the status register and
running (driving) the ISR (Interrupt Handler Routine), (iii) Resetting the status fiag after an interrupt service.
A driver may be designed for asynchronous operations (multi pie use by tasks one after another) or synchronous
operations (concurrent use by the tasks).
Using the tuuctions of the OS, a device driver coding can be made such that the underlying hardware is
hidden as much as possible. An API then defines the hardware separately. This makes the driver usable when
the device hardware changes in a system.
. introduction to Embedded Systems
A device driver accesses a parallel or serial port, keyboard, mice, disk, network, display, file, pipe and
socket at specific addresses. An OS also provides device driver, codes lor system-port addresses and for
hardware access mechanisms.
A device manager software provide codes for detecting the presence of devices, for initializing these and
for testing the devices that are present. The manager includes software for allocating and registering port (in
fact, it may be a register or memory) addresses for the various devices al distinctly different addresses, including
codes for detecting any collision between these, if any. It ensures that any device accesses to one task only at
any given instant. It takes into account that virtual devices may also have addresses that archillocated by lhe
manager.
An OS also provides and executes modules for managing devices that associate with an embedded system.
The underlying principle is that at an instant, only one physical or virtual device should gel access to or from
one task only.
Sections 4.2.4 and 8.6.1 will describe device drivers and device management in detail. The OS also
provides and manages virtual devices such as pipes and sockets. Sections 7.14 and 7.15 describe these in
detail.
For designing embedded-software, two types of devices are considered: physical and virtual. Physical
devices include keypad, printer or display unit. A virtual device could be a file or pipe or socket or RAM
disk. Device drivers and device manager software are needed in the system. The RTOS includes device­
drivers and a device manager to control and facilitates the use of the number of physical and virtual
devices in the system.
1.4.8 Software Tools for Designing an Embedded System
Table 1.2 lists the applications of software tools for assembly language programming, high level language
programming. RTOS. debugging and system integration.
Tao’? 1.2 Software modules and tools for designing of an embedded system
j Sojimire Tools Application
Editor For writing C codes or assembly mnemonics using the keyboard of the PC for entering the
program. Allows the entry, addition, deletion, insert, appending previously written lines or
files, merging record and Illes at the specific positions. Creates a source file that stores lhe
edited file. It also has an appropriate name [provided by the programmer].
Interpreter For expression-by-expression (line-by-line) translation to machine-executable codes.
Compiler Uses the complete set of codes. It may also include codes, functions and expressions from
lhe library routines. It creates a file called object file.
Assembler For translating assembly mnemonics into binary opcodes (instructions), that is, into
an executable file, called binary file and for making a list file that can be printed. The list
file has address, source code (assembly language mnemonics) and hexadecimal object^
codes. The file has addresses that reallocate during the actual run of the assembly
language program.
(Contd)
I 26 Embedded Systems
Integrated development This is a development software and hardware environment that consists of simulators with
Software Tools
Cross assembler
Application
For converting object codes or executable codes for a processor to other codes for another
processor and vice versa. The cross-assembler assembles the assembly codes of the target
processor as the assembly codes of the processor of the PC used in system development.
Later, it provides the object codes for the target processor. These codes will be the ones
actually needed in the final developed system.
Simulator To simulate all functions ofan embedded system circuit including that or additional memory
and peripherals. It is independent ofa particular target system. It also simulates the processes
that will execute when the codes of a particular processor execute.
Source-code
engineering software
For source code comprehension, navigation and browsing, editing, debugging, configuring
(disabling and enabling the C++ features) and compiling.
RTOS Refer Chapters 8 to 10.
Stethoscope For dynamically tracking the changes in any program variable or parameter. It demonstrates
the sequence of multiple processes (tasks, threads, service routines) that execute and also
records the entire time history.
Trace scope To help in tracing the changes in modules and tasks with time on the X-axis. A list of
actions also produces the desired time scales and the time expected to be taken for different
tasks.
' The locator program output is in the Intel hex Hie or Motorola S-record format.
environment editors, compilers, assemblers, RTOS, debuggers, stethoscope, tracer, emulators, logic
analyzers, and application code burners in PROM or Hash.
Prototyper This simulates and does source code engineering including compiling, debugging and,
browsing and summarizing the complete status of the final target system during the
development phase.
Locator* This uses a cross-assembler output and a memory allocation map and provides the locator
program output as a hex-file. It is the final step of the software design process or an
embedded system. i
Software tools are used to develop software for designing an embedded system. Debugging tools, such as a
stethoscope, trace scope, and sophisticated tools such as an integrated development environment
and prototype development tools, are needed for the integrated development of system software and hardware.
1.4.9 Software Tools Required in Exemplary Cases
Table 1.3 gives the various tools needed to design exemplary systems.
RTOS is essential in
y- Jis
most embedded systems to process multiple tasks and ISRs. Embedded systems for
medium scale and sophisticated applications need a number of sophisticated software and debugging tools.
Introduction to Embedded Systems
Table 1.3 Software tools required in exemplary systems
Software
Tools
Automatic
Chocolate
Vending
Machine*
Data
Acquisition
System
Robot Mobile
Phone
Adaptive
Cruise Control
System with
String Stability#
Voice
Processor
Editor Yes Yes Yes Yes Yes NR
Interpreter Yes NR Yes NR NR NR
Compiler Yes Yes Yes Yes Yes Yes
Assembler Yes Yes Yes No No No
Cross Assembler NR Yes Yes No No No
Locator Yes Yes Yes Yes Yes Yes
Simulator NR Yes Yes Yes Yes Yes
Source code engineering
software
NR NR NR Yes Yes Yes
RTOS Yes MR Yes Yes Yes Yes
Stethoscope NR NR NR Yes Yes Yes
Trace scupe NR NR NR Yes Yes Yes
Integrated development
environment
NR Yes Yes Yes Yes Yes
Prototyper NR No No Yes Yes Yes
Note: NR means not required. MR means may be required in a specific complex system but not compulsorily needed.
1.5 EXAMPLES OF EMBEDDED SYSTEMS
Embedded systems have very diversified applications. A few select application areas of embedded systems
are telecommunications, smart cards, missiles and satellites, computer networking, digital consumer electronics,
and automotives. Figure 1.9 shows the applications of embedded systems in these areas.
A few examples of small scale embedded system applications are as follows:
1. Point of sales terminals: automatic chocolate vending machine
2. Stepper motor controllers for a robotics system
3. Washing or cooking systems
4. Multitasking toys
5. Microcontroller-based single or multidisplay digital panel meter for voltage, current, resistance and
frequency
6. Keyboard controller
7. SD, MMI and network access cards
8. CD drive or hard disk drive controller
0 Embedded Systems
9 The peripheral controllers ofa computer, for example, a CRT display controller, a keyboard controller,
a DRAM controller, a DMA controller, a printer controller, a laser printer controller, a LAN controller,
a disk drive controller
10. Fax or photocopy or printer or scanner machine
11. Remote (controller) of TV
12. Telephone with memory, display and other sophisticated features
Telecom
I
J,
tg
I
- Mobile Computing
- Mobile Access
Smart
Cards
I
- Banking
- Security
Missiles and
- Defence
- Aerospace
- Communication
Computer Networking
Systems and Peripherals
(a)
- Networking Systems
- Image processing
- Printers
- Networks Cards
- Monitors and Displays
Digital
Consumer
Electronics
-DVDs
- Set top boxes
- High definition TVs
- Digital cameras
Automotive
- Motor Control System
- Cruise Control
- Engine/Body Safety
- Robotics in Assembly Line
- Car Entertainment
- Car Multimedia
(0
Fig. 1.9 Applications of the embedded systems in various areas
13. Motor controls systems—for example, an accurate control of speed and position of the d.c. motor,
robot and CNC machine; automotive applications such as closed loop engine control, dynamic ride
control, and an antilock braking system monitor
14. Electronic data acquisition and supervisory control system
15. Electronic instruments, such as an industrial process controller
16. Electronic smart weight display system and an industrial moisture recorder cum controller
17. Digital storage system for a signal wave form or for electric or water meter reading system
18i Spectrum analyzer
19. Biomedical systems such as an ECG LCD display cum recorder, a blood-cell recorder cum analyzer,
and a patient monitor system
Some examples of medium scale embedded systems are as follows:
Introduction to Embedded Systems I 29 I
20. Computer networking systems, tor example, a router, a front-end processor in a server, a switch, a
bridge, a hub and a gateway
21. For Internet appliances, there are numerous application systems (i) An intelligent operation,
administration and maintenance router (10AMR) in a distributed network and (ii) Mail client card to
store e-mail and personal addresses and to smartly connect to a modem or server
22. Entertainment systems such as a video game and a music system
23. Banking systems, for example, bank ATM and credit card transactions
24. Signal tracking systems, for example, an automatic signal tracker and a target tracker
25. Communication systems such as a mobile communication SIM card, a numeric pager, acellular phone,
a cable TV terminal and a FAX transceiver with or without a graphic accelerator
26. Image filtering, image processing, pattern recognizer, speech processing and video processing
27. Video games
28. A system that connects a pocket PC to the automobile driver mobile phone and a wireless receiver.
The system then connects to a remote server for Internet or e-mail or to a remote computer at an ASP
(application service provider)
29. A personal information manager using frame buffers in handheld devices
30. Thin client [A thin client provides disk-less nodes with remote boot capability]. Application of thin-
client accesses to a data centre from a number of nodes; in an Internet laboratory accesses to the
Internet leased line through a remote server.
31. Embedded firewall / router using ARM7/ multiprocessor with two Ethernet interfaces and interfaces
support to PPP, TCP/IP and UDP protocols.
Examples of sophisticated embedded systems are as follows:
32. Mobile smart phones and computing systems
33. Mobile computer
34. Embedded systems for wireless LAN and for convergent technology devices
35. Embedded systems for video, interactive video, broadband IPv6 (Internet Protocol version 6) Internet
and other products, real time video and speech or multimedia processing systems
36. Embedded interface and networking systems using high speed (400 MHz plus), ultra high speed
(10 Gbps) and a large bandwidth: Routers, LANs, switches and gateways. SANs (Storage Area
Networks), WANs (Wide Area Networks)
37. Security products and high-speed Network security. Gigabit rate encryption rate products
1.6 EMBEDDED SYSTEM-ON-CHIP (SoC) AND USE OF VLSI CIRCUIT
DESIGN TECHNOLOGY
Lately, embedded systems are being designed on a single silicon chip, called System on chip (SoC), a design
innovation. SoC is a system on a VLSI chip that has all the necessary analog as well as digital circuits,
processors and software.
A SoC may be embedded with the following components:
1. Embedded processor GPP or ASIP core,
2. Single purpose processing cores or multiple processors,
3. A network bus protocol core,
4. An encryption function unit,
30 Embedded Systems
5. Discrete cosine transforms for signal processing applications,
6. Memories,
7, Multiple standard source solutions, called IP (Intellectual Property) cores,
8. Programmable logic device and FPGA (Field Programmable Gate Array) cores,
9. Other logic and analog units.
An exemplary application of such an embedded SoC is the mobile phone. Single purpose processors,
ASIPs and IPs on an SoC are configured to process encoding and deciphering, dialing, modulating,
demodulating, interfacing the key pad and multiple line LCD matrix displays or touch screen, storing data
input and recalling data from memory. Figure 1.10 shows an SoC that integrates internal ASICs, internal
processors (ASIPs), shared memories and peripheral interfaces.on a common bus. Besides a processor,
memories and digital circuits with embedded software for specific applications, the SoC may possess analog
circuits as well.
A SYSTEM ON CHIP
I'SINGLE PURPOSE!_
;PROCESSORS n
I ASIPs !
——
i ,ps :
BUSES
DIGITAL ;
CIRCUITS- '
TIMER. ;
MUXs.... |
I DATA ADDRESS ;
I GENERATOR I
I.... T---------
____ LC.-JL ;--------
i PROGRAM
■ ADDRESS 1
i GENERATOR I
PROGRAM,
DATA
AND PORT
MEMORY
PORT i
INTERFACES I
DMAC
MULTI­
PROCESSOR I
; DSP I
; gpp :
I INTERRUPT
; CONTROLLER
ANALOG
CIRCUITS,
A/D
FIASH
or E2PROM
L
H------------------>
- 15-20%
AREA
- 60%
AREA
-20-25%
AREA
7|A’
Fig. 1.10 A SoC embedded system and its common bus with internal ASIPs, internal processors,
IPs, shared memories and peripheral interfaces
Introduction to Embedded Systems
0
1.6.1 Application Specific IC (ASIC)
ASICs are designed using the VLSI design tools with the processor GPP or ASIP and analog circuits embedded
into the design. The designing is done using the Electronic Design Automation (EDA) tool. [For design of an
ASIC, a High-level Design Language (HDL) is used|.
1.6.2 IP Core
On a VLSI chip, there may be integration of high-level components. These components possess
gate-level sophistication in circuits above that of the counter, register, multiplier, floating point operation unit
and ALU. A standard source solution for synthesizing a higher-level component by configuring an FPGA
core or a core of VLSI circuit may be available as an Intellectual Property, called (IP). The designer or the
designing company holds the copyright for the synthesized design of a higher-level component for gate-level
implementation of an IP. One might have to pay royalty for every chip shipped. An embedded system may
incorporate several IPs.
• An IP may provide hardwired implementable design of a transform, an encryption algorithm or a
deciphering algorithm.
• An IP may provide a design for adaptivefiltering of a signal.
• An IP may provide a design for implementing Hyper Text Transfer Protocol (HTTP) or File Transfer
Protocol (FTP) or Bluetooth protocol to transmit a web page or a file on the Internet.
• An IP may be designed for a USB or PCI bus controller. [Sections 3.10.3 and 3.12.2]
1.6.3 FPGA Core with Single or Multiple Processors
Suppose an embedded system is designed with a view to enhancing functionalities in future. An FPGA
core is then used in the circuits. It consists of a large number of programmable gates on a VLSI chip. There is
a set ofgates in each FPGA cell, called macro cell. Each cell has several inputs and outputs. All cellsinterconnect
like an array (matrix). Each interconnection is programmable through the associated RAM in an FPGA
programming tool. An FPGA core can be used with a single or multiple processor.
Consider the algorithms for the following: Fourier transform (FT) and its inverse (1FT), DFT or Laplace
transform and its inverse, compression or decompression, encrypting or deciphering, specific pattern recognition
(for recognizing a signature or finger print or DNA sequence). We can configure an algorithm into the logic
gates of FPGA. It gives hardwired implementation for a processing unit. It is specific to the needs of the
embedded system. An algorithm of the embedded software can implement in one of the FPGA sections and
another algorithm in its other section.
FPGA cores with a single or multiple processor units on chip are used. One example of such core is
Xilinx Virtex-Il Pro FPGA XC2VP125. XC2VP125 from Xilinx has 125136 logic cells in the FPGA core
with four IBM PowerPCs. It has been used as a data security solution with encryption engine and data rate
of 1.5 Gbps. Other examples of embedded systems integrated with logic FPGA arrays are DSP-enabled,
real-time video processing systems and line echo eliminators for the Public Switched Telecommunication
Networks (PSTN) and packet switched networks. [A packet is a unit of a message or a flowing data
such that it can follow a programmable route among the number of optional open routes available at an
instance.]
Embedded Systems
1.7 COMPLEX SYSTEMS DESIGN AND PROCESSORS
1.7.1 Embedding a Microprocessor
A General Purpose Processor microprocessor can be embedded on a VSLI chip. Table 1.4 lists different
streams of microprocessors embedded in a complex system design.
Table 1.4 Important microprocessors used in embedded systems
Stream Microprocessor Family Source CISC or RISC or Bothfeatures
Stream I 68HCxxx Motorola CISC
Stream 2 80x86 Intel CISC
Stream 3 SPARC Sun RISC
Stream 4 ARM ARM RISC with CISC functionality
1.7.2 Embedding a Microcontroller
Microcontroller VLSI cores or chips for embedded systems are usually among the five streams of families
given in Table 1.5.
Table 1.5 Major microcontrollers®1 used in the embedded systems
Stream Microcontroller Family Source CISC or RISC or Both
Stream 1 68HCHxx. HC12xx. HC16xx Motorola CISC
Stream 2 8051. 8051 MX Intel. Philips CISC
Stream 3 PIC I6F84 or 16C76, 16F876 and PIC 18 Microchip CISC
Stream 4’ Microcontroller Enhancements of CORTEX-M3
ARM9/ARM7 from Philips, Samsung and
ST Microelectronics
ARM, Texas. Philips,
Samsung and ST
Microelectronics etc.
RISC Core with
CISC functionality
Other popular microcontrollers are as follows, (i) Hitachi H8x family and SuperH 7xxx. (ii) Mitsubishi 740,7700, M16C and
M32C families, (iii) National Semiconductor COP8 and CR16 /16C. (iv) Toshiba TLCS 900S (v) Texas Instruments MSP 430
for low voltage battery based system, (vi) Samsung SAM8. (vii) Ziglos Z80 and eZ80
1.7.3 Embedding a DSP
A digital signal processor (DSP) is a processor core or chip for the applications that process digital signals.
[For example, filtering, noise cancellation, echo elimination, compression and encryption applications.] Just
as a microprocessor is the most essential unit of a computing system, a DSP is essential unit of an embedded
Introduction to Embedded Systems
system in a large number of applications needing processing of signals. Exemplary applications are in image
processing, multimedia, audio, video, HDTV, DSP modem and telecommunication processing systems. DSPs
also find use in systems for recognizing image pattern or DNA sequence.
DSP as an ASIP is a single chip or core in a VLSI unit. It includes the computational capabilities of a
microprocessor and Multiply and Accumulate (MAC) units. A typical MAC has a 16 x 32 MAC unit.
DSP executes discrete-time, signal-processing instructions. It has Very Large Instruction Word (VLIW)
processing capabilities; it processes Single Instruction Multiple Dala(SIMD) instructions; it processes Discrete
Cosine Transformations (DCT) and inverse DCT (IDCT) functions. The latter are used in algorithms for
signal analyzing, coding, filtering, noise cancellation, echo elimination, compressing and decompressing, etc.
Major DSPs for embedded systems are from the three streams given in Table 1.6.
Table 1.6 Important digital signal processor® used in the embedded systems
Stream DSP Family Source
Stream 1 TMS320Cxx, OMAP1 Texas
Stream 2 Tiger SHARC Analog Device
Stream 3 5600xx Motorola
Stream 4 PNX 1300, 15OO2 Philips
1 For example, TMS320C62XX a fixed point 200 MHz DSP (Section 2.3.5).
2 Media processor, which besides multimedia DSP operations, also does network stream data packet processing.
1.7.4 Embedding an RISC
A RISC microprocessor provides the speedy processing of instructions, each in a single clock-cycle. This
facilitates pipelining and superscalar processing. Besides greatly enhanced capabilities mentioned above,
there is great enhancement of speed by which an instruction from a set is processed. Thumb * instruction set
is a new industry standard that also gives a reduced code density in ARM RISC processor. RISCs are used
when the system needs to perform intensive computation, for example, in a speech processing system.
1.7.5 Embedding an ASIP
ASIP is a processor with an instruction set designed for specific application areas on a VLSI chip or core.
ASIPexainples are microcontroller, DSP, IO. media, network or other domain-specific processor.
Using VLSI design tools, an ASIP with instructions sets required in the specific application areas can be
designed. The ASIP is programmed using the instructions of the following functions: DSP, control signals
process!ng, discrete cosine transformations, adaptive filtering and communication protocol-implementing functions.
1.7.6 Embedding a Multiprocessor or Dual Core Using GPPs
In an embedded system, several processors or dual core processors may be needed to execute an
algorithm fast within a strict deadline. For example, in real-time video processing, the number of MAC
operations needed per second may be more than is possible from one DSP unit. An embedded system
then incorporates two or more processors running in synchronization. An example of using multiple ASIPs
is high-definition television signals processing. [High definition means that the signals are processed
for a noise-free, echo-cancelled transmission, and for obtaining a flat high-resolution image (1920 x 1020
pixels) on the television screen.] A cell phone or digital camera is another application with multiple ASIPs.
Another Random Document on
Scribd Without Any Related Topics
March 28.
March 31.
April.
occupied in 1775 as the headquarters of Gen. Richard
Montgomery and staff of the American army in Montreal.
Melvin G. Dodge, librarian of Leland Stanford Junior
University, California, wishes copies of Volumes I and III
of the Journal of the Society for that institution. He
writes us to that effect.
Gaelic Notes in this week’s New York Irish World has the
following: “Now that the question of teaching Irish
history in the schools has again come to the front, we
would repeat the suggestion made by us a couple of
years ago to the American-Irish Historical Society, that in
no possible way could it so promote the objects for
which it is organized as by the preparation of a popular
text-book of the history of the race in America, suitable
for the use of schools. The Society has the material for
doing this; it could do it without loss to itself, and with
great profit to the race, which it would thus have put
under a debt of gratitude.”
Death of Gen. M. T. McMahon at his home in New York
City. He was a judge of the New York Court of General
Sessions at the time of his death. He had practised law
in New York for many years and was a fine speaker, but
he was known chiefly as a soldier. He was educated at
St. John’s College, Fordham, from which he graduated in
1855, and then went to Buffalo, where he studied law in
the office of Eli Cook, then mayor of the city, in company
with Grover Cleveland, since president of the United
States. Although able to pass the examination, he was
too young to be admitted to the bar, and he became a
correspondence clerk in the general post-office at
Washington. In President Buchanan’s administration he
was appointed special post-office agent to the Pacific
coast. He was admitted to the bar at Sacramento in
1861. At the first call for troops at the breaking out of
the Civil War he raised the first company of cavalry on
the Pacific. He was elected captain of the company, but
when it was decided that the company should not go to
the front he resigned and went to Washington. He was
made a captain in the regular army and an aide-de-camp
to Gen. George B. McClellan, whose bosom friend he
remained until “Little Mac’s” death. He served in every
engagement in which the Army of the Potomac took
part. When the Sixth Corps was disbanded he was
adjutant-general and chief of staff. He also served under
Generals Franklin, Sedgwick (who was killed at the
Wilderness), Baldy Smith and Wright. He received the
congressional medal of honor for bravery at the battle of
White Oak Swamp. Congress also presented him with a
jeweled sword for conspicuous bravery at Spottsylvania
and other battles. At the close of the war he was
assigned as adjutant-general under General Dix, to the
Department of the East. He resigned in 1866 and
became corporation attorney of New York City. President
Johnson made him minister to Paraguay. In 1879 he ran
for Congress against Robert B. Roosevelt and was
defeated. Two years later he was appointed receiver of
taxes by Andrew H. Green, then comptroller. He was
United States marshal for the Southern District of New
York under President Cleveland. After that he was an
assemblyman and a state senator. For years he had been
one of the managers of the National Home for Disabled
Volunteer Soldiers. In 1896 he was elected judge of the
Court of General Sessions. General McMahon was a
Fenian and was ready for service in Ireland. He was also
a member of the Clan-na-Gael in its earlier days. His
brother, John E. McMahon, who was attorney-general
and adjutant-general of New York state under Governor
Seymour, was colonel of the One Hundred and Sixty-
fourth New York Volunteers, which he raised in Buffalo at
the outbreak of the war. The regiment was later
April.
April.
April 7.
April 9.
April 18.
April 18.
consolidated with the Phœnix Zouaves, a Fenian
regiment, and McMahon became colonel. It was part of
the Corcoran Legion. Col. John E. McMahon was killed at
the siege of Suffolk, Va., in 1863. The other brother,
James P. McMahon, was a captain in the Sixty-ninth with
Thomas Francis Meagher, later became lieutenant-
colonel of the One Hundred and Fifty-fifth New York, and
was promoted to be colonel of the One Hundred and
Sixty-fourth New York, in place of his brother, Martin. He
remained in command of the latter regiment until he was
killed in a charge at the battle of Cold Harbor on June 3,
1864.
About this time is issued from the Blanchard Press,
Worcester, Mass., a volume entitled: “A Study in the
Etymology of the Indian Place Name Missisquoi.” The
author of the work is George McAleer, M. D., of
Worcester, a member of our Society.
The Munsey Magazine (New York) for this month has a
paper on the Irish in America by Herbert N. Casson.
Death today of Capt. Patrick S. Curry, Lynn, Mass., a
member of the Society. He passed away at Nashua, N.
H., where he had been superintending the construction
of a new post-office building.
Daniel Walsh, a member of the crew of the Monitor
when she fought the Merrimac, during the Civil War, died
in Lawrence, Mass. He was a native of Ireland.
Hon. James D. Phelan, ex-mayor of San Francisco, who
is a member of the Society, is appointed a member of
the Committee of Safety by Mayor Schmitz of that city,
which committee is rendered necessary by the great
earthquake and fire disaster.
E. Festus Kelly, of Northerwood House, Lyndhurst,
Hampshire, England, expresses his interest in a paper on
April 20.
April 20.
April 25.
April 25.
April 26.
“The New Hampshire Kellys,” which appeared in Volume
V of the Journal of the Society, and desires a copy of the
same.
Patrick J. Meehan, of Jersey City, N. J., editor of the
Irish-American of New York, the oldest Irish newspaper
in the United States with the exception of The Pilot, and
who may be styled the Nestor of the Irish-American and
Catholic journalistic fraternity, died on this date.
A despatch from Lowell, Mass., today states that the
O’Sullivan Rubber Co., of that city, has wired $500 to the
mayor of San Francisco to aid the earthquake sufferers.
The check was signed by Treasurer Humphrey O’Sullivan,
who is a member of our Society, as is James O’Sullivan,
president of the company.
At Phalerum, Greece, today, Martin J. Sheridan of the
Irish-American A. C., New York, won the contest at
discus throwing. Giorgantas, a Greek, was second.
President Roosevelt, in a proclamation today, urges the
American people to now send their contributions for the
alleviation of the distress in San Francisco, directly to ex-
Mayor James D. Phelan, chairman of the finance
committee in San Francisco, instead of to the American
Red Cross. The proclamation goes on to say: “The need
of employing the Red Cross, save as an auxiliary, has
passed, and I urge that hereafter all contributions from
any source be sent direct to James D. Phelan, chairman
finance committee, San Francisco. Mr. Devine of the Red
Cross will disburse any contributions sent to him through
ex-Mayor Phelan and will work in accord with him in all
ways.”
Reception this evening to Rear-Admiral John McGowan,
U. S. N., the new president-general of the Society. The
April 28.
April-May.
May 3.
May 5.
event took place at the residence of Hon. John D.
Crimmins, 40 East 68th Street, New York.
An editorial in the New Century, Washington, D. C., this
date, says: “As an individual contributor to the San
Francisco relief fund, one notices an Irish name leading
all the rest—far and above in amount, the generosity of
the Rockefellers, the Astors and the Vanderbilts. The
name is that of James D. Phelan, who subscribed
$1,000,000. And this, notwithstanding that he himself
lost $15,000,000 by the fire. These great catastrophes
always evoke large-hearted acts and assure us that
neither magnanimity, public spirit nor courage have yet
vanished from the face of the earth. Mr. Phelan’s conduct
proclaims him a man worthy of his wealth. We learn,
further, that he is a Catholic, a graduate of a Jesuit
college and that he was mayor of San Francisco from
1896 to 1902. As he is only forty-five years of age, we
shall hope to hear more of him hereafter.”
A committee organized by Archbishop Farley, of New
York, for the relief of the San Francisco sufferers, has
been very successful. Among the members of the Society
who have contributed to the fund, together with the
amount given by each, are the following: Archbishop
Farley, $1,000; Hon. John D. Crimmins, $1,000; Hon. W.
Bourke Cochran, $1,000; Eugene Kelly, $1,000; James S.
Coleman, $300; Francis J. Quinlan, M. D., $250; Hon.
Morgan J. O’Brien, $250; Edmond J. Curry, $100; J.
Henry Haggerty, $100; all of New York. Mr. Crimmins is
treasurer of the fund.
Warren Upham, secretary and librarian of the Minnesota
Historical Society, St. Paul, Minn., writes that the
organization is desirous of possessing a complete set of
the Journal of the American-Irish Historical Society.
The New York Irish-American for this week has the
following relative to our San Francisco member, ex-Mayor
James D. Phelan: “In San Francisco the man of the hour
in whose hands is the management of the great relief
fund, and under whose executive direction the important
movements that are to lift the stricken city up from the
depths and rebuild her shattered fortunes have already
been begun, is that well-known Irish-American, James D.
Phelan, former mayor of the city. Although his personal
and business losses must reach millions, it is reported
that he has devoted the sum of $1,000,000 out of his
private fortune to employ the afflicted laboring people of
his native city. Mr. Phelan, whose father was one of the
men who made San Francisco rich and famous, was born
in 1861, and was educated at St. Ignatius College, in
that city, where he graduated with honor, after a four
years’ course of study. He then entered as a student at
the law department of the University of California, of
which he is also a graduate. He was selected mayor of
the city, as a Democrat, in 1896, and served until 1902.
His régime was marked by zeal and ability in the public
service. The Democrats of the state Legislature
complimented him with their nomination for United
States senator a few years ago. He is one of the leading
capitalists of the United States, and has numerous
commercial and mining interests. He is president of the
Mutual Savings Bank and the finest business block in San
Francisco, situated on Market Street, bore his name. It
withstood the shock of earthquake, but the resulting fire
reduced it to a mass of smoking ruins. Mr. Phelan has
been for years a generous supporter of the Irish cause
and has stood by both Parnell and Redmond with his
influence and his money. His father aided in receiving
Terence Bellew McManus, John Mitchel and Thomas
Francis Meagher when those patriots escaped from the
May 12.
May 29.
May 30.
British penal settlements in Australia and sought liberty
and new careers in America. No city has been more
generous in aid of Ireland than San Francisco and its
people, of all races, are renowned for their hospitality
and liberality, and foremost among those who offered
that hospitality has always been James D. Phelan. In the
new city that is to rise triumphant from the ashes of the
present disaster his grateful fellow-citizens will no doubt
give him every honor in their bestowal.”
The funeral took place, at Boston today, of Patrick E.
Flood. He was a member of the crew of the U. S. S.
Kearsarge when she fought the Alabama.
John F. Sweeney, Buffalo, N. Y., becomes a life member
of the Society.
In the old Granary burying ground, Boston, this
morning, was unveiled a slab marking the burial place of
those who fell in the Boston massacre of March 5, 1770,
and of a boy who was killed on the previous February
22. The modest slab of slate is in keeping with the other
memorials in this historic burying ground. It was erected
by Boston Chapter, S. A. R., and is the first permanent
marker that has been placed over these graves. Dr.
Samuel Crowell, president of the Boston Chapter,
unveiled the slab with a brief introductory speech,
presenting Dr. Moses Greeley Parker of Lowell, president
of the Massachusetts Society, who congratulated Boston
Chapter on the work it has done and is doing. Edward W.
McGlenen, city registrar, of the committee, gave a brief
historical sketch of the events leading up to the
massacre, including the shooting of the boy, Christopher
Snider, by the British soldiers, who fired into his father’s
house. Little attention has been paid in history to the
killing of this boy, called on the slab “the innocent first
victim of the struggles between the colonists and the
June 4.
crown.” The slab stands close to the grave of Samuel
Adams and is in plain view from the street. The
inscription reads:
The Remains of
SAMUEL GRAY
SAMUEL MAVERICK
JAMES CALDWELL
CRISPUS ATTUCKS
and
PATRICK CARR
Victims of the Boston Massacre
March 5th, 1770
Were here interred by order of the
Town of Boston
Here also lies buried the body of
CHRISTOPHER SNIDER
aged 12 years
Killed February 22nd, 1770
The innocent first victim of the
struggle
between the Colonists and the
Crown
which resulted in
INDEPENDENCE
Placed by Boston Chapter, S. A. R.
1906.
Hon. Arthur P. Gorman passed away this morning in
Washington, D. C. He was the senior United States
senator from Maryland and was the Democratic leader in
the upper branch of Congress. Deceased was a native of
Woodstock, Md., and was born in 1829. His grandfather,
June 13.
June 15.
July 18.
July 23.
John Gorman, came to Pennsylvania from Ireland in
1784 and settled in Harrisburg.
John J. Coffey, of Neponset (Boston), Mass., passes
away. He was a member of the Society and took much
interest in the work of the latter.
Death of Hon. Michael J. Sullivan, a member of the
executive council of the governor of Massachusetts, at
his home in Boston. He worked his way through the
Boston University Law School and continued his legal
studies in the office of the Hon. Patrick A. Collins,
afterwards mayor, and was in July, 1898, admitted to the
bar. He was elected a member of the Massachusetts
House of Representatives in 1898, and re-elected in
1899. He served on the important committee of
metropolitan affairs and represented Mayor Collins on
that committee, looking after the interests of the City of
Boston. He was a candidate for the state Senate in 1900,
but was defeated. In the following year he was chosen a
member of that body, and re-elected in 1902. He was a
member of the governor’s council in 1904, 1905 and the
present year. Governors Bates, Douglas and Guild, in
whose councils Mr. Sullivan served, had high admiration
for him. In June, 1905, he was in charge, officially, of the
Massachusetts delegation to the Lewis and Clark
Exposition in Portland, Ore. The state was represented at
the funeral by Governor Guild, Lieutenant-Governor
Draper and members of the executive council, Senate
and House, and the city by Mayor Fitzgerald and
members of the board of aldermen and common council,
and men connected with the different departments.
Death of Patrick F. Sullivan, Boston, Mass., a member of
the Society.
Hon. John J. Flaherty of Gloucester, Mass., a justice of
the Superior Court of Massachusetts, died today.
Aug. 22.
Aug. 26.
Aug. 29.
Sept. 25.
Oct. 1.
Oct. 12.
Oct. 13.
Oct. 21.
Rev. Denis P. O’Flynn, New York City, a member of the
Society, passes away.
Death of Col. O’Brien Moore, Tucson, Ariz., a life
member of the Society.
Col. James Quinlan, a member of the Society, passes
away at his home in New York City.
Richard Deeves, New York, contributes $100 to the
Permanent Fund of the Society.
William Pigott, Seattle, Wash., becomes a life member of
the Society.
The Ninth Massachusetts Regiment, under command of
Col. William H. Donovan, starts for New York City to
participate in the dedication of the new armory of the
Sixty-ninth Regiment, N. G. S. N. Y. With the Ninth went
a number of invited guests, including Mayor Fitzgerald of
Boston, Mayor Duggan of Worcester, Mayor Casey of
Lowell, Mayor Kane of Lawrence and other
Massachusetts gentlemen.
Dedication in New York City today of the new armory of
the Sixty-ninth Regiment. Mr. Justice James Fitzgerald of
the New York Supreme Court, a member of our Society,
presided.
John C. Sullivan, registrar of probate for Plymouth
County, Mass., was accidentally killed tonight by being
struck by a trolley car. He was sixty-four years of age
and had been registrar of Plymouth County for many
years. Born in Ireland, he came to this country alone
when a small boy. He attended the local schools and
later Peirce Academy and Brown University, the latter in
Providence, R. I. He enlisted during the Civil War and
served out his full term, being a good soldier and
comrade. After the war he was admitted to the bar.
Oct. 29.
Oct. 29.
November.
Nov. 2.
Nov. 5.
Nov. 6.
Nov. 6.
Nov. 6.
Death today of Hon. Robert T. Davis, M. D., of Fall River,
Mass., a member of the Society.
Reuben G. Thwaites, secretary and superintendent of
the State Historical Society of Wisconsin, Madison, Wis.,
writes to us saying: “Thank you most cordially for your
kindly gift of books and pamphlets to our library. We
shall certainly appreciate them very much indeed. We
trust that you will continue to favor us with your several
publications, as we have a very large, growing, and
much used collection of material in the field in which
your Society works.”
The American-Irish Historical Society this month
receives an invitation from the American Historical
Association to send a representation to a conference of
historical societies to be held in Providence, R. I.,
December 26–29, 1906.
William Doogue, superintendent of public grounds,
Boston, Mass., passed away this evening. He was a
member of the Society.
It is stated that the Hon. Morgan J. O’Brien, presiding
justice of the appellate division of the New York Supreme
Court, today filed his resignation with the secretary of
state at Albany. Judge O’Brien will become a member of
a prominent New York law firm.
The Hon. James H. Higgins, mayor of Pawtucket, R. I.,
is today elected governor of Rhode Island. He is the first
Catholic to be elected to the office.
Joseph F. O’Connell, a member of the Society, is today
elected to Congress from the Tenth Massachusetts
district.
Patrick J. McCarthy, a member of the Society, is today
elected mayor of Providence, R. I.
Nov. 21.
Nov. 23.
Nov. 23.
Nov. 29.
December.
Dec. 2.
Dec. 11.
The secretary of the State Historical Society of Missouri
writes that he has forwarded us the first number of a
quarterly review just issued by his society and that they
shall be glad to place us on their regular mailing list, and
to receive from us copies of such publications as our
Society may issue.
The librarian of the public library, St. Louis, Mo., writes
for two volumes of the Journal of the Society to
complete the library’s set.
Anniversary of the birth of Edward Rutledge, a signer of
the Declaration of Independence. He was of Irish
parentage.
Anniversary of the birth of Charles Thomson, the
“perpetual secretary” of Congress; a native of Ireland.
Hon. George F. O’Neil, Binghamton, N. Y., becomes a life
member of the Society.
Died on this date, in 1783, Thomas Burke. He was a
native of Ireland, and was chosen governor of North
Carolina in 1781.
A meeting of the council of the Society is held this
evening in Providence, R. I.
NECROLOGY.
The following members of the Society died during the year 1906,
much and deservedly regretted:
Coffey, John J., born in County Kerry, Ireland, 1831; died at
Neponset (Boston), Mass., June 13, 1906. He enlisted for service
in the Civil War on December 13, 1861, in Company C, Twenty-
eighth Massachusetts Regiment (the famous Faugh-a-Ballaghs),
which formed part of Meagher’s Irish Brigade, and he later
fought with the Fourth Heavy Artillery of Massachusetts. Among
the famous battles in which he took part were Marye’s Heights,
Gettysburg and Fredericksburg. He was stricken with rheumatic
fever, which necessitated his taking furloughs. With the
exception of these two absences he served from the first year of
the war until its conclusion, and was in the army which
assembled in Washington for review preparatory to its
disbandment at the close of hostilities. He returned to Boston
after the war, and was active in military organizations. He joined
the Montgomery Light Guard Veteran Association and various
other Irish societies. He was a most patriotic man and an active
worker in the interests of his native land. He was identified with
the Irish National League, Irish National Federation and the
United Irish League. He also belonged to Division 43, A. O. H.,
the Knights of St. Brendan and John A. Andrew Post, No. 5, G. A.
R. He is survived by his wife and six children: James D. and
Timothy J. Coffey of Boston; Charles M. Coffey, who has been in
the West and Alaska for some years, part of the time serving in
the United States Cavalry; Mrs. George G. White of Dorchester,
Mass.; Mrs. William H. Murphy of Neponset; and Miss Anna S.
Coffey, a teacher in the Henry L. Pierce School, Dorchester, who
lived with her parents. When a collection of articles for an Irish-
American loan exhibition for the World’s fair at St. Louis, Mo.,
was being gotten up in 1904, John J. Coffey, the subject of this
obituary, contributed an Irish flag that had been carried during
the Civil War by the Twenty-eighth Massachusetts.
Accompanying the flag, he sent a letter, the following being an
extract therefrom: “This flag has a precious history. It was
presented to the Twenty-eighth Regiment, through the late
Patrick Donahoe, by the Irish women of Boston, on Sept. 24,
1861, at the same time Governor Andrew presented the
regiment with the flag of the State of Massachusetts. My
company (C) was selected as the right center or color company,
and my brother, Michael J., whose height exceeded mine by two
inches, was selected as color sergeant of this green flag, and
carried it until he fell mortally wounded at the second battle of
Bull Run, August 30, 1862; after that it went through Chantilly,
South Mountain and Antietam. On the memorable day of the
attack on Marye’s Heights, at Fredericksburg, it was the only
green flag unfurled—and by this I do not intend to cast any
reflections on the other four regiments of the Irish Brigade.
Some time before Chancellorsville, in May following, Colonel
Byrnes and the other officers of the regiment concluded that it
was too cumbersome, subscribed among themselves and
procured a flag of lighter fabric (worsted), and laid the old flag
(this one) aside, but in safe keeping, and you may rest assured
that it has been scrupulously cared for and treasured by the
custodian.”
Coleman, James S., builder of the new Croton Dam, New York, and
street cleaning commissioner from 1881 to 1891, died at his
home, 38 East 69th Street, New York City, December 17.
Deceased was one of the best-known contractors in this country.
At the time of his appointment as commissioner of street
cleaning by Mayor Grace of New York he was engaged in the
construction of the Texas and Pacific Railroad, which work was
turned over to other contractors, while deceased gave his whole
time to the study of his work for the city. He was the first
commissioner to realize the many commercial uses to which city
waste might be put, and he so arranged the disposal of garbage
as to clear for the city $90,000 yearly. Mayor Grace appointed
him to a six-year term, which continued through the term of
Mayor Edson, and subsequently he was re-appointed for another
six-year term by Mayor Hewitt. In 1892 he received the contract
for the building of the new Croton Dam, and shortly before his
death the entire work was completed. Deceased was born about
sixty-three years ago. He came of a family of contractors, his
father having engaged in that business until his death. He spent
his boyhood in Madison, N. J. Deceased was prominent in
charitable work of an unobtrusive sort and was a member of the
Metropolitan Museum of Art, the American Geographical Society
and the Manhattan, Catholic and Hardware clubs, Friendly Sons
of St. Patrick, and was a member of the board of managers of
the Catholic Orphan Asylum. Funeral services were held at St.
Patrick’s Cathedral.
Curry, Capt. Patrick S., born in Ireland; died in Nashua, N. H., April
7, 1906. He came to this country when a young man, eventually
settling in Lynn, Mass., where he was long engaged in the
granite business. During the Civil War he rose from the ranks to
command Companies C and G of the Third Massachusetts
Cavalry, under Banks and Sheridan. He was one of the
volunteers at the storming of Port Hudson, and for his bravery
there was given a medal by Congress. During the siege of Baton
Rouge he was made provost marshal at that place. He was
wounded several times. In 1883 he was elected representative to
the Massachusetts General Court from Lynn, and was the author
of the free text-book bill. He also presented the bill abolishing
contract labor in prisons. At the time of his death he was
superintending the construction of a new post-office building in
Nashua, N. H.
Davis, Hon. Robert T. (M. D.), born in County Down, Ireland, 1823;
died in Fall River, Mass., October 29, 1906. He was the son of
John and Sarah (Thompson) Davis. His father was a Presbyterian
and his mother a member of the Society of Friends. They came
to America in 1826 and settled in Amesbury, Mass. Doctor Davis
was educated in the Friends’ School at Providence, R. I., and at
Amesbury Academy, and began the study of medicine with Dr.
Thomas Wilbur, well remembered as a leading physician in Fall
River. He passed two years at Tremont Medical School in Boston
and was graduated from the medical department of Harvard in
1847. In 1850 he went to Fall River and began the practice of his
profession, winning a high rank as a skillful physician. When a
young man he was active in the anti-slavery movement and in
1851 made a speech in favor of instructing the local
representatives to vote for Charles Sumner for United States
senator. He was a member of the state constitutional convention
in 1853, and in 1858 and 1861 was a state senator. He was a
member of the national Republican convention which nominated
Abraham Lincoln in 1860, and also in 1876 when Rutherford B.
Hayes was nominated. At the request of Governor Andrew of
Massachusetts, he introduced the resolution for the appointment
of peace commissioners to attend a convention in Washington in
an endeavor to preserve peace between the North and the
South. During the early days of the Civil War he assisted in the
formation of the Seventh Massachusetts Regiment, intending to
accompany them to the front as surgeon, but gave way to a
relative of the colonel of the regiment, who was desirous of
securing the appointment. He was later appointed by Governor
Andrew medical examiner of recruits for his district, and later
examiner of applicants for exemption from military duty on
account of physical disability. He was one of the three local
surgeons who, in obedience to a call from Washington, after the
second battle of Bull Run, went to Alexandria and assisted in
treating the wounded. In 1863 Governor Andrew appointed him
a member of the State Board of Charities, and in 1869 he was
appointed a member of the State Board of Health by Governor
Claflin, and when the two boards were consolidated he was
appointed as a member of the new board by Governor Talbot. In
1873 he was elected mayor of Fall River without opposition, and
at the close of his term he donated his salary to the Children’s
Home. He was elected to Congress in 1882 and re-elected in
1884 and 1886 and was afterwards appointed by Gov. Oliver
Ames a member of the Metropolitan Sewerage Commission.
Doctor Davis in his long life had been prominent and successful
in so many different fields that his early life as a physician and
politician had been in a sense forgotten by the present
generation. During the Land League and other Irish movements,
Doctor Davis was always generous in support of Home Rule
principles, and he had frequently been heard making eloquent
and appealing pleas for the freedom of his native land. He was
identified with the business interests of Fall River as a large
owner of real estate and as one of the largest holders of mill
stock in the city. He held large blocks of stock in a number of the
mills, preferring to invest so as to be a dominant factor in the
corporation in which he was interested. Doctor Davis held many
offices in the corporations of the city. He was a director and also
president of the Algonquin Printing Company, the Stafford mills
and the Wampanoag mills. He was also a director in the Davis
mills, the Merchants’ mills and the Stevens Manufacturing
Company. He had been president of the Fall River board of trade,
the Union Hospital Corporation and the Home Market Club.
Doctor Davis married, in 1848, Sarah Congdon Wilbur, daughter
of Dr. Thomas Wilbur of Fall River, who died in 1856, and in 1862
he married Susan A. Haight, daughter of Moses Haight of
Westchester County, New York, who passed away a few years
ago. He is survived by one son, Robert C. Davis of the law firm
of Jackson, Slade & Borden.
Doogue, William, born in Queen’s County, Ireland, 1828; died in
Dorchester (Boston), Mass., November 2, 1906; superintendent
of public grounds, Boston, Mass. When a lad his family
emigrated, settling in Middletown, Conn. Here Mr. Doogue was
educated in the local schools, having in his native country
received primary instruction at a private school. At the age of
seventeen he was apprenticed to Affleck, Whitmore & Co., of
Hartford, Conn., who operated one of the most extensive nursery
and greenhouse plants in New England at the time. Here he
learned the science of floriculture, horticulture and landscape
gardening. He served five years with this firm, and during the
last three years of his apprenticeship studied botany under the
tuition of Professor Comstock of Trinity College, a well-known
writer on that subject. After the death of Mr. Affleck, Mr. Doogue
became a partner in the firm, the style of which was changed to
that of Whitmore & Co. In 1865 Mr. Doogue dissolved his
connection with the firm and came to Boston. He assumed the
entire management of the floricultural and horticultural business
of Charles Copeland in Boston and Melrose, Mass. Later he
established himself in business as a florist and was most
successful. In 1871 Mr. Doogue’s skill was fittingly recognized
when he was chosen to lay out the grounds of the Centennial
Exposition held in Fairmount Park, Philadelphia, and make a
tropical and sub-tropical display. He did splendid work and was
highly complimented, and as a reward was presented with two
gold and two silver medals and diplomas. Mr. Doogue
transformed the Boston Public Garden from a place of a few
monotonous floral displays during the summer season, to one of
a succession of brilliant, attractive and artistic flowering and rare
plants and exotics, which have been the delight of visitors. He
propagated many of the most rare and costly plants and bulbs,
and accumulated stocks of these and other products of the
greenhouse and nursery, which are today worth in money much
more than the whole plant has cost the city. It may be said he
created the department of public grounds, for when he took
charge of it it was only a name, a title; now it is a substantial
and creditable asset of the city, as well as a fitting monument to
the genius and memory of William Doogue. Mr. Doogue was
liberal, but unostentatious in his contributions to works of
religion and charity. His aid to the Home for Destitute Catholic
Children and St. Mary’s Infant Asylum, Dorchester, is
remembered with gratitude by the Sisters having charge of those
institutions. He leaves five children, Mrs. Timothy McCarthy, Mrs.
D. H. Sullivan, Mrs. John O’Connell and Luke J. and William J.
Doogue. The funeral of Mr. Doogue took place from the Church
of the Immaculate Conception, Boston, in which for years he had
been a faithful worshipper. In the congregation were Mayor
Fitzgerald, ex-Mayor T. N. Hart, city officials and representatives
of organizations of which Mr. Doogue was a member. Interment
was at Middletown, Conn.
Kenedy, P. J., born in New York City, 1843; died there January 4,
1906. He was educated at the Christian Brothers’ School in Canal
Street, New York. Being brought up in the book business, he
assisted his father in his stores in Centre Street and in Mott
Street and Barclay Street. On his father’s death, Mr. Kenedy
succeeded to the business, and so well did it develop that he
soon took over the entire building at No. 5 Barclay Street, which
in time became the most extensive Catholic publishing house in
the country. A few years ago he took two of his sons into the
firm with him, and they will continue the business, the
foundation of which their grandfather, John Kenedy, laid eighty
years ago. In the fall of 1895, Pope Leo XIII made Mr. Kenedy a
publisher to the Holy See, in New York. He leaves a widow, three
sons and four daughters.
Moore, Col. O’Brien, born in Ireland; died in Tucson, Ariz., August
26, 1906. A life member of the Society. At the time of his death
he was general manager of the Citizen Printing and Publishing
Co., Tucson, controlling a valuable newspaper plant and issuing a
daily and weekly. He was a man of great brilliancy. On the
breaking out of the war with Spain, he entered the service as
lieutenant-colonel of the Second West Virginia Infantry. After a
year’s service, and peace being declared with Spain, he became
lieutenant-colonel of United States Volunteers for the operations
in the Philippines, where he served for eighteen months, until his
regiment was mustered out. He then settled in Tucson. He was a
newspaper man of much ability and experience. Some of his
early newspaper career was spent in Houston, Tex., on the Post,
of which journal he became managing editor. He was later
managing editor of the St. Louis Republic, and was also
Washington correspondent for that paper at Washington, D. C.
McCall, John A., born in Albany, N. Y., 1849; died at Lakewood, N.
J., February 18, 1906. He became clerk in the Albany State
Currency Assorting House; was later in the service of the
Connecticut Mutual Life Insurance Co. until 1869; served in the
New York state insurance department as clerk, 1869–’76; was
deputy superintendent, 1876–’83; superintendent of insurance of
New York, 1883–’86; comptroller Equitable Life Assurance
Society, 1887–’92, and was later president of the New York Life
Insurance Co. He was a life member of the Society.
O’Flynn, Rev. Denis P., born in County Cork, Ireland, 1847; died in
New York City, August 22, 1906. He was educated at St.
Colman’s College, Fermoy, and then spent two years in study in
Paris. He entered Louvain University, Belgium, and obtained the
degree of doctor of theology. Returning to Paris, he was
ordained to the priesthood and then came to America. He was
eventually made vicar apostolic to the Bahamas. He became
rector of St. Mary’s Church, Saugerties, N. Y., and for fifteen
years, up to the time of his death, was rector of St. Joseph’s
Church, New York City.
Quinlan, Col. James, born in Ireland, 1843; died in New York City,
August 29, 1906. He came to this country when he was but
seventeen years of age. He became a first lieutenant in the
Sixty-ninth New York Regiment, and, in 1861, went with it to
Washington, D. C. He was mustered out the following year, and
joined the Eighty-eighth New York Volunteers, which was part of
Meagher’s famous Irish Brigade. For conspicuous bravery at
Savage Station, in June, 1862, Colonel Quinlan subsequently
received the United States medal of honor.
Sullivan, Patrick F., born in County Kerry, Ireland; died in Boston,
Mass., July 18, 1906. He came to Boston, Mass., when he was
about sixteen years of age. Obtaining employment in a clothing
store at the North End, his first venture in life’s struggle was
made. Later he took a position with the house of Leonard & Co.,
brokers in furniture and auctioneers. Succeeding years found him
connected with Libbie, dealer in rare books, and he continued in
this business under the title of Sullivan Bros. & Libbie until the
early eighties, when he took premises in School Street, Boston,
under the name Sullivan & McDonald, and later Sullivan
Brothers, auctioneers. As one of the principal assessors of the
City of Boston, he established a reputation for skill and judgment
which caused his opinion to be sought and followed without
hesitation. His generous, charitable nature and his devotion to
religion, as well as his broad, practical mind, is shown in the
following disposition of his fortune in public benefactions. By the
first clause of the will, the testator gives to his sister, Catherine
A. Sullivan, $30,000 as a preferred legacy, and then the following
bequests are made: To the Catholic University of America,
$5,000; to the trustees of Boston College in Boston, $5,000; to
St. John’s Ecclesiastical Seminary, Brighton, $5,000; to the
trustees of the Boston Public Library, to be expended for the
purchase of Catholic standard books, approved by the
archbishop of Boston, or by the president of Boston College,
$5,000; to the Little Sisters of the Poor on Dudley Street,
Roxbury, Mass., $5,000; to the House of the Good Shepherd,
Boston, $5,000; Carney Hospital, in memory of Thomas F.
Sullivan, deceased brother of the testator, $5,000; to St. Mary’s
Infant Asylum and lying-in hospital, Dorchester, $5,000; to the
Free Home for Consumptives, Quincy Street, Dorchester, $5,000;
Society for Propagation of the Faith, $3,500; to particular council
of St. Vincent de Paul Society, to be distributed among the
various conferences of the archdiocese of Boston, $2,500; to
Home for Destitute Catholic Children, Boston, $2,500; Holy
Ghost Hospital for Incurables, Cambridge, $2,500; to the
reverend superior of the Paulist Fathers of the City of New York,
for missions to non-Catholics, $1,500; to superior of Rocky
Mountain Mission of Society of Jesus, to aid in carrying on
religious missions among the Indians, $1,500; to Cardinal
Gibbons, to aid in carrying on religious missions among colored
people of this country, $1,500; to the Conference of St. Vincent
de Paul connected with Church of All Saints, Center Street,
Boston, $500; to the pastor of All Saints’ Church of Center
Street, to aid in paying off the debt on said church, $1,500; to
Conference of St. Vincent de Paul connected with Cathedral of
Holy Cross in Boston, $500; to the St. Vincent Orphan Asylum,
Camden Street, Boston, $2,000; to the Working Boys’ Home,
Boston, $2,000; to House of Angel Guardian on Vernon Street,
Boston, $2,000; to Trinity College, Washington, D. C., $1,500; to
Church of the Immaculate Conception, on Harrison Avenue,
$500; to Church of Our Lady of Perpetual Help, Boston, $500; to
Cathedral of Holy Cross, Boston, $500; to Church of St. Mary of
the Sacred Heart on Endicott Street, Boston, $500. Five
thousand dollars is distributed among certain nieces of the
deceased, and the rest and residue of the property is given to
the sister of the testator, Catherine A. Sullivan.
Travers, Ambrose F., born in New York City, September 8, 1851; died
in New York, January 29, 1906. He was of the firm Travers
Brothers Company, cordage manufacturers, and was a brother of
the late Francis C. Travers of New York. The latter was also a
member of the Society and very active in advancing its interests.
Vincent P. Travers, another brother, is likewise a member of the
organization.
MEMBERSHIP ROLL OF THE AMERICAN-IRISH
HISTORICAL SOCIETY.
[For officers of the Society see pages 5 and 6.]
Adams, Hon. Samuel, president and treasurer of the O’Neill-
Adams Co., 20th to 22d Street, Sixth Avenue, New York City;
director, Garfield National Bank; member of the New York
Chamber of Commerce; trustee, Excelsior Savings Bank; an ex-
state senator of Colorado.
Adams, T. Albeus, president, Manhattan Refrigerating Co., 525
West Street, New York City; president, Adams & Co., New York;
president, Union Terminal Cold Storage Co., Jersey City, N. J.
Ahern, John, 5 Highland Street, Concord, N. H.
Aspell, John (M. D.), 139 West 77th Street, New York City;
member of the Academy of Medicine; of the County Medical
Association, and of the Celtic Medical Society; recently president
of the latter; visiting surgeon to St. Vincent’s Hospital.
Bannin, Michael E., of Converse, Stanton & Co., dry goods
commission merchants, 83 and 85 Worth Street, New York City;
member of the Merchants Association, New York; director, the
Emigrant Industrial Savings Bank; vice-president, the Catholic
Summer School (Cliff Haven); member of the Merchants and
Catholic clubs, New York, of the Montauk Club, Brooklyn, and of
the Brooklyn Arts and Science Institute; director, the Columbian
National Life Insurance Co.; director, American Investment
Securities Co.; director, Citizen Trust Co., Brooklyn.
Bannon, Henry G., 107 East 55th Street, New York City;
president of the Irish National Club; secretary, Celtic-American
Publishing Co.
Barrett, Michael F., of Barrett Bros., wholesale and retail dealers
in teas, coffees, etc., 308 Spring Street and 574 Hudson Street,
New York City.
Barry, Hon. Patrick T., 87–97 South Jefferson Street, Chicago,
Ill. (Life member of the Society); advertising manager, Chicago
Newspaper Union; director, First National Bank of Englewood,
Ill.; director, The Chicago Citizen Company; has been a member
of the state Legislature of Illinois; prominently identified with
educational interests.
Barry, Rev. Michael, Oswego, N. Y.
Baxter, Rev. James J. (D. D.), 9 Whitmore Street, Boston, Mass.
Blake, Michael, of John Leonard & Co., iron and steel, 149
Broadway, New York City.
Bodfish, Rev. Joshua P. L., Canton, Mass.; formerly chancellor
of the Roman Catholic archdiocese of Boston; a director of the
Bunker Hill Monument Association.
Bourlet, John W., of the Rumford Printing Co., Concord, N. H.
Boyle, Hon. Patrick J., Newport, R. I.; has been mayor of that
city many terms.
Brady, Rev. Cyrus Townsend (LL. D.), rector, Trinity P. E.
Church, Toledo, Ohio; member of the Society of Colonial Wars, of
the Sons of the Revolution, of the Military Order of Foreign Wars,
and of other patriotic organizations; chaplain of the First
Pennsylvania Volunteer Infantry, war with Spain; formerly
Protestant Episcopal archdeacon of Pennsylvania; author of For
Love of Country, For the Freedom of the Sea, Stephen Decatur,
Commodore Paul Jones, Border Fights and Fighters, The True
Andrew Jackson, and other works.
Brady, Owen J., with The H. B. Claflin Co., 224 Church Street,
New York City.
Brandon, Edward J., city clerk, Cambridge, Mass.
Brann, Rev. Henry A. (D. D.), 141 East 43d Street, New York
City (Life member of the Society).
Brennan, Hon. James F., lawyer, Peterborough, N. H.; a trustee
of the New Hampshire State Library.
Brennan, James F., contractor, 2 Garden Street, New Haven,
Conn.
Brennan, P. J., 788 West End Avenue, New York City.
Brett, Frank P., town clerk and attorney, Waterbury, Conn.
Brierly, Frank, 268 West 131st Street, New York City.
Broderick, William J., 52 Morton Street, New York City.
Brosnahan, Rev. Timothy, rector of St. Mary’s Church,
Waltham, Mass.
Buckley, Andrew, Parsons, Labette County, Kansas.
Burke, Robert E., recently city solicitor, Newburyport, Mass.
Burr, William P., office of the Corporation Council, New York
City.
Butler, M. J., real estate and insurance, Morris Avenue, corner of
144th Street, New York City.
Butler, T. Vincent, with R. G. Dun & Co., New York City.
Buttimer, Thomas H., lawyer, Hingham and Boston, Mass.
Byrne, Dr. C. E., of the C. E. Byrne Piano Co., East 41st Street,
New York City.
Byrne, Joseph M., insurance, 800 Broad Street, Newark, N. J.
Byrne, Rt. Rev. Mgr. William (D. D., V. G.), rector of St. Cecilia’s
Church, St. Cecilia Street, Boston, Mass.
Byrnes, Patrick J., builder and general contractor, 105 East 31st
Street, New York City.
Cahill, John H., lawyer, 15 Dey Street, New York City;
prominently identified with telephone interests; vice-president,
secretary, attorney and director of the New York Telephone Co.,
and the Empire City Subway Co. He is also a director of the
American District Telephone Co.; the Chesapeake and Potomac
Telephone Co.; the Holmes Protective Co.; the New England
Telephone and Telegraph Co.; the Delaware Telegraph and
Telephone Co.; Northwestern Telephone and Telegraph Co., and
the Southwestern Telephone and Telegraph Co.
Calnin, James, 101–107 Lakeview Avenue, Lowell, Mass.
Cannon, Thomas H., of the law firm Cannon & Poage, Stock
Exchange Building, Chicago, Ill.
Carbray, Hon. Felix, Benburb Place, Quebec, Canada; member
of the Royal Irish Academy; Fellow of the Royal Society of
Antiquaries, Ireland; member of the Quebec Harbor Commission
and of the Quebec Board of Trade; consul for Portugal at
Quebec, and dean of the Consular Corps; trustee of St. Patrick’s
Church, and of St. Bridget’s Asylum; has represented his district
in the parliament of the Province of Quebec. He was one of the
pioneers in the lumber trade between the St. Lawrence and
South America; has engaged in the general commission and
shipping business; and has been a member of the successive
firms: Carbray & Routh; Carbray, Routh & Co.; and Carbray, Son
& Co.
Carmody, T. F., lawyer, Waterbury, Conn.
Carney, Michael, of M. Carney & Co., Lawrence, Mass.
Carroll, Edward, Leavenworth National Bank, Leavenworth,
Kansas.
Carroll, Edward R., 333 East 51st Street, New York City; clerk’s
office, Court of General Sessions of the Peace, City and County
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookgate.com

More Related Content

PDF
Embedded Systems Architecture Programming and Design 2nd Edition Raj Kamal
PDF
Embedded Systems Architecture Programming And Design 2nd Edition Raj Kamal
PDF
Embedded Systems Second Edition D Sundaram R M Kothari Dwarkadas Pralhaddas N
PDF
Digital Logic and Computer Designee..pdf
PDF
computer-organization-and-architecture-9780070083332-0070083339_compress.pdf
PDF
files_1575611773_2100523175.pdf
PDF
Computer Organisation and Architecture Unit I .pdf
PDF
Internet of things
Embedded Systems Architecture Programming and Design 2nd Edition Raj Kamal
Embedded Systems Architecture Programming And Design 2nd Edition Raj Kamal
Embedded Systems Second Edition D Sundaram R M Kothari Dwarkadas Pralhaddas N
Digital Logic and Computer Designee..pdf
computer-organization-and-architecture-9780070083332-0070083339_compress.pdf
files_1575611773_2100523175.pdf
Computer Organisation and Architecture Unit I .pdf
Internet of things

Similar to Embedded Systems Architecture Programming and Design 2nd Edition Raj Kamal (20)

PDF
Compiling Algorithms for Heterogeneous Systems Steven Bell
PDF
Digital signal processors architecture programming and applications 2nd Editi...
RTF
Bt 72 computer networks
PDF
Advanced Design Approaches to Emerging Software Systems Principles Methodolog...
PDF
IRJET - Automation in Python using Speech Recognition
PDF
International Conference On Iot Intelligent Computing And Security Select Pro...
PDF
PDF
Digital signal processors architecture programming and applications 2nd Editi...
PDF
Evolutionary Multiobjective System Designtheory And Applications 1st Edition ...
DOCX
AF-2599-P.docx
PDF
Embedded Systems Design Programming And Applications 1st Edition Ak Ganguly
PDF
B.tech.cse r15 regulations_3rd-4th_year-course_structure_and_syllabus
PDF
Operating System Design: The Xinu Approach, Second Edition u2013 Ebook PDF Ve...
PDF
Compiling Algorithms for Heterogeneous Systems Steven Bell
PDF
Training Report on CCNA
PDF
Digital System Design Use Of Microcontroller 1st Edition Shenouda Dawoud
PDF
ICT 1 - syllabus.pdf
PDF
Automated System Using Speech Recognition
PDF
REPORT_INTERNSHIP
PPTX
Computer application in business
Compiling Algorithms for Heterogeneous Systems Steven Bell
Digital signal processors architecture programming and applications 2nd Editi...
Bt 72 computer networks
Advanced Design Approaches to Emerging Software Systems Principles Methodolog...
IRJET - Automation in Python using Speech Recognition
International Conference On Iot Intelligent Computing And Security Select Pro...
Digital signal processors architecture programming and applications 2nd Editi...
Evolutionary Multiobjective System Designtheory And Applications 1st Edition ...
AF-2599-P.docx
Embedded Systems Design Programming And Applications 1st Edition Ak Ganguly
B.tech.cse r15 regulations_3rd-4th_year-course_structure_and_syllabus
Operating System Design: The Xinu Approach, Second Edition u2013 Ebook PDF Ve...
Compiling Algorithms for Heterogeneous Systems Steven Bell
Training Report on CCNA
Digital System Design Use Of Microcontroller 1st Edition Shenouda Dawoud
ICT 1 - syllabus.pdf
Automated System Using Speech Recognition
REPORT_INTERNSHIP
Computer application in business
Ad

Recently uploaded (20)

PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
master seminar digital applications in india
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Institutional Correction lecture only . . .
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Pharma ospi slides which help in ospi learning
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Basic Mud Logging Guide for educational purpose
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
RMMM.pdf make it easy to upload and study
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Renaissance Architecture: A Journey from Faith to Humanism
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
master seminar digital applications in india
O7-L3 Supply Chain Operations - ICLT Program
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Cell Types and Its function , kingdom of life
Abdominal Access Techniques with Prof. Dr. R K Mishra
human mycosis Human fungal infections are called human mycosis..pptx
Institutional Correction lecture only . . .
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Pharma ospi slides which help in ospi learning
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Basic Mud Logging Guide for educational purpose
Supply Chain Operations Speaking Notes -ICLT Program
RMMM.pdf make it easy to upload and study
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPH.pptx obstetrics and gynecology in nursing
Anesthesia in Laparoscopic Surgery in India
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Ad

Embedded Systems Architecture Programming and Design 2nd Edition Raj Kamal

  • 1. Instant Ebook Access, One Click Away – Begin at ebookgate.com Embedded Systems Architecture Programming and Design 2nd Edition Raj Kamal https://ebookgate.com/product/embedded-systems-architecture- programming-and-design-2nd-edition-raj-kamal/ OR CLICK BUTTON DOWLOAD EBOOK Get Instant Ebook Downloads – Browse at https://ebookgate.com Click here to visit ebookgate.com and download ebook now
  • 2. Instant digital products (PDF, ePub, MOBI) available Download now and explore formats that suit you... Embedded Systems Design 2nd Edition Steve Heath https://ebookgate.com/product/embedded-systems-design-2nd-edition- steve-heath/ ebookgate.com Programming embedded systems with C and GNU development tools 2nd Edition Michael Barr https://ebookgate.com/product/programming-embedded-systems-with-c-and- gnu-development-tools-2nd-edition-michael-barr/ ebookgate.com Making Embedded Systems Design Patterns for Great Software 2nd Edition Elecia White https://ebookgate.com/product/making-embedded-systems-design-patterns- for-great-software-2nd-edition-elecia-white/ ebookgate.com Fast and Effective Embedded Systems Design 1st Edition Rob Toulson https://ebookgate.com/product/fast-and-effective-embedded-systems- design-1st-edition-rob-toulson/ ebookgate.com
  • 3. Software Development for Embedded Multi core Systems A Practical Guide Using Embedded Intel Architecture 1st Edition Max Domeika https://ebookgate.com/product/software-development-for-embedded-multi- core-systems-a-practical-guide-using-embedded-intel-architecture-1st- edition-max-domeika/ ebookgate.com Design Patterns for Embedded Systems in C An Embedded Software Engineering Toolkit 1st Edition Bruce Powel Douglass https://ebookgate.com/product/design-patterns-for-embedded-systems-in- c-an-embedded-software-engineering-toolkit-1st-edition-bruce-powel- douglass/ ebookgate.com TCP IP Lean Web Servers for Embedded Systems 2nd Edition Jeremy Bentham https://ebookgate.com/product/tcp-ip-lean-web-servers-for-embedded- systems-2nd-edition-jeremy-bentham/ ebookgate.com Real Time UML Workshop for Embedded Systems 2nd Edition Bruce Powel Douglass https://ebookgate.com/product/real-time-uml-workshop-for-embedded- systems-2nd-edition-bruce-powel-douglass/ ebookgate.com Embedded System Design Third Edition Santanu Chattopadhyay https://ebookgate.com/product/embedded-system-design-third-edition- santanu-chattopadhyay/ ebookgate.com
  • 5. ,:. .·, , Embedded . Sy stems Architecture. Programming and Design Second Edition Raj Kamal 004.16 KAM Ill11111IIIIII 12994
  • 6. Acknowledgements am immensely grateful to my teachers al the Indian Institute of Technology. Delhi (1966-72), and the University of Jppsala, Sweden (1978—79, 1984), for teaching me the importance of self-learning and the essence of keeping up with merging technology. I would like to thank Prof. MS Sodha. FNA, for hi.s support and blessings throughout my academic fe. I acknowledge my Indore colleagues—Dr PC Sharma, Dr PK Chande, Dr Sanjeev Tokekar, Mrs VrindaTokekar, Dr AK .amani. Dr Maya Ingle, Dr Sanjay Tanwani, Ms Preeti Saxena. Ms Shraddha Masih, Ms Apama Dev, and Ms Vasanti G arulkarand other university academicians. Dr PS Grover (Delhi). Dr HarvinderSingh Saini (Hyderabad), Dr S Radhakrishnan Srivilliputtur), Dr TV Gopal (Anna University) and Dr KM Mehata (Anna University)—for lheir constant encouragement nd appreciation of my efforts. I am thankful to the editorial team at McGraw-Hill Education India for their reviews and .iggestions. I acknowledge my late colleague Dr MK Sahu. Head. Computer Centre of the University, who will miss seeing iis new edition as he passed away during the last phase of the preparation of this book. I would also like to thank all (hose reviewers who look out lime to go through rhe script and give me their feedback. heir names are listed below. Ramanaryan Reddy >ept. ofComputer Science and Engineering, idira Gandhi Institute of Technology, New Delhi lilima Fulmare Hindustan College ofScience and Technology. Agra JikhiJ Kothari )ept. of Electronics and Communication Engineering, >haram Sinh Desai Institute of Technology. Gujarat upriya Kelkar 'umniins Institute of Engineering and Technology, 'nne University himli Adhikari >ept. ofElectronics and Communication and Engineering, 'alcutta Institute ofEngineering and Management. Kolkata Hpankar Ghosh )ept. of Electronics and Communication Engineering ■engal Institute of Technology. Kolkata lebashish De >ept. of Electronics and Communication Engineering. leghnad Saha Institute of Technology, Kolkata I P Kabisatpathy Dept, of Electronics and Instrumentation Engineering. College of Engineering and Technology. Bhubaneswar KK Mohapatra Dept, ofElectronics. National Institute of Technology, Rourkela JK Mendiratta Dept, ofElectronics and Communication and Engineering. II. K College of Engineering. Bangalore Lyla B Das Dept, of Electronics Engineering, National Institute of Technology, Calicut Santa Kumari Dept, of Electronics and Communication Engineering. Andhra University. Vishakhapafnafn V Murlidharan Dept, of Computer Science and Engineering. MS Ramaiah Institute of Technology. Bangalore Josephine P Kumar Dept, of Computer Science and Engineering. MV.I College of Engineering. Bangalore Stanley Johnson Invensys India Pvt. Ltd., Chennai Finally, I acknowledge my wife, Sushil Mittal, and my family members—Shalin Mittal. Needhi Mittal. Dr Ami Londaskar, Dr Shilpi Kondaskar, and Ms Arushi Kondaskar—for lheir immense love, understanding, and support during le writing of this revised edition.
  • 7. Contents Preface to the Second Edition Preface to the First Edition 1. Introduction to Embedded Systems 1.1 Embedded Systems 3 1.2 Processor Embedded into a System 5 1.3 Embedded Hardware Units and Devices in a System 10 1.4 Embedded Software in a System 19 1.5 Examples of Embedded Systems 27 1.6 Embedded System-on-chip (Soc) and Use of VLSI Circuit Design Technology 29 1.7 Complex Systems Design and Processors 32 1.8 Design Process in Embedded System 37 1.9 Formalization of System Design 42 1. 10 Design Process and Design Examples 43 1.11 Classification of Embedded Systems 52 1.12 Skills Required for an Embedded System Designer 53 2. 8051 and Advanced Processor Architectures, Memory Organization and Real-world Interfacing 2.1 8051 Architecture 62 2.2 Real World Interfacing 72 2.3 Introduction to Advanced Architectures 84 2.4 Processor and Memory Organization 96 2.5 Instruction-Level Parallelism !04 2.6 Performance Metrics 106 2.7 Memory-Types, Memory-Maps and Addresses 106 2.8 Processor Selection 113 2.9 Memory Selection 118 3, Devices and Communication Buses for Devices Network 3.1 IO Types and Examples 130 3.2 Serial Communication Devices 134 3.3 Parallel Device Pons 143 3.4 Sophisticated Interfacing Features in Device Ports 150 3.5 Wireless Devices 151 3.6 Timer and Counting Devices 152 3.7 Watchdog Timer 157 3.8 Real Time Clock 158 3.9 Networked Embedded Systems 159 3.10 Serial Bus Communication Protocols 160 3.11 Parallel Bus Device Protocols—Parallel Communication Network Using ISA. PCI, PCI-X and Advanced Buses 166 3.12 Internet Enabled Systems—Network Protocols 170 3.13 Wireless and Mobile System Protocols 175 4. Device Drivers and Interrupts Service Mechanism 4 1 Programmed-I/O Busy-wail Approach without Interrupt Service Mechanism 189 vii ix I 128 187
  • 8. Contents ■ n xiv j 4.2 ISR Concept 192 4.3 Interrupt Sources 200 4.4 Interrupt Servicing (Handling) Mechanism 203 4.5 Multiple Interrupts 209 4.6 Context and the Periods for Context Switching, Interrupt Latency and Deadline 211 4.7 Classification of Processors Interrupt Service Mechanism from Context-Saving Angle 217 4.8 Direct Memory Access 2/8 4.9 Device Driver Programming 220 .5. Programming Concepts and Embedded Programming in C, C++ and Java 5.1 Software Programming in Assembly Language (ALP) and in High-Level Language ‘C’ 235 5.2 C Program Elements: Header and Source Files and Preprocessor Directives 237 5.3 Program Elements: Macros and Functions 239 5.4 Program Elements: Data Types, Data Structures, Modifiers, Statements, Loops and Pointers 24/ 5.5 Object-Oriented Programming 262 5.6 Embedded Programming in C++ 263 5.7 Embedded Programming in Java 264 6. Program Modeling Concepts 6.1 Program Models 274 6.2 DFG Models 277 6.3 State Machine Programming Models for Event-controlled Program Flow 282 6.4 Modeling of Multiprocessor Systems 288 6.5 UML Modelling 295 Interprocess Communication and Synchronization of Processes, Threads and Tasks 7.1 Multiple Processes in an Application 305 7.2 Multiple Threads in an Application 306 7.3 Tasks 308 7.4 Task States 308 7.5 Task and Data 310 7.6 Clear-cut Distinction between Functions, ISRS and Tasks by their Characteristics 311 1 ."7 Concept of Semaphores 314 7.8 Shared Data 326 7.9 Interprocess Communication 330 7.10 Signal Function 332 7.11 Semaphore Functions 334 7.12 Message Queue Functions 335 7.13 Mailbox Functions 337 7.14 Pipe Functions 339 7.15 Socket Functions 34/ 7.16 RPC Functions 345 8. Real-Time Operating Systems 8.1 OS Services 351 8.2 Process Management 355 8.3 Timer Functions 356 8.4 Event Functions 358 8.5 Memory Management 359 234 273 303 3S0
  • 9. Contents 8.6 Device. File and IO Subsystems Management 36! 8.7 Interrupt Routines in RTOS Environment and Handling of Interrupt Source Calls 366 8.8 Real-time Operating Systems 370 8.9 Basic Design Using an RTOS 372 8.10 Rios Task Scheduling Models, Interrupt Latency and Response of the Tasks as Performance Metrics 385 8.11 OS Security Issues 401 9. Real-time Operating System Programming-I: Microc/OS-11 and VxWorks 406 9.1 Basic Functions and Types of RTOSES 408 9.2 RTOS mCOS-ll 410 9.3 RTOS VxWorks 453 10. Real-time Operating System Programming-ii: Windows CE, OSEK and Real-time Linux Functions 477 10.1 Windows CE 478 10.2 OSEK 494 10.3 Linux 2.6.x and RTLinux 496 11. Design Examples and Case S’tudies of Program Modeling and Programming with RTOS-1 511 11.1 Case Study of Embedded System Design and Coding for an Automatic 5/2 Chocolate Vending Machine (ACVM) Using Mucos RTOS 11.2 Case Study of Digital Camera Hardware and Sofware Architecture 531 11.3 Case Study of Coding for Sending Application Layer Byte Streams on a TCP/IP Network Using RTOS Vxworks 537 12. Design Examples and Case Studies of Program Modeling and Programming with RTOS-2 566 12.1 Case Study of Communication Between Orchestra Robots 567 12.2 Embedded Systems in Automobile 574 12.3 Case Study of an Embedded System for an Adaptive Cruise Control (ACC) System in a Car 577 12.4 Case Study of an Embedded System for a Smart Card 593 12.5 Case Study of a Mobile Phone Software for Key Inputs 604 13. Embedded Software Development Process and Tools 618 13.1 Introduction to Embedded Software Development Process and Tools 620 13.2 Host and Target Machines 623 13.3 Linking and Locating Software 626 13.4 Getting Embedded Software into the Target System 630 13.5 Issues in Hardware-Software Design and Co-design 634 14. Testing, Simulation and Debugging Techniques and Tools 648 14.1 Testing on Host Machine 649 14.2 Simulators 650 14.3 Laboratory Tools 653 Appendix I: Roadmapfor Various Coi.'l^e Studies 662 Appendix 2: Select Bibliography 663 Index 668
  • 11. Walkthrough Introduction to EmtxxJded Snrorru ” 1.1 EMBEDDED SYSTEMS 1.1.1 System 1.1.2 Embedded System Definition Qtu; of ihcdcllniiiun-. ul tmlxdded nJrm i' j- full..-v "Art rmbeddrd tjilrnt » u ivMrm 'hut hat indudikd u>)ln>ur u"d i<Kiputcf->u>rd^irc. »liuh muLrs it Rmtx'dJcd system*. have been defined in hi«>ks puhli'tud : ufdefinitions from otherv in the Held: Simple approach with interesting examples and figures Simple approach with figures to explain complex topic of system on chip for a mobile phone E^twMcd Systems •>. Other fcifieaftdmiltif units. An ciemptiry application >if Mich an embedded Sn(' is die iiu*nlc plmrus Sinele psiRx*-.' pncewirs. ASYSTEMONCMiP SIN&.E PURPOSE BUSES PROCESSORS OSGiTAi. asipi cmcuns . . TWER IP, MUX, BtTAADORESS .. - GENERATOR PORt INTERFACES PROGRAM PROGR-M. DUAC AOORESS data GENERATOR AN0PORT UEMORT IN1ERRUPT COHTROUCR MUtlt- PROCESSOR CBCWTS. • i5-2tr* -cm -a a% AREA AREA AREA i«t. J.}0 ASoCembeddedsyitetnanditscommonbutwithinternalASlPiintcniaiprocesson, IPl shored memories andperipheral interfaces A syStem t' 4 *” wnrClllg. organizing or dimly- nW •» male. '.< .1- si'irilnli; In J 11sei. plan, pc.glani.ir •<t ofrok‘. A spk-inisalw.an MrangeiTk-ni m which all ■!' umis a.w-mHe amt <nrk u-gilbc'according tnthe plan or prugrani. Consider a watch, It is a tnne-di-play .y.lcn, Ils pails j>< n. hardware. needles ami hatiery with Ihe huuliful dial, chassis and strap ffu-n- i*jrn iv Jinn* ttic real nine cicry s<v«Hid and cuntinwwsly update the lime every second. The system.program updates the display using three needles alterexh second. Itfutluwio let ofruin. Someoflhc.<c rules are astulli.ws <u All needles move only clockwise. tin A thin and long needle routes every second such dial it return. to same pr.inon after a minute (nil A lung needle rutiles every nunw'esuch that itneiunutn same position after an hour, (in A shun needle nnatese>cry hour such dial il returns n> same position after twelve nours tvi All three needles return to the vane inclination alter twelve hours each day. Consirfcr a washing machine. It is an automatic clothes-washing system, lie impurunl hardware pans include its 'Ulus display panel, the switches and dials for u-er-defined programming, a tin.tor to rotate or spin, its power supply and control unit, an inner water level vow. a solenoid salve tor letting waler in and another valve fur letting water drain out. /here f^'ti wrguniw to wash clothes autunuticuHy accixding to a program preset hy a user. The rv.trrny-pr>'errwi rs activated Io wash llK dirty d<dn*s plxcd in a lank, whwh rotates or spins in preprogrammed steps and stages, fr fulton a ui "f nilrt Suioc of these roles arc as follows: (il Follow the step* strictly in ihc ii.llm.mg scipn-ricc Step 1. Wash hy .pinning the motor according to a programmed period. -Step II: Rinse in trcsli waler alter drarmng vol the dirty water, aid rinse a second lime ifthe system isnutprogrammedin waler-saving nude. Step lit Alter draining imii the watercompletely, spin the motor fast fora programmed (dud for drying by wniriiugingout waler Irunt ihr clothes. Step IV: Show the Wash-overstatus hy a blinking display. Stund the alarm tut a minute to signal that the wa‘h cycle is evmplcie. IiiI Al each step, display lhe pridess stage of the system. <m> fn ea-a: til an iiiierropuoti. eiecute only lhe remaining part i'f lhe program. Mailing from the p'siiion wldn ihi- process was interrupted There Canbe m> rerxniion from Slept unless the u-arr resets the sysigmby in-efting another sc"1' clothesand rc.-els thr program
  • 12. xviii Walkthrough Oswaw^ SysWi Pwyjs’wu^-U C£. O9€K.*« Awr-Tmc Inu . Summary, keywords and their definitions, review questions and practice exercises in each chapter Review Questions f i— . ■ । 5. ‘5?’’“s' Practice Exercises
  • 13. Walkthrough xix _ ___>' 'pTCpaMrfrqCcneaptiaM&'«MiMadP'ognMr*qhC.C*« arddeva 1 Aa Java codn are fini interpreted by dieJVMdrum comparatively elowly. Thiadisadvantagecan he overcomeaafollowa-. Javabyte rode* can heconvenedtoriMsve nwtunecodesftx faw .•jraimg using jusl-rn-time (JlTJcompilalitm. A Jiva accdoalor teo-pwever) can be used in the system ft* fast code-run. X jAvabytncoderthatarcprtendeefresafalargermemory. AncntbedWJavatyOcm mayneedaminimum CfSI2kB POM and 512 kB RAM becameofthe needto fire tnoalJ 1VM and run the application. 5.7.4 J2ME (J»eofJ2ME/Java 2 Micro Edition) twJav*Cardc*EmbeddedJavahelpsinreducing the rude luetuK kH for (he uaual application! likeman card. How? The foUowiogarc the method! I, Use roteetaacaonly.Claueaftwbalkron-timcenvironment fetmtheVM interns! t'ormai araloMy (he programmer"* newJavaclauea are not tn internal formal. X Provideforconfiguring therun-time enviroctrneti. Eaamplcaofconfiguring aredrfetmg rAeesrepnun haniling clout), mer-defincdcluitloader),fileciautl. AWTclout), rrni'hnmitedthread), thread groufi. tnoill-dmmtiaularray) and Jong mdflooring data ryptt Ochercwfiguring examples are adding che specific cluaea—daugnme. input, output and streams fr> connecttons to network when needed. 3. Create one object at a time when running the multiple threads. 4. Reuse the object! insteadofusing a largernumber ofobjects. 3. Usescalar types only as long u feasible. JavaCard. EmbeddedJava and J2ME are three venioro of Jiva that generate a reduced cede siu. J2ME provides the optimized run-lime environment. Instead ofthe use of package. J2ME provides fur the codes for the core classes only. 'These codes are stored al the ROM of the embedded system, fl provides for two alltmaiivecoctfiguraliooa.connecteddeviceconfiguration(CDClarsticonrcctcdlimiteddesireconfigurations rrtno CDCinheritsafewclasses frompackagesforoet.security,io.reflect,sccurity-cea test.leu.resources, util, jar and zip.CLDCdoes oct provide feethe applets, swt, bears, math, net, rmi. security and *ql and ten packages hr jiva.lang. There is ■ separate javu.mircoedrtiaa.so package itr CLDC cunfiguration. A PDA ipenonal digital assistant)or mobile phene uses CDC or CLDC. There is scaleable OS future inJ2ME. Thereit newvirtual machine. KVM nr analternative 10JVM. When using the KVM. the system needs a 64 kfi instead of 512 iB run-time environment. KVM features arc as follows: 1. Useoffollowing data types is optional, (a) Multi-dimensional arrays. (bl long 64-bil integer and tel floating points. 2. Errors are handled by the program ctasaes, which rahenl only a few seeded error-handling lit'-*' from thejava bO package farthe exceptions. 3. Ute ofaseparate setofAPIs(applicationprogram interlaces) insteadufJINI. JINI importable. But in (he embedded system, the ROM hu the application alreadyported and the user does not change it. 4. There is no verificationnf theclasses. KVM presumes the elistc as already validated t. Thereis m>object finaliUUoii thegarbage collectordoesnorhave tojx-rti*111 InlK-viinwiviigrtungcv in theobject ter fiml'utiioo. 6, The class loader is not available to the user program. The KVM provides the loader. 7. Thread groups are not available. 8. There is no use ofjava.Ung.rcflection, Thus, there are no interfaces that do the object serialization, debugging and profiling. Simple way of point-wise presentation of the details by using lists and tables Program ModafctgConcops Table 6.2 UML Basic Elements I Mndrllixy j CM" Widl dot) itrmitl are! thtra-' Class defines the states. aoribum ano tadunt**. A clau canaltobe aa active or atucract clAv i Afcvxi 1 Cl-ll! Object Active object A ciaM ingeneral may he abstract whencitherrarer* thorn states, operaon* <■ behaviour u eornpieiety defined, being h anabroadage.or when it is not fur creating objects but only a class, which c*tend>. implencau the abstract behaviours (iMthedil and specifies (he aharam roritues (fields ,* nremo) that class can creMc theobject. Aninstanceofadaathate.afunctionalcsaityfumed by copyingthetula.Stribum and hehavicw from 1 class. Anactiveclassdefinesw> activecfcjeninsurern(an active etass. A processor threadh equivalent 10 ite activeobject inUML becaascactive object poststhe signals like rhrewl and cart wait before sirring or rewriting the operationusing the mcdsoA. Anactiveclassac*>athreadetathathas 1defined slate, attributes, behaviours and behaviours foe the signals. Active dsa in addition, define* the -natroi by signal betevun (for a signalling oi^ct. which canbepouedandrarwhichitowy wailbeforestarting or resuming). Thus there is control on rhe class behaviour. Etreuilnrv Diutrurrvrviti.' ftriirr.enluh.a. Kev'Luigvtar hut uiih dissolves a. dsown in Figure ft IfX-’l ft* etas ccinic* I.* it. - identity, attributes and behaviuur. | (o[ciaiio<l' or mcihudt vr iouIUa-i <w j 1un.-iH*tsi Rr.tangvlar hot with din.no. for eU.x names for its identity, alirihutrs and opetvnns. but with prefit abstract w*b I each ahorjct behaioiur ami aliirtarc i kectangutu bus with ob^ct identity I follirwcd by wniKohm and class idcnlitv i as sfs—n in Figure ft Ittifi Rcvanpita For withitijcfl tienni followed by scmtrokei amiebss j identity,lair with prefic «tivc with ■ ibjevt idcniHy. j Rectangular hoi with thick border lines I arilinnerUivisiiMH ft* theciaM narr*v ! for the identity,anritxuesand Fehavnwn j foyuratnXB *id signals), hit with peefis as-ttvc withetar sdreeily. I Signal Anobject,wttidi itkm (postal)frontoneactiveetas (activeobject)tosaoiherwaiveetas,wpidiuufoe Man er resumption. Signal obsea tahaviuw tlcfines the behaviour(operation roahod)ofthe kaspmeeas eoasmmiatioiL (Signal (Section 4X2) is software ihslncttm or method (tncuon). which gtaeralea rmcrruftl Signal object tins attribute* (peatnctcrsl. ASribute maybejusta flagofI-tit. Signal identity within two pai**of iiacungandctaangsigns Ccshswral by Ctai idcniity (StmitatosttrcoiypeK Slereo- IJT* An Dspacked cofioficn <4 dements (tfritam or bdHvfrw)tiufB repeatedlytoed. Rectangularbos withstereotype identity ttme given ■ifhhIhe iwnpairsof aurring wadekmirg signsMbvnfbychr classickwkyasshownin figure 6.lf(r>. | IGmafi
  • 14. Walkthrough c^. SUM of UoMng andProgmmmmg -«n RTOS-> )/• End«/Cotte Cwd^pVyTLmeCtecftmclkm•/ 69. r BR coda farpo*Vg■*»<■ farlap U>TM.Cfc<*«y •/ SR_TIneU<tt <>( , _ y.r^f— far crMseg * nvtragrfar<r*and<fa*Cateeach >’»?mtmfl fate1VVMem KTCfct’f TO. OBMtaxIVs (MbosTuacD^StrMsg, timcDaac); 71. )7>En>c(13R_TtmeDate euV’l "11.2 CASE SHIMOF DIGITAL CAMERA HARDWARE ANDSOFWARE ARCHfTECTURE TKdigitalOWiwasiiuroduccdearlierinSection l.hl.4.Athgiialeainen issneeam^cidSrX.ISeetteilA I 1.10.4 Ihied tV camera funetkte. hardwwcaruj wdiwwc units. Hjirt' 1.14 4u—rd tWrdwwe tn) wfiwarccnmfeeicnu in * wnpted>g*al earner*. Scrtiou 11.2.t oral 11.2-2 gi't iVdcugn Ucyw cd* digital camera. Scslnwv 11 2.-* am) 11 24 dcwnV hvdware and telware atvfaitciurc. 11.2.1 Requirements RcquirmeW'ufiVdigital earner* e» he undcruond througha requirtmenttable given m Table II I nr OruiMfunrtumiiuU* duearner*an aifaOm: I. A « <9 onurcdlen crnuol Jitdicr. flash. <froexample, for pcnfdtcnh. direct mermuy KCOS. nJ fote*r. neo facts and eye-ball image control. GUI consist* of the IXD display tor graphics. and <wils-ViandIwueassf« inputs al camera. A liaahxrcen n amaher ahemaurc!•»VXD an)keypad. TV user give* commands for twitching on the omen. Huh. diuricr, adyvrl brightness. couth. s-ulnr.tare nJ transfer.Thet»crcnmmaruKvc in thehemoftruerropr ogaah.Eachsagnalgroerate* farm aute inpul fromant^craiedtwitchorburton. Uhen a bunucr(oropeningthedwuern prewol. a Ilash lanq) ghros and a self*timercircuitswitcVv offthe lamp aulcenalicaJIy. 2. IV (Vrarc generate light, which fill, m tV CCD array, which through an ADC tranuraw the bib far eachpitetineach row in the frame, and alsofor1Vdark area pitch ineachrow in a veriKsl scrip lie nflri cwrcctirm in CCDsignaledlight intensities far nit row. IV srnp t*m adjacentframe 3. A pkswvcrwvriHedanumberofpilets. TV numberofprset'usedfir:pcturedeterminesffwilroiiuL f*Kpicture sirtsoasof a number oThcrnnmlaJ and tenical pitch. Fur 2592 < 1944 (wtcKthereare 2592 * 1*44 s SO.'KMK arts cdcelts. i-Vti *ct of pixel hat three cells. fir the red. erren and blue nimprnuin J piacf. EachcellgetsespuaedIoa picture when tV shutter ufcanwruiysensim amet command. 7he »anrro ffrnrds rtepictures ironga rtarge-tiwipWdesires iCCDramy 0>r array crourtsefa UrgerutrnberofCCD cells. throe ateachpitch J L T. a / K C, o ■J '£ c T / ‘1/ Mx mt/ fruMrmAardtLJ m/rmi dr»iffi th?thtrr•i/’e* ihm/iuM */lt4 in t*wi t*toi/M«*fuW(ovrm rWw<rrkipwr 7V/i • uir i(mJ* tv1iAnouttRaniif<Avriita'* rr^tfMliufXCVM/!■AteA»H' rJaj•h/nn tn*r I.Hl2 /A/ •-^< it^fh ittifmilmrn«it«'rJru'br<iA ) V)4 <*'4 */ fcAiiA rvi tWAJtHfiicii'hr' ia < // /V ubftxD.n lAf»* itJw urr Ut i t !•* irvn» hrv ti* irf44 ijirrm uzr liilftL 2. Ta At* UHl. n wi/ u> iV^rnx*it-f/Ar ijifr***. J. Tit {ett'n fo defint htrdtrtft m/i tttprt’cri u>t ••• 7i>AumA*ki(Afbv*^Arwjhiw*rAiQcWrA fv r<rrv/w* tumid*• platedrfUmi *Ar ia^*ufT i*ru <7«iyK«KHJ>, /VTItftTfrM «/M^AaKr 1 T<t feat* lading fur d/ttin impUfnfnialion un^r A/VCVZY u*/ VrUti/li #T7V.V’. dlx« /V uif r/ tT( f,u fiu* ivniAa*<«/iin uaJ < w'rrn; *11.1 CASE STUDY OF EMBEDDED SYSTEM DESIGN AND COOING FOR AN AC/TOMATfC CHOCO1ATE VENDING MACHINE |ACVM) USING MUCOS RTOS ACVM wi* 1arodueerfcaiIiftNafiwn I H>,2. h ACVm fafKlic*'.hMJwjre i/xlWiwdc unib. Fipjfc t.U *1**01 j diagrarrunjcic ripvtxflLiui«nH ACVM SechnM JI I.Mo IIJ.AgivethedeMgnan AC'VM. V.2ik'wnt'cd MUCOS StTOS. It ta a portable. ROMabk. scabbte. proemfioe. real nn« jai! multiuskififkemeLSection 11.J.?4ncnhe* Gm AC'VM tohin^MUCtA**KHAS (Scctiw 9.2) propimrung envmmmrnl. 11.1.1 Requirements TIk crifui/ttwntt td dtf mo;hinr rm he uMentm«J lhAAigh j rrquftc/ncTM IjNc pun in Table N.I. 11.1.2 Specifications The ACVMspccircAik*i in briefarc v Jullu»>. 1. Ct h<s an ulfd^nunffie keypad <w» iftc l"p the flixhi/w TJol cnjhte* J chihJtoimencl»rth11whenboviacarbwciParr The«r»nerc.m Jw*cy*iimji-1 jnJ <nicr*xt uch the ’iijchihc Explains modeling of programs and software engineering practices for system design by case studies of systems for automatic chocolate vending machine, digital camera, TCP/ IP stack creation, robot orchestra, automatic cruise control, smart card and mobile phone Embedded SyUemi 4h, /• Wriie IV imy element* ufkr encry^irwi. •! ApplSirw SmanOStiiwiypi <rruwnUp,< DfSi. 5mirtU$Ql*ud (MtgQSun. AfT*Su>; 49. !• gaum Ddlyed uA uA.PW. •/ SmanOSTiincDlyRcura: (Lni.PWPmmijrp //•Eid ofWhilekxf’l iO.V'EndcfUttjln^Cnia. V . ..............*........ 22.5 CASE STUDY OF A MOBILE PHONE SOFTWARE FOR KEY INPUTS Mobile pbmo arc wtiarl. Each fdmne fan many APlt Eumple ofAPI* are pfamc. SM5 I*bnr1 me*ugc uncrl MMS (nihimcdia mouxiny lenfoe). e-mail, akku book, —ell bmwung. enlendar, ladt-i.Hfo lul. WimtfVL Pncket-VfanLi^ta-ExcH. awe-pad frv mono*, portd-ri'f., -Irk <bow andcamera. Meiile phurw witha large icudbem 0fe a vsloal keypad Mrtile pKxw witha -mall wrecn u*e* T9 keypad.TVpreirffcasestudyrelatein'SALScreacapplkatirti' bia ombilepfame wiipT9 keypsd farinput* Section 115.1 gives tV icquiranrautd SUS create and *cnd applii-ainwi'. Sectuut 12-5.2 give* thr ulusesandclxa diagrams. SccuM IISJgives tV abac diagram art! Scttam 12.5.4 gives cnminjmeaiiun hardwn. SerJon 1155 describes wfrwoeachVdure. Section 12 5.6 ck-w-nN-t the bnfiwnre lash, ud Syacteuriuiiun Afodclforrhe atgAotm 12.5.1 Requirements Apmcoaor.keypad,acieea.snxlchpadnrestery,penbleace rnemLCyandcreiimunicationunit*arc required heSMSocaeandoutappUcajraxScnucbpdaiaooryadihtMSorusedfuricntpnrarysavingofchmcieet foytes) duriaf the appiicaiirai. PcnVoics tthjaory addresses are used u^q *m+i ihar as scam a change i* made m the byte, it prrats era afterlhe pow ewiictes off. Further, when tVn. is a change there, an idenCaidtangcisrefleoedino/Vrcnrreiasedcbjeca.Forexample,a rtuncholueuina (V fietVCwcts. de<me dtmgclaftcsin thefile forMhosboot forndiiig tVe-onils. figure IUDshowsspeeife MS.whichMtBwdfortV SMS factnaeappUcataui.TV smen ismedfor (EflttayttgiVnsmLHgweIUDdtowsthadiacoefourCErux5cys(up.diwiLleft aMn^uldeixnedby ri. Cl Cland C4.Inoaugaiterkeybad. fear(Sifcreeaemerkeysaremed.TV mobilena»rkeyin tVkcy^J i-jradilhait fti’rtS.nsasfocxkeys Whenthetcyis(msad towardsdie left iVinnurmmea left foLuta '.rmgvcndtti.'' a»thetightdieeunwrwncsngbat-sk.aadseenfori^,Tyro drum<11 la edditkr. there are fmrcommand keys(righKomersccoodupw. kfi<omcr Kturxl-row. rigli-cnmer firU-rowand left-eonerTintmwldeaaedbykeyULowLkcyiRowlkcylRnwl atrikeyIRtiwI.Also,there arr. mne TVkeys faroumben I to 9 b wtf!a foralphabetsa to a.(« A io Z>. TVre we iwo modr-keys ftcyMI andkcyM2)andonekeyOkeyfarbyi^inantcharacteroianVrQnr yxav. A)/tcavn>cnc>cnio mallcase or eapiul case is controlled by amode-key'sstate. Teucharacw entered tn keying dependson Alate ofdie TV key.|Recall Rumples 5.6 and 6J andSectfon 63|. .
  • 15. Walkthrough xxi ErrMdod Sr»*™ 4 '£ A K K I Q o E c -r i E 5 K* B'jJf /mm iht f'JL^ing j/i rAn ,ipkf. fu Bu.<k ftinchotu andnpti vffTOSti hi' XTPX pCOS-lt ai MUCOX «n fht lent thrvugh iff riMwipffr— tMtinplf1V.I m 920. WAararymi*iUj artpaiwrfuafirfeMnJwJanminted fttr rtii h <0V/i MUCO31 finiftw* •ill 6r cj^w«A Itartin* *ht m<v «/ in rV AWCOJij tMp'fcvv/«ra remit• tvtn t]onaAtr UFOSit urdUtttf Jhit-diAr/pf/r«jrfvmwUrritum&AffrijJhmcW- and mhrddrdJtfTAVi lairt <m. ran k'rHo/Lj fuim Wtnd Hiivr* Stitmi m ofiff an HTOS far »^ph/ifiiand tfdmMrJ irifi'MJ vi/A fuivttfal tuyl loppy*• thniugh irnn tuirtplct^ Ktamplfi 9.21 *•• 9.27. bifffnnftx brtntrt <Ar ftHart1 irm*tpAarrt wwiJfestti u</4*/wi irirt ftQVdtvAai ofMUCOS ndlht •"•litfltof O»pw K* •rffdrxfr&tlAc Hv>fowt Ct OSfiX reirf-f*mrfjftufflTfa/uui. 5.1 BASK FUNCTIONS AND TYPES OF RTOSes A rumple* rnd'jtt*tirt£ embedded QUem detigfi re/juicc* (he dcvelapmcm of thwwghly tcUeJhupfree cafe* fa l. JAtegnacd devtJapmeft efivinmment 2 Tuk furwiiixnin emhakfcdC «emtakferf C** V Rcif-tinv ckxk-bwed hiftjwwt ind mftwireumen a. Scheduler V (Tevet driven «nd devicemiMger 6 Funetn«> f« [HTj vtiftg the vgMh. event (U< fnwp. wmiptvrr-hiftUmg fuHciiofti »d function* for the queue*, m*ilbu*fcvpipe ind wekeb. 7 AddiUauJ (qm'mjim. fur cutapte*TCMPof US8or RlwUjOth*a WIKof IfDAMdGUh. R Fjra md exception htftdtuig function. v. (ruingand5,ucmdehuggirywrffwirtforIcwagRTOS a%«e11a<devchpcrf embedded 4ppliCJ»f*, 9.UuJ shows the tag fumu*m* cipcttcd from the kmd of an RTOS. The RTDS'% hi«c the fdJowing future* in genenl. 1 Ic/tkI fuiw'iiouand ichcduling.*preemptive e» pre-cmRrtcpluslime dicing. 2 . Pnuniic* definicmns fur ihe CxsX> and 1ST. V Pnoniy mhenuncctenure <«oRjm ci pnurity ceitag (eattfe. J. Lmui fanumber of la«Xi 5. TA't synchroAUion md IPC function*. 6. IDE consisting of cdhew. platform builder. (iUI and trephre* wifiwjr?. •.(Cipher, ikbugp3|! mxI hnsi urpci 'vpprihoA ?. (revue imaging tool and devicedriven. (( f7iw*c /Y/SfX*(prwt f«qp<i_ini fvflnl*»n utrng lhe HJSf.Viparom tfr Tufbrw'ngs <<I The tufKinAi R«d*«LMiU^ i ««cuu«t«<ethe Vt.Wiek*.Idwwy*ufcvwMiuwv(the KWX<>«w* rhj DrfurKtun,^ i<w«rr. na^ vhner wlinkl JMUUuc.ck^andrmivcj.mdm*cw tel DrftfAaamn^.wuHi i / the ailnbvicid*a RISIX speoc. Ml 1he funciaau osteal < । mJ «fn_ftxi*e() unloAand M •<f«w. IcJ The fiwitiqn<i_iUjty I t ugMh<oa tinglewarling ti'Alh*ihctma^e<* av«UMe The mKv '*•<'* fcv a tab.whichha»hemtegrtrfedfaammTraik* IfegiUcrcd*ican* Jaitfot ukctocMcUihcna^nutifyj.Thi* prwranineMfO^fymefo/fuowrvertuk. A *er>cr tartKvcivertirm^iicatuMifroma drnt t*dc thruiighaMgndhaaikr fiuKtk* (like an JKKi Hl lie fofeinm Ifrtfktct ihr aiuitarteirfaPDSLC (ftroc fgt The rt)M .jane n^unlhik I 1net drun^Ac<f«wimrAhatcly hut petent* the<nhc«U«Uln«rung the ifurnc l>ripeur»dl gsdouuyvd urdyifthe 11M usk cfane* ebe ipcw.Jkak.iy iw b> dC'JtUxak* Ur nr'ruxy iMnriwd »ilhqmc IXB. VcWitfU 4><vcbw»etJcrAfaanal hjhuwtng fnii/tc* djTiotcwieficwnamhe u<d. liilTwu I-11-0 mdJok h«queue* bom hymultipleia*L* RfSIXqumaahavetheakiicavial firfh/wjag (e•kirr U4 ft41freJKm mt**ea single *stu*g ttfk is ivaiUMe IftJthereOnbe U pri<rityk*d» in place or imc|Wumly iocH.'KGfXTft VcWiniL 12. CVruAKfat*r»r drmcf»onuJ.+nir or //*Ck Wh0 a Uak oukx a tskJDalkKUto tScctnm 93.il. When OMOg the uU<eUtorf fmtfiom. the nunAcr tailiidca Uak ideAtfy.Sranlariy. a prpefSaiiim 7.14i<m mAidtSci.v*i 7 I$rim GteIStxdmX.6.?Iwhencruiei.afitedocrif*r<fetaurudUK m cmalmdanuntfrr. Ge cample, id n xuigrrdmideveify Ac devcccroud. Tte numbs*h rnwgixd iffciclaHiimeg jxi rd Jr numhen abpnJy aJkratrd Whe» mwij: Ac deviedreltfalImdiiMb. Aenmotierfarilitifca thedr*ice The devuTfmrtMesampln arcvfen iv rodorwriteorgd Ufibur9vet9afifttucck“c tSnm<i X 61 A pqrit.VaWicts h i HFO^w. wbuch i* managed <MbyquortfCAnO/tn*Nit by the dc«icc4n«er funutiiau. VtWud* ha* maoagcmlfuncucmf*M a pvpc-drHd(likeadeviceAixcrjpqw*/n*.Thi*11 analifiaA l‘»ihe namedppedriwrmUwi. fipe*ahn in^Jcfncnttheunafrro.tjrmdiMtanauwtoftok.*. FufKijiwi pipel'eiCfcaiC i’/jnp«//wprXo**r*. muuMki. maukfj/llytr/i crraici a pipe device named ptfnHaon farmuinaim«toi*i<7mcMps E*h mageoa he ofni&Ktnis) ua Artec It cnicr* ir.ma Iin uftk»ice*«mcrerfxuudev*f 1 fuiKtwnretrieve*th:1n(ofdevrfts withthede«uTnumbrrallftied id Meh device including|wpcdencr* Curuadu m cumplc (« crcAog a pipe namedupiprUurinfo.Aswnre itaa*1cachave a rottnfesn tX fnurtncuagev i&crname. po**«d. ictephunc number and c-ruaitID.tadi the< cuO b: of a nuAimum m/c of J2 byto iMify A gkXmi variablefJ»» an integer number farJfile docripfer that tdetuifeta (k*u*e anmng a ninahcrof de»K^ at die IO *yucm. 77k ik*k*e can te a fife ur ppe or wekcl nr>*her dote. K*ample V 26 ctpCam*Jk mde*torcreating. »*riimg and reading. Example 9.26 I. * include Vedjh.h"P Indiofe du [0 librvy fmlicn*. */ pipeDrv l)./* Iroafl a ppe driwr. */ 1.<* Declarefiledscnywt.♦I mfdi 3. P Moderefer* 10 the pennhoan inat* NFS (Network RfeScrrerL Mate h rev 00 for urnurfeial permi«tkM. *f IDI 4.7*Create pipeMmeJ a* pipeUicftnfo forJ menagecart )2 bytamaairaa */ Comprehensive explanation with coding examples for learning the widely used RTOSes- mCOS-ll, VxWorks, Windows CE, OSEK and Real Time Linux Embedded Syilents inlcmaj cwnmuntcutiorf. E&ten.ion diKA nrtpermitcreationand deletion ol t^vls durinp run. l*Aienxii>ndefines exh (1st<>fdifferentpriorityand activatesiiotfyinc taihecvdo. iMlcnsiim imi um; n>es<apequeues»1 vies semaphores as event flaponly with no askhavmp rvo-time deletion <T crvjlinn ofilr'C. |" OSEhMKAoiMcit............ i (Throestandards: MOPISTARC,Carrarwiotai slackand NetworkManagement) i'S "• i EOfcientdesignol , ■ . artMMtm' The .. ■ hinttie.nl*rr 1 shall be : contigurMe and ' I Tti'ih'r *~ I , ana&eCO&n* ; adnBW»r<o<d» |> ■archdedixitod'e jsoffcatnnri !' 1 queuian ‘f ।---------------1 -------------- ------ - SMfleadondoesnotprascraierrotems-naonavertsandVws provisiono>aMoUrtn independencewinregards to MMdualbgrtomenMenand&wrieithe pcxtaWey and * resMMy apflicatenwAeare I EHtenee the perfarmenca doveraltjean<Mo<k*pMngaddKondhardwaredueIo I eoqkancad utBDtimcdthek*Ag«we(«Mngrensna)tMAutodin (he vehicle I*Verfcation dfiesOonattyand Inqdemeraadon <•IsuUjpesn aalacledpantprefects I__________________________ _ ______ ______ Fig. J0.2 OSfKbasicftatures
  • 16. Walkthrough xxii Omi^r*i Txts'. £*«* CUtaJJy.Cce 3>A IMIItaam.May. 8U rtMtopW. ArartrahIMI r^lra.TeyknBlFroch.0«. 3B5. Ma*. USA.MM. 1) 9 mjKmmL pwY» EdKf^B. $i*«E<L 2003. 11 K.VXL‘WaiJrffcd teSpw.-Cortpo.MpMrffofrjvvf- fW l/<h» Drviwrh. 200). 0u^U» Bobftf WtOOVJCLNfT.UXA. 2OQ3. CwAtlia."Dr4«v CnMWfiortwi'', M SAraa. CTR«2)>2W1 prwtC V CK..VUdGv^k AvhabDm.AAr jkr&iMft A. PRINTED BOOKS I. GrWwnFto<liF»B’ll9ten«mJ Mm KaA*.vLm«AjfiianttDr AMa^>OaGvaA Fut^tSeixtanF^icliMSyriraA Uriah an".Springer, Mor.2006. prairie Halt2001 $1MA 8. B«JL W*t4W Jynmr K^i ■brtf Druft, BaflD*vonb itaam. Nw Mw. USA. 19%(T* Mfa. Mat 9021 Appendix 2: Select Bibliography us*,ro 4taf*Drdfa*, (--o— w. Vajrara. Hitnrs^wr Syaaray. Aral Raw Mariydrtaf*. Acporuiaj- 9etoa euto^icny 19. MpjVwvx.iMte nateAvs^lFx n^cntiog»»^ftiratMeit/ammsgujatl 20. lup/hraraEETAw.com(Frr rutecnlaAy ua W»l«otMted a>«KmrayUMel. 21 MpjrvwweRcnrWraibedBih |Fk wtaoibuf»• populareateftW lywem rra^mrat ’.2 tatIt w»«erMridtol-crranpiiucicotwelcacr IFor wbecrita*( » a pabular cotaddcd cooipuUf lyurm maywraj 2) Mp/AraafomBModdmtA ppdareoMdriri ry*a ■%! 21 KiqrWaaaaa«wrt^oiaxizri IA pofarls world "ifcradBfCkvadiacm wt^Hc isdaily de Lcy-ttnni m «*riawi M<f«n| C. PRINTED JOURNAL PAPER REFERENCES ■ HuanLl KnthiRrinasmMm.FruhaHSheaoy. Rods*A.G«0ri«adH>eD.SwWney.•«<«<Woufrww tat AralRawTeaAa M «oMrRoterirr", Jewraaio<SyacnaandSnftwwe.K>(1|. 962-971, 20% 2. C.R.<i«AN. Shnu. K-RawtiMhim.S.MrirwW.'EJIrriwhMnxSttrtnfxAmmuawAfpUcami: A .wr Srad>~, Pnx at 11* tE£E WemarariGoo/erracu oo EnriedfedtaJ Tima Coanpding Syarirra lad Afele&au" 2006 1 LrivBerre. FtBxkaaaiwad Knar. "CWfer Cnaien!frMdriAxotuotrn ttaxnrtj' IEEE Mem. 23r«). M-». xm 4 Wayw Well, Bail Oia BM Tehaa La. "SwvrGracrar orCaaPaaAMSyumu**. IETF Micro. 22(5).46-35, 2002. 1 tearLmur Btlrt. 'EtgSadagHartrWCf>-dt»f*tA Wreea-UPm FFCA>~ /Zryi) Jcamd. gp H-n. Saw,law,. 2UO2. 4 Ou-Tiny UM| and Hom hoy 'Or"*B UoftiatCndar CramedMA Caorararad Srrint StoMwy' law Vehicle SyumaDyrunucr. Jl.fV- Jll-JJO. 1909. 7. Tldad Mmu, */*arriAru /*apr>urL AoJyei radAypteafaar”. hoc. (EEE. 77(4), $41-3W>. IM9 Detailed selected bibliography of books, journal references and important web links at end of the book to facilitate building a startup library for references and further studies in Embedded Systems EnfeddM Systems IS. Caiy F. M. >hmr.a>mKr,raadMv<eraw‘">-*-^'*wv'(,'^sT*n’raidHo^ww £atm"My.Os(cod UnhEftUy tfew, Nev Yivt. 199? <6 Balann F.M CluaS*. A luoeUa. N. H«h- A I. la'.yr.-.C Poecunme. A E Smyanaaai. Vteolelli.K Scncn.ah. K Saruli, aM R TaMua. #/un>-orr,.'a^-«mO-flrarn n/frArdidSmr^i;A P.du A.TVa»fc Nnrxcll.S!A.Klu.cc Academic PuAIrdvrv laid 19*7 17 Joan FrarcM Bman. FmMIOJ Snrm A'a.rramAary m CunjAiirmN.>. Vta Ncawri.RcmhcJd.Nc» Tert, USA. 19% M fticrS|axi..Ar«nAvn<ra*r rnAnrd,.- y*r4W2Z. l^EdW. fttnurcHoS. fi^mrandCldTAW. IOC* 39 FrrJ liilull. Ajiu C'lramaocuiwn C'ravulrryrmniic ami Oyra S.urau. 4i>i ESaxa. tancr Edvuuoa. 1996ilowth (ndon Rrynra. XDIi 90 Sdhcnchauend PR Calvin. OprnirMy Srarrai, Addrwai WWe*. Rearimy.MA. USA. 19% VI. frier.MaramJrl. x*J GcalCamrai. t'nlrCratKa^tt FxtMti fr.rirri, Ahram AcademeniWicticn. lux. Id*.*}. 92 Oanicl Tahah.AdranrrdArn'mpmrrairai.McGrsv.HiH, L'SA 199$. 9J. Gajcl.. Daeul 0 . Frus Vahrt. Sxnj.r SaijAand lieGraf.Spr.dL'oramandUrain KmArddrrf.9.irrau, Enykwrod C'-IK NJ. Proiiee Hall. 1991 94. FranUinG. F. I I) fratII aaJ A. EAami-Nerai. frrdharl Cmi*Wrfthu&ue Snima, r* Ed, ArMicra Walcy. Rc^uf. MA.USA. IMM. 9S. Sienan J.W.. Ar S»l Marnmnlkr—HaatMtr Stfium<rd Prance HaH, 1992 96. WilierI Grmdiam and TTrauiI-Vincera.MadrraGovralSyurwU-AAaluir<iAdUrvtra.Mo Wiley. 1901 47. Him, K. I andDanielTrial.Mmv.mmdfrn—*»r*o«r»ra iS4*o«mM/Adri«HMwif,McCmir-JIrU. im. %. JaaaGoouk.AriyPn.inxM>Me CnArdMSruew AndnacUSA. 1942. 99 GiemnddC. D, DwrjWCll Minra-mditr. Sanden Colkje PoUiahiat. 1991. I®. Arina >. tt^Dtug* niiAA4rimrc»MAdkfldwJAGrnirT^rawm.TAcGraw Udl. 190. B. WEBSITE REFERENCES I 1. MrpVAra*abpvina<e.’i.CTn IFnrTeliai.jmnirim DSP Pwcuo.Secwn lie, 136) 2. teipJhravncnmrfcaodrandaa (FarSedrie IA|. 3. MipyfrrivjuairdicMeiei/ukMiedaleVvmTJain and anodjuni (ForScetina 2J3|. 4 InpJfmwjmaoISrnieo13J,Ftr ARM froesm). 3. bepJAn<xjLeoaAcAkici/lnhccttA2«racL,appApa»6MaJrtrt IFor Scam 2-16( 6. hBpZMnrxaibcor| IRartemteunlajrf|aifonuancea ti mdaatfrii Syacsa,Seaana2.6and 133.3], 7. hspJ/aww.jarajriiLCDcn.'fTOiiea/ja»«c«rd (ForSca™ 3.73). <. tajrZArriw.nebc9edaxr»WrERW7<<cifiu»lin6_«rncnM>"IFa SBia 2 tl. 9. hip-jTw».nnx«n |ForSB%i9.3|. in. kBpc/Araw^nd-vdLori [frr SaetiM IP 1| tl. bnjtfnwwAioiixmi'eirScSiw '[K 11 hnp2Arwwza.«7xd»ad(ForCanfr' '.v,Mn*EniteddedSpanDo<o*eliai4eo<lWnrtiiyo<Calirvu Rhttride,SecLoa llj( 13. tapjfrMu<4vn>aaal4-rrsMaMtHrax^era*Mfrr«i'irAcad (ForSecta IlJI. 14. tapJAraw.taBXoml-jjJanitariniiMttai jFcTluwiM “MBLSeco* till 13. IS^®c/2mmAteuxftteeAn|/taoriAVnMlira (For MIDI imafice. Seem 12.11 16. tapvKra*j(iiner(.ot (furSeaioa IZiwdbtGiiddiaettar<br VicofAcCLoefeafc sMeetataad SoftwaretfM1SRA(MastbdaoySrfwereRriiabiliiy AiwriMimH. 17. bap^ArwwaacarcKtaxcira'ieraayscTni/icarrLhon (Fee Secta ll4l IS. bspcffirwwftoavdJataeccnd-alind^^^erVusaRCardScarityZ(For Seetioo |14|.
  • 17. Embedded System^ i S.J«. INSTITUTE «F technology library BANGALORE - 5iO *60. ACCN. NO. DATE Introduction to £ E 2. Section 1. 1 Definitions of system and embedded system Section 1. 2 The processing unit ofan embedded system consists of /. A processor 2. Commonly used microprocessors 3. Application-specific instruction set processors (ASIPs). microcontrollers, DSPs and others 4. Single purpose processors Section 1. 3 The hardware unit ofan embedded system consists of I. An embedded system power source with controlled power­ dissipation /I clock oscillator circuit andclocking unit that letsa processor execute instructions Timers and a real time clock (RTC)for various timing needs ofthe system Reset circuit and watchdog timer System and external memories System input output (10) ports, serial, parallel and wireless communication, serial UniversalAsynchronous Receiverand Transmitter (UART) and other port protocols and buses 7. Devices such as Digital to Analog Converter (DAC) using Pulse Width Modulation (PWM), Analog to Digital Converter (ADC), Light Emitting Diode (LED) and Liquid Crystal Display (LCD) units, keypad and keyboard, touch screen, pulse dialer, modem and transceiver 8. Multiplexers, demultiplexers, decoderfor interfacing ofthe devices and buses
  • 18. L 9. Interrupt controller (handler) E Section 1.4 1. Languages that are used to develop embedded software for a system J? 2. Program models J. Multitasking using an operating system (OS), system device drivers, device management and real time operating system (RTOS) 4. Software toolsfor system design K Section 1.5 Examples of applications ofembedded systems I Section 1.6 Designing an embedded system on a VLSI chip Q I. Embedded SoC (System on Chip) and examples of its applications 2. Uses ofApplication Specific Instruction Set Processor (ASIP) and Intellectual Property (IP) core 3. Field Programmable Gate Array (FPGA) core with single or multiple processor units on an ASIC chip Section 1.7 0 The complex system consists of 1. Embedded microprocessors or GPPs in complex systems e 2. Embedding ASIPs, microcontrollers. DSPs, media and network processors 3. Embedding application-specific system processors (ASSPs) 7 4. Embedding multiple processors in systems Section 1.8 E The design process has 1. Challenges in embedded system design C 2. Design metrics optimi~ation 3. Co-design of hardware and software components T Section 1.9 The system design formalism is defined I Section 1.10 The design of embedded hardware and software in an automatic chocolate vending V machine, smart card, digital-camera, mobile phone, mobile computer and robot are given as examples E Section 1.11 Classification of embedded systems into three types ' 'ir' S Section 1.12 Skills needed to design an embedded system
  • 19. Introduction to Embedded Systems I 3 । I__ ) 1.1 EMBEDDED SYSTEMS 1.1.1 System A system is a way of working, organizing or doing one or many tasks according to a fixed plan, program, or set of rules. A system is also an arrangement in which all its units assemble and work together according to the plan or program. Consider a watch. It is a time-display system. Its parts are its hardware, needles and battery with the beautiful dial, chassis and strap. These parts organize to show the real time every second and continuously update the time every second. The system-program updates the display using three needles after each second. Itfollows a set ofrules. Some of these rules are as follows: (i) All needles move only clockwise, (ii) A thin and long needle rotates every second such that it returns to same position after a minute, (iii) A long needle rotates every minute such that it returns to same position after an hour, (iv) A short needle rotates every hour such that it returns to same position after twelve hours. (v) All three needles return to the same inclination after twelve hours each day. Consider a washing machine. It is an automatic clothes-washing system. The important hardware parts include its status display panel, the switches and dials for user-defined programming, a motor to rotate or spin, its power supply and control unit, an inner water-level sensor, a solenoid valve for letting water in and another valve for letting water drain out. These parts organize to wash clothes automatically according to a program preset by a user. The system-program is activated to wash the dirty clothes placed in a tank, which rotates or spins in preprogrammed steps and stages. It follows a set of rules. Some of these rules are as follows: (i) Follow the steps strictly in the following sequence. Step 1: Wash by spinning the motor according to a programmed period. Step II: Rinse in fresh water after draining out the dirty water, and rinse a second time if the system is not programmed in water-saving mode. Step III: After draining out the water completely, spin the motor fast for a programmed period for drying by centrifuging out water from the clothes. Step IV: Show the wash-over status by a blinking display. Sound the alarm for a minute to signal that the wash cycle is complete, (ii) At each step, display the process stage of the system, (iii) In case of an interruption, execute only the remaining part of the program, starting from the position when the process was interrupted. There can be no repetition from Step 1 unless the user resets the system by inserting another set of clothes and resets the program. 1.1,2 Embedded System Definition One of the definitions of embedded system is as follows: "An embedded system is a system that has embedded software and computer-hardware, which makes it a system dedicated for an application(s) or specific part of an application or product or a part of a larger system-.’’ Embedded systems have been defined in books published recently in several ways. Given below is a series of definitions from others in the field: Wayne Wolf author of Computers as Components - Principles ofEmbedded Computing System Design: “What is an embedded computing system! Loosely defined, it is any device that includes a programmable computer but is not itself intended to be a general-purpose computer” and “a fax machine or a clock built from a microprocessor is an embedded computing system”.
  • 20. S’**" '>Morton author of Embedded Microcontrollers'. “Embedded Systems are electronic systems that BBbotairi a microprocessor or microcontroller, but we do not think of them as computers—the computer is * hidden or embedded in the system.” David E. Simon author of An Embedded Software Primer: “People use the term embedded system to mean any computer system hidden in any of these products.” Tim Wilmshurst author of An Introduction to the Design ofSmall Scale Embedded Systems with examples from PfC, 80C51 and 68HC05/08 microcontrollers; (1) “An embedded system is a system whose principal function is not computational, but which is controlled by a computer embedded within it. The computer is likely to be a microprocessor or microcontroller. The word embedded implies that it lies inside the overall system, hidden from view, forming an integral part of [the] greater whole”. (2) “An embedded system is a microcontroller-based, software-driven, reliable, real time control system, autonomous, or human- or network- interactive, operating on diverse physical variables and in diverse environments, and sold into a competitive and cost-conscious market”. A computer is a system that has the following or more components. 1. A microprocessor 2. A large memory of the following two kinds: (a) Primary memory (semiconductor memories: Random Access Memory (RAM), Read Only Memory (ROM) and fast accessible caches) (b) Secondary memory [(magnetic memory located in hard disks, diskettes and cartridge tapes, optical memory in CD-ROMs or memory sticks (in mobile computers)] using which different user programs can be loaded into the primary memory and run 3. I/O units such as touch screen, modem, fax cum modem, etc. 4. Input units such as keyboard, mice, digitizer, scanner, etc. 5. Output units such as an LCD screen, video monitor, printer, etc. 6. Networking units such as an Ethernet card, front-end processor-based server, bus drivers, etc. 7. An operating system (OS) that has general purpose user and application software in the secondary memory An embedded system is a system that has three main components embedded into it: 1. It embeds hardware similar to a computer. Figure 1.1 shows the units in the hardware of an embedded system. As its software usually embeds in the ROM or flash memory, it usually do not need a secondary hard disk and CD memory as in a computer 2. It embeds main application software. The application software may concurrently perform a series of tasks or processes or threads 3. It embeds a real-time operating system (RTOS) that supervises the application software running on hardware and organizes access to a resource according to the priorities of tasks in the system. It provides a mechanism to let the processor run a process as scheduled and context-switch between the various processes. (The concept of process, thread and task explained later in Sections 7.1 to 7.3.) It sets the rules during the execution of the application software. (A small-scale embedded system may not embed the RTOS.) Characteristics An embedded system is characterized by the following; (1) Real-time and multirate operations define the ways in which the system works, reacts to events, interrupts and schedules the system’s functioning in real time. It does so by following a plan to control latencies and to meet deadlines. (Latency refers to the waiting period between running the codes of a task or interrupt service routine and the instance at which the need for the task or interrupt from an event arises). The different operations may take place at
  • 21. Introduction to Embedded Systems Input Devices Interfacing/ Driver Circuits Program Memory and Data Memory Serial Communi­ cation Ports Parallel Ports Outputs Interfacing/ Driver Circuits Fig. 1.1 The components of embedded system hardware distinct rates. For example, audio, video, data, network stream and events have different rates and time constraints. (2) Complex algorithms. (3) Complex graphic user interfaces (GUIs) and other user interfaces. (4) Dedicated functions. Constraints An embedded system is designed keeping in view three constraints: (I) available system­ memory, (2) available processor speed, (3) the need to limit power dissipation when running the system continuously in cycles of ‘wait for events', ‘run', ‘stop’, ‘wake-up' and ‘sleep’. The system design or an embedded system has constraints with regard to performance, power, size and design and manufacturing costs. 1.2 PROCESSOR EMBEDDED INTO A SYSTEM A processor is an important unit in the embedded system hardware. It is the heart of the embedded system. Knowledge ofbasic concept of microprocessors and microcontrollers is must for an embedded system designer. A reader may refer to a standard text or the texts listed in the ‘References’ at the end of this book for an in- depth understanding of microprocessors, microcontrollers and DSPs that are incorporated in embedded system design. Chapter 2 will explain 8051 and a few processors. 1.2.1 Embedded Processors in a System A processhas two essential units: Program Flow Control Unit (CU) and Execution Unit (EU). The CU includes a fetch unit for fetching instructions from the memory. The EU has circuits that implement the instructions pertaining to data transfer operations and data conversion from one form to another. The EU includes the Arithmetic and Logical Unit (ALU) and also the circuits that execute instructions for a program
  • 22. 0 Embedded Systems control task, say, halt, interrupt, or jump to another set of instructions. It can also execute instructions for a call or branch to another program and for a call to a function. A processor runs the cycles of fetch-and-cxccute. The instructions, defined in the processor instruction set, are executed in the sequence that they are fetched from the memory. A processor is in the form of an [C chip; alternatively, it could be in core form in an Application Specific Integrated Circuit (ASIC) or System on Chip (SoC). Core means a part of the functional circuit on the Very Large Scale Integrated (VLSI) chip. An embedded system processor chip or core can be one of the following. 1. General Purpose Processor (GPP): A GPP is a general-purpose processor with instruction set designed not specific to the applications. (a) Microprocessor. [Section l.2.2| (b) Embedded Processor [Section 1.7.7] 2. Application Specific Instruction-Set Processor (ASIP). An ASIP is a processor with an instruction set designed for specific applications on a VLSI chip. (a) Microcontroller [Section I.2.3J (b) Embedded microcontroller [Section 1.7.7] (c) Digital Signal Processor (DSP) and media processor [Section 1.7.3] (d) Network processor, IO processor or domain-specific programmable processor 3. Single Purpose Processors as additional processors: Single purpose processor examples are as follows: (1) Coprocessor (e.g., as used forgraphic processing, floating point processing, encrypting, deciphering, discrete cosine transformation and inverse transformation or TCP/IP protocol stacking and network connecting functions). (2) Accelerator(e.g., fava codes accelerator). (3) Controllers (e.g., for peripherals, direct memory accesses and buses). [Section 1.7.7] 4. GPP or ASIP cores integrated into either an ASIC or a VLSI circuit or a Field Programmable Gate Array (FPGA) core integrated with processor units in a VLSI (ASIC) chip. [Sections 1.6 and 1.7] 5. Application Specific System Processor (ASSP). [Section 1.7.9] 6. Multicore processors or multiprocessor [Section 1.7] For a system designer, the following are important considerations when selecting a processor: 1. Instruction set 2. Maximum bits in an operand (8 or 16 or 32) in a single arithmetic or logical operation 3. Clock frequency in MHz and processing speed in Million Instructions Per Second (MIPS) or in an alternate metric Dhrystone for measuring processing performance [Section 2.6] 4. Processor ability to solve complex algorithms while meeting deadlines for their processing A microprocessor or GPP is used because: (i) processing based on the instructions available in a predefined general purpose instruction set results in quick system development, (ii) Once the board and I/O interfaces are designed for a GPP, these can be used for a new system by just changing the embedded software in the ROM. (iii) Ready availability of a compiler facilitates embedded software development in high-level languages, (iv) Ready availability of well-tested and debugged processor-specific APIs (Application Program Interfaces) and codes previously designed for other applications results in new systems developed quickly. 1.2.2 Microprocessor The CPU is a unit that centrally fetches and processes a set ofgeneral-purpose instructions. The CPU instruction set includes instructions for data transfer operations, ALU operations, stack operations, IO operations and
  • 23. Introduction to Embedded Systems 7 program control, sequencing and supervising operations. The general-purpose instruction set is always specific to a specific CPU. Any CPU must possess the following basic functional units: I. A control unit that fetches and controls the sequential processing of a given command or instruction and communicates with the rest of the system. 2. An ALU that undertakes arithmetic and logical operations on bytes or words. It may be capable of processing 8, 16, 32 or 64-bit words at an instant. A microprocessor is a single VLSI chip that has a CPU and may also have some other units (e.g., caches, floating point processing arithmetic unit, pipelining and superscaling units) that are additionally present and that result in faster processing of instructions. The earlier generation microprocessor’s fetch-and-execute cycle was guided by a clock frequency of the order of -4 MHz. Processors now operate at a clock frequency of 4 GHz and even have multiple cores. In early 2002, it became possible to design Gbps (Giga bit per second) transceiver and encryption engines in a few highly sophisticated embedded systems using processors that operate on GHz frequencies. A transceiver is a transmitting cum receiving circuit that has appropriate processing and controls units, for example, for controlling bus-collisions. An encryption engine is a system that encrypts the data to be transmitted on the network. Intel 80x86 (also referred as x86) processors are the 32-bit successors of 8086. [The r here refers to an 8086 extended for 32 bits.] Examples of 32-bit processors in 80x86 series are Intel 80386,80486 and Pentiums' (a new generation of32- and 64-bit microprocessors is the classic Pentium series). IBM PCs use 80x86 series and the embedded systems incorporated inside the PC for specific tasks (like graphic accelerator, disk controllers, network interface card) use these microprocessors. High performance processors have pipeline and superscalar architecture, fast ALUs and Floating Point Processing Units (FLPUs). [A pipeline architecture means that the instructions have between 3 and 9 stages. Different instructions are at different stages of the pipeline at any given instance. A superscalar architecture refers to two or more sets of instructions executing in parallel pipelines.] The important microprocessors used in the embedded systems are ARM, 68HCxxx, 80x86 and SPARC family of microprocessors. Section 1.7 will describe the embedding of a microprocessor GPP in complex systems. A microprocessor is used as general-purpose processor when large embedded software has to be located in the external memory chips. 1.2.3 Microcontroller A microcontroller is an integrated chip that has processor, memory and several other hardware units in it; these form the microcomputer part of the embedded system. Figure 1.2 shows the functional circuits' present (in solid boundary boxes) in a microcontroller. It also shows the application-specific units (in dashed boundary boxes) in a specific version of a given microcontroller family. Just as a microprocessor is the most essential part of a computing system, a microcontroller is the most essentia) component of a control or communication circuit. A microcontroller is a single-chip VLSI unit (also called ‘microcomputer^), wb/^h, though having limited computational capabilities, possesses enhanced input­ output capabilities and a number of on-chip functional units. [Refer to Section 1.3 for various functional hardware units.] Microcontrollers are particularly suited for use in embedded systems for real-time control applications with on-chip program memory and devices.
  • 24. Embedded Systems Functional Circuits in a Chip or Core of Microcontroller (Microcomputer) Fig-1-2 Various functional circuits (solid boundary boxes) in a microcontroller chip or core in an embedded system. Also shown are the application-specific units (dashed boundary boxes) in a specific version of a microcontroller A few of the latest microcontrollers also have dual core and high computational and superscalar processing capabilities. Important microcontroller chips for embedded systems are 8051,8051 MX, 68HC1 Ixx, HC12xx, HCloxx, PIC 16F84 or I6C76, 16F876 and PIC18, microcontroller enhancements of ARM9/ARM7 from ARM, Intel, Philips, Samsung and ST microelectronics. Figure 1.3 shows commonly used microcontrollers in small-, medium- and large-scale embedded systems. Choosing a microcontroller as a processing unit depends upon the application-specific features in it. A microcontroller is used when a small or part of the embedded software has to be located in the internal memory and when on-chip functional units such as the interrupt-handler, port, timer, ADC, PWM and CAN controller are required. 1.2.4 Single Purpose Processors Single purpose processors used in embedded systems include: 1. Coprocessor (for example, for floating point processing).
  • 25. Fig. 1.3 Commonly used microcontrollers in small-, medium- and large-scale embedded systems 2. Graphics processor: An image consists ofa numberof pixels. Forexample. Quartercommon intermediate format—Quarter-CIF images have 144 x 176 (horizontal x-axis x vertical y-axis) pixels. Video frames have 525 x 625 pixels. The video graphic adapter (VGA) format of e-mailing and web pages has 640 x 480 = 307,200 pixels. A separate graphics processor is required for functions such as, forexample, gaming, display from graphics memory buffers and to move (translate on screen) and rotate an image or its segments. 3. Pixel coprocessor: High-resolution pictures have formats: 2592 x 1944 pixels = 5,038,848 pixels; 2592 x 1728 = 3.2 M; 2048 x 1536 = 3 M and 1280 x 960 = I M. A pixel coprocessor is required in digital cameras for displaying images directly or after operations such as rotate right, rotate-left, rotate- up, rotate-down, shift to next, shift to previous. 4. Encryption engine: A suitable algorithm runs in this processor to encrypt data for secure transmission. 5. Decryption engine: A suitable algorithm runs in this processor to decrypt the encrypted data at receiver’s end. 6. A discrete cosine transformation (DCT) and inverse transformation (DCIT) processor is required in speech and video processing. 7. Protocol stack processor: A protocol stack, which has a number of header words, is prepared before an application data is sent to a network. At the receiver’s end, the protocol stack is received and application data is accepted accordingly. A TCP/IP protocol stack processor processes TCP/IP network data. 8. Network processor: A network processor’s functions are to establish a connection, finish, send and receive acknowledgements, send and receive retransmission requests and check and correct received data frame errors. The network processor’s functions include all protocol stack-processing functions. 9. Accelerator (for example, Java codes accelerator). The accelerator is a coprocessor that accelerates computations by taking advance actions that are just-in-time.comp^ations of the next object in Java programs. 10. CODEC (Coder and Decoder): A CODEC is a processor circuit that encodes input and decodes the encoded information or bits or signals into a complete set of bits or original signal. Voice, speech,
  • 26. ^"ioj Embedded Systems image, video signals and bits are encoded for storing or transmission and decoded from the stored or received bits or signal for display or playing. The CODEC functions as a compression and decompression unit for voice, speech, image or video signals. 11. JPEG CODEC: This is a processor for jpg compression and decompression. The Joint Photographic Experts Group (JPEG) is an International Telecommunication Union for Telecom (ITU-T) and International Standards Organisation (ISO) committee. 12. MPEG CODEC: The Motion Pictures Experts Group (MPEG) recommends CODEC standards for video. MPEG3 CODEC is a processor for mp3 compression and decompression. MPEG 2 or 3 or 4 compression of audio/video data streams is done before storing or transmitting, and decompression is done before retrieving or playing files. For MPEG compression and decompression algorithms, if GPP-embedded software is run, then separate DSPs are required to achieve real-time processing. 13. Controller (e.g„ for peripheral, direct memory access or bus). Single purpose processors are used forspecific applications or computations or as controllers for peripherals, direct memory accesses and buses. " 1.3 EMBEDDED HARDWARE UNITS AND DEVICES IN A SYSTEM 1.3.1 Power Source Most systems have a power supply of their own. The Network Interface Card (NIC) and Graphic Accelerator are examples of embedded systems that do not have their own power supply and connect to PC power­ supply lines. The supply has a specific operation range or a range of voltages. Various units in an embedded system operate in one of the following four power ranges: 5.0 V + 0.25 V, 3.3 V + 0.3 V, 2.0 V + 0.2 V and 1.5 V + 0.2 V. There is generally an inverse relationship between propagation delay in the gates and operational voltage. Therefore, the 5 V system processor and units are used in most high performance systems. Certain systems do not have a power source of their own: they connect to external power supply or are powered by the use of charge pumps (made up of a circuit of diode and capacitor that accumulate charge from the bus signals through which they connect or network to the host or from wireless radiation). Low voltage operations I. In portable or hand-held devices such as a cellular phone [when compared to 5 V, a CMOS 2 V circuit power dissipation reduces by one-sixth, - (2 V/5 V)2. This also increases the time intervals needed for recharging a battery by a factor of six.]. 2. In a system with smaller overall geometry, low voltage system processors and IO circuits generate lesser heat and thus can be packed into a smaller space. A power supply source or a charge pump is essential in every system. *1.3.2 Clock Oscillator Circuit and Clocking Units The clock controls the time for executing an instruction. After the power supply, the clock is the basic unit of a system. A processor needs a clock oscillator circuit. The clock controls the various clocking requirements of
  • 27. Introduction to Embedded Systems I 11 j the CPU, of the system timers and the CPU machine cycles. The machine cycles are for fetching codes and data from memory and then decoding and executing them at the processor and for transferring the results to memory. For processing units, a highly stable oscillator is required and the processor clock-out signal provides the clock for synchronizing all system units with the processor. 1.3.3 System Timers and Real-time Clocks A timer circuit is suitably configured as the system-clock, which ticks and generates system interrupts periodically; for example, 60 times in is. The interrupt service routines then perform the required operation. A timercircuit is suitably configured as the real-time clock (RTC) that generates system interrupts periodically for the schedulers, real-time programs and for periodic saving of time and date in the system. The RTC or system timer is also used to obtain software-controlled delays and time-outs. An RTC functions as driver for software timers (SWTs). [Sections 3.6 and 3.8] Microcontrollers also provide internal timer circuits for counting and timing devices. To schedule the various tasks and for real-time programming, an RTC or system clock is needed. The clock also drives the timers for various timing and counting needs in a system, 1.3.4 Reset Circuit, Power-up Reset and Watchdog-Timer Reset The program counter (PC) holds the address from where the instruction is to be fetched for execution. In 80x86 processors, the instruction pointer (IP) holds that address. A code segment register (CS) holds the base address of the code memory segment. The CS address equals the code starting address when the IP = 0 at the start of a code segment. The IP increments when the program executes the codes. Reset means that the processor begins the processing of instructions from a starting address. That address is one that is set by default in the processor PC (or IP and CS in x86 processors) on a power-up. From that address in memory, program-instructions are fetched following the reset of the processor. A program that is reset and runs on a power-up can be one of the following: (i) A system program that executes from the beginning, (ii) A system boot-up program, (iii) A system initialization program. In certain processors, for example, 68HCII and HCI2, there are two start-up addresses. One is based on the power-up reset vector and the other on the reset vector after the reset instruction or after a time-out (for example, from a watchdog timer). The processor fetches the bytes for the PC from the first power-up reset vector on power-up. The processor fetches the bytes for the PC from the second reset vector on the watchdog timer timing out or on executing the reset instruction. The reset circuit activates for a fixed period (a few clock cycles) and then deactivates. The processor circuit keeps the reset pin active and then deactivates to let the program proceed from a default beginning address. The reset pin or the internal reset signal, if connected to the other units (for example, the IO interface or the serial interface) in the system, is activated again by the processor; it become,s_an ongoing pin to enforce a reset state in other sister units of the system. On deactivation ofthe reset that succeeds the processoractivation, a program executes from a start-up address. Reset can be activated by an external reset circuit that activates on power-up, on switching-on reset of the system or on detection of a low voltage (e.g. <4.5 V when what is required is 5 V on the system
  • 28. 12 Embedded Systems supply rails). This circuit output connects to a pin called the reset pin of the processor. This circuit may be a simple RC circuit, an external IC circuit or a custom-built IC. Examples of ICs are MAX 6314 and Motorola MC 34064. Alternatively, it can also be activated by any one of the following: (i) software instruction; (ii) time-out by a programmed timer known as a watchdog timer (or on an internal signal called COP in 68HC11 and 68HCI2 families); (iii) a clock monitor detecting a slowdown below certain frequencies. The watchdog timer is a timing device that resets the system after a predefined timeout. It is activated within the first few clock cycles after power-up. It has a number of applications. In many embedded systems reset by a watchdog timer is very essential because it helps in rescuing the system ifa fault develops and the program gets stuck. On restart, the system can function normally. Most microcontrollers have on-chip watchdog timers. The watchdog timer device is described in detail in Section 3.7. Consider a system controlling temperature. Assume that when the program starts executing, the sensor inputs work all right. However, before the desired temperature is achieved, the sensor circuit develops some fault. The controller will continue delivering the current nonstop if the system is not reset. Consider another example of a system for controlling a robot. Assume that the interfacing motor control circuit in the robot arm develops a fault during the run. In such cases, the robot arm may continue to move unless there is a watchdo" timer control. Otherwise, the robot will break its own arm! When a program executes the program counter increments or changes. An important circuit that associates a system is its reset circuit that can change the program counter to a power-up default value A progr im that is reset and runs on a power-up can be one of the following: (i) A system program that executes from the beginning, (u) A system boot-up program, (iii) A system initialization program. The watchdog timer reset is a required feature in control applications. 1.3.5 Memory In a system, there are various types of memory. Figure 1.4 shows a chart for various forms of memory that are present in systems. These are as follows: I. Internal RAM of 256 or 512 bytes in a microcontroller for registers, temporary data and stack. 2. Internal ROM/PROM/E2PROM for about 4 kB to 64 kB of program (in the case of microcontrollers). 3. External RAM for the temporary data and stack (in most systems) or internal caches (in the case of certain microprocessors). Various Forms of System Memory 1 Internal RAM at Micro­ controller 1 RAM at System- on- Chip or External RAM 1 Internal Caches at Microprocessor [Hold Copies of System Memory- ,th pages] 1 External RAM Chip(s) 1 Flash/ EEPROM 1 ROM/ PROM Memory Addresses at External and/or Internal the System Ports Fig. 1.4 The various forms of memories in the system
  • 29. r~~t Introduction to Embedded Systems 13 j 4. Internal Hash (in many systems the results ofprocessing can be saved in nonvolatile memory: lor example, system status periodically and images, songs, or speeches alter suitable formal compression). 5. Memory stick (or card): video, images, songs, or speeches and large storage in digital camera and mobile systems. Sony memory stick Micro (M2) is of size 15x12.5x1.2 mm and has a flash memory of 2 GB. Il has a data transfer rale of 160 Mbps (mega bit per second) and PRO-HG 4X0 Mbps and 120 Mbps write | since Dec. 2006. | 6. External ROM or PROM for embedding software (in almost all systems other than microcontroller- based systems). 7. RAM memory buffers al ports. 8. Caches (in pipelined and superscalar microprocessors). Table 1.1 details the functions assigned in embedded systems to the memories. ROM or PROM or EPROM embeds the software specific to the system. Table 1.1 Functions assigned to the memories in a system Memory Needed Functions ROM or EPROM or flash Storing application programs from where the processor fetches the instruction codes. Storing codes for system booting, initializing, initial input data and strings. Codes for RTOS. Pointers (addresses) of various interrupt service routines (ISRs). RAM (internal and external) and RAM for buffer Storing the variables during program run and storing the stack. Storing input or output buffers, for example, for speech or image. Memory slick A flash memory stick is inserted in mobile computing system or digital-camera. It stores high definition video, images, songs, or speeches after a suitable formal compression and stores large persistent data. EEPROM or Flash Storing nonvolatile results of processing. Cache Storing copies of instructions and data in advance from external primary memory and storing the results temporarily during processing. A system embeds (locates) the following either in the internal flash or ROM, PROM or in an external flash or ROM or PROM of the microcontroller: boot-up program, initialization data, strings or pictogram for screen-display or initial state of the system, programs for various tasks, ISRs and operating system kernel. The system has RAMs for saving temporary data, stack and buffers that are needed during a program run. The system uses flash for storing nonvolatile results. 1.3.6 Input, Output and IO Ports, IO Buses and IO Interfaces The system gets inputs from physical devices through the input ports. Examples arc as follows: I. A system gets inputs from the touch screen, keys in a keypad or keyboard, sensors and transducer circuits. 2. A controller circuit in a system gets inputs from the sensor and transducer circuits. 3. A receiverofsignals ora networkcard gets the input from acommunication system. |A communicalion system could be a fax or modem, or a broadcasting serviced 4. Ports receives inputs from a network or peripheral.
  • 30. 0 Embedded Systems Consider the system in an Automatic Chocolate Vending Machine. It gets inputs from a port that collects the coins that a child inserts. Consider the system in a mobile phone. A user inputs the mobile number through the buttons, directly or indirectly (through recall of the number from its memory). Keypad keys connect to the system through an input port. A processor identifies each input port by its memory buffer addresses, called port addresses. Just as a memory location holding a byte or word is identified by an address, each input port is also identified by the address. The system gets the inputs by the read operations at the port addresses. The system has output ports through which it sends output bytes to the real world. Examples are as follows: 1. Output may be sent to an light emitting diode (LED), liquid crystal display (LCD) or touch screen display panel. For example, a calculator or mobile phone system sends the output-numbers or an SMS message to the LCD display. 2. A system may send the output to a printer. 3. Output may be sent to a communication system or network. 4. A control system sends the outputs to alarms, actuators, furnaces or boilers. 5. A robot is sent output for its various motors. Each output port is identified by its memory-buffer addresses (called port addresses). The system sends the output by a write operation to the port address. There are also general-purpose ports for both the input and output (10) operations. For example, a mobile phone system sends output as well as gets input through a wireless communication channel. A mobile computing system touch screen system sends output as well as gets input when a user touches the menu displayed or key on the screen. Each 10 port is also identified by an address to which the read and write operations both take place. Ports can have serial or parallel communication with the system address and data buses. In serial communication a one-bit data line is used and bits are sent serially in successive time slots. Universal Asynchronous Receiver and Transmitter (UART) is a popular communication protocol for serial communication. In parallel communication, several data lines are used and bits are sent in parallel. A system port may have to send output to multiple channels. A demultiplexer or multiplexer circuit is then used. A demultiplexer is a digital circuit that sends digital outputs at any instance to one of the provided channels. The channel to which the output is sent is the one that is addressed by the channel address bits at the demultiplexer input. A demultiplexer takes the input and transfers it to a select channel output among the multiple output channels. A multiplexer is a digital circuit that receives digital inputs at any instance from multiple channels, and sends data output only from a specific channel at an instance. The channel address bits are at multiplexer input. A multiplexer takes the input from one among the multiple input channels and transfers a selected channel input to the output. A system unit (for example, memory unit or 10 port or device) may have to be selected from among the multiple units in the system and activated. A decoder circuit when used as an address decoder decodes the input addresses and activates the selected output channel from among the many outputs. For example, there are 8 units of which one has to be selected. An address-select input of 3 bits is input to the decoder. Based on the input address, the output select line among the 8 activates. If the input address bit is 000, then the 0lh output is active and the 0lh unit activates. If the input address bit is I l-i'f the.'J*ihe 7th output is active and the 7lh unit activates. Bus A system might have to be connected to a number of other devices and systems. A bus consists of a common set of lines to connect multiple devices, hardware units and systems for communication between any
  • 31. Introduction to Embedded Systems 15 ____ > two of these at any given instance. A bus communication protocol specifies how signals communicate on the bus. A bus may be a serial or parallel bus that transfers one or multiple data bits at an instance, respectively. The protocol also specifies the following: (i) ways of arbitration when several devices need to communicate through the bus; (ii) ways of polling bus requirement from each device at an instance; (iii) ways of daisy chaining the devices so that bus is granted to a device according to the device-priority in the chain. For networking the distributed units or systems, there are different types ofserial and parallel bus protocols: PC. CAN, USB, (SA, EISA and PCI. For wireless networking of systems there are 802.11, IrDA, Bluetooth and ZigBee protocols. Chapter 3 will describe the ports, devices, buses and protocols in detail. A system connects to external physical devices and systems through parallel or serial I/O ports. Demultiplexers and multiplexers facilitate communication of signals from multiple channels through a common path. A system often networks to the other devices and systems through an I/O bus: for example, PC, CAN. USB, ISA, EISA and PCI bus. 1.3.7 DAC Using a PWM and an ADC DAC is a circuit that converts digital 8 or 10 or 12 bits to the analog output. The analog output is with respect to the reference voltage. When all input bits are equal to I. then the analog output is the difference between the positive and negative reference pin voltages; when all input bits equal 0, then the analog output equals -ve reference pin voltage (usually 0 V). Suppose a system needs to give the analog output of a control circuit for automation. The analog output may be to a power system for d.c. motor or furnace. A pulse width modulator (PWM) with an integrator circuit is used for the DAC. A PWM unit in the microcontroller operates as follows: Pulse width is made proportional to the analog-output needed. PWM inputs are from 00000000 to 11111111 for an 8-bit DAC operation. The PWM unit outputs to an external integrator, which provides the desired analog output. From this information, the formula to obtain the analog output from the bits in a given PWM register with bits ranging from 00000000 to 11111111 is as follows: Analog output V = K-pw. where K is constant and pw is the pulse width. Suppose a circuit (external to the microcontroller) gives an output of 1.024 V when the pulse width is 50% of the total pulse time period, and 2.047 V when the width is 100%. When the width is made 25%. by reducing by half the value in the PWM output control-register, the integrator output will become 0.512 V. The constant K depends on integrator amplifier gain. Assume that the integrator operates with a dual (plus-minus) supply. The PWM unit in the microcontroller operates by another method, which is as follows. Assume that when an integrator circuit gives an output of 1.023 V. the pulse width is 100% of the total pulse time period and of-1.024 V when the width is 0%. When the width is made 25% by reducing by halfthe value in an output control register, the integrator output will be 0.512 V; at 50% the output will be 0.0 V. From this information, the formula to obtain the analog output from the bits in a given PWM register ranging from 00000000 to 11111111 in both situations is as follows: Analog ; output V = 0.01. K'. (pw - 50), where K' is constant and pw is pulse width time in percentage with respect to pulse time period. K' depends on integrator amplifier gain. r Analog to Digital Converter ADC is a circuit that converts the analog input to digital 4, 8, 10 or 12 bits. The analog input is applied between the positive and negative pins and is converted with respect to the 1 reference voltage. When input is equal to difference of reference positive and negative voltages, then all i! output bits equal 1; when equals negative reference voltage (usually 0 V), then all output bits equal 0.
  • 32. 16 j Embedded Systems The ADC in the system microcontroller can be used in many applications such as data acquisition systems (DAS), digital cameras, analog control systems and voice digitizing systems. Suppose a system gels the analog inputs from sensors of temperature, pressure, heart-beats and other sources in a DAS. Suppose a system gels the analog inputs from a digital camera. It has CCD (Charge Couple Device) which has tiny pixels that charge up on exposure to light. The charging of each pixel depends upon the light intensity at that point in the image. The analog inputs to lhe system generate from each pixel. Each pixel's analog input has to be converted into bits to enable processing in the next stage. Suppose a system needs to read an analog input from a sensor or transducer circuit. If converted to bits by lhe ADC unit in the system, then these bits, after processing, can also give an output. This provides a control for automation by a combined use of ADC and DAC features. The convened bits can be given to the port meant for digital display. The bits may be transferred to a memory address, a serial port or a parallel port. A processor may process the converted bits and generate a Pulse Code Modulated (PCM) output. PCM signals are used to digitize voice into a digital format. Important points about the ADC are as follows. I. Either a single or dual analog reference voltage-source is required in the ADC. It sets either the analog input’s upper limit or the lower and upper limits both. For a single reference source, the lower limit is set to 0 V (ground potential). When the analog input equals the lower limit, the ADC generates all bits as Os. and when it equals the upper limit it generates all bits as Is. | As an example, suppose in an ADC the upper limit or reference voltage is set to 2.255 V. Let the lower limit reference voltage be 0.255 V. The difference in the limits is 2 V. Therefore, the resolution will be 2/256 V. If the 8-bit ADC analog­ input is 0.255 V, the converted 8 bits will be 00000000. When the input is 0.255 V + 1.000 V = 1.255 V, the bits will be 10000000. When the analog input is 0.255 V + 0.50 V, the converted bits will be 01000000. [From this information, finding a formula io obtain converted bits for a given analog input = v volt is as follows: Binary number n bits after conversion in an n-bit ADC corresponds to decimal number N. Then N = v. (V|C|+ - V rcr_)/2". Here. Vld+ is the reference voltage that gives ail the bits that are equal to I and Vrc|- is the reference voltage that gives all lhe bits that are equal Io 0. [ 2. An ADC may be of 8. 10, 12, or 16 bits depending upon the resolution needed for conversion. 3. The start of the conversion (STC) signal or input initiates the conversion to 8 bits. In a system, an instruction or a timer signals the STC. 4. There is an end of conversion (EOC) signal. A flag in a register is set to indicate the end of conversion and the ADC generates an interrupt: the ISR reads the ADC bits and saves them in the memory buffer. 5. There is a conversion time limit in which the conversion is definite. 6. A Sample and Hold (S/H) unit is used to sample the input for a fixed time and hold till conversion is over. An ADC unit can be repeatedly used after the intervals equal to the conversion time. Therefore, one can digitizes the DAS sensor signals, CCD signals, voice, music or video signals, or heart beat sensor signals in different systems. An ADC unit in an embedded system microcontroller may have multichannels. It can then take the inputs in succession from the various pins interconnected to different analog sources. For automatic control and signal processing applications, a system provides necessary interfacing circuit and software for the Digital to Analog Conversion (DAC) unit and Analog to Digital Conversion (ADC) unit. A DAC operation is done with the help of a combination of a PWM unit in the microcontrollet'and ah external integrator chip. ADC operations are required for data acquisition, image processing, voice processing, video processing, instrumentation and automatic control systems.
  • 33. Introduction to Embedded Systems 17 L_J 1.3.8 LCD, LED and Touchscreen Displays A system requires an interfacing circuit and software to display the status or message for a line, for multiline displays, orfor flashing displays. An LCD screen may show up a multiline display of characters or also show a small graph or icon (called a pictogram). A recent innovation in the mobile phone system turns the screen blue to indicate an incoming call. Third generation system phones have both image and graphic displays. An LCD needs little power. A supply or battery (a solar panel in the calculator) powers it. The LCD is a diode that absorbs or emits light and 3 to 4 V and 50 or 60 Hz voltage-pulses with currents less than -50 pA are required. The pulses are applied with the same polarity on the crystal front and back plane for no light, and with opposite polarity for light. Here, polarity means logic ‘ I' or ‘O'. A display-controller is often used in case of matrix displays. To indicate the ON status of the system, there may be an LED that glows. A flashing LED may indicate that a specific task is under completion or is running or in wait status. The LED is a diode that emits yellow, green, red or infrared light in a remote controller on application of a forward voltage of between 1.6-2 V. It needs cunent up to 12 mA above 5 mA (less in flashing display mode). It is much brighter than the LCD, making it suitable for flashing displays and for displays limited to a few digits. A touchscreen is an input as well as an output device, which can be used to enter a command, a chosen menu or to give a reply. The infomiation is input by physically touching at a screen position using a finger or a stylus. A stylus is thin pencil-shaped object. It is held between the fingers and used just as a pen. The screen displays the choices or commands, menus, dialog boxes and icons. The display-screen display is similar to a computer video display unit screen. Newer touch screen senses the fingers even from proximity, for example, in Apple iPhone. Sections 3.3.4 and 3.3.5 describe the LCD and touchscreen devices and their connections to the system. The system may need the necessary interfacing circuit and software for the output to the LCD display controller and the LED interfacing ports or for the I/Os with the touchscreen. 1.3.9 Keypad/Keyboard The keypad or keyhoard is an important device for gelling user inputs. The system provides the necessary interfacing and key-debouncing circuit as well as the software for the system to receive input from a set of keys, from a keyboard, keypad or virtual keypad. A touchscreen provides for a virtual keypad in a mobile computing system. A virtual keypad is a keypad displayed on the touch screen where the user can enter the keys using a stylus or finger. A keypad has upto a maximum of 32 keys. A keyboard may have 104 keys or more. The keypad or keyboard may interface serially or parallelly to the processor directly through ports or through a controller. Mobile phones may have a T9 keypad. A T9 keypad has 16 keys and four up-down right-left menu keys. Using 0 to 9 keys text messages, such as SMS messages, are generated. For inputs, a keypad or board may interface to a system. The system provides necessary interfacing circuit and software to receive inputs directly from the keys or through a controller. 1.3.10 Pulse Dialer, Modem and Transceiver For user connectivity through the telephone line, wireless or a network, a system provides the necessary interfacing and circuits. It also provides the software for pulse dialing through the telephone line, for modem
  • 34. I 18 Embedded Systems interconnection for fax. for Internet packets routing and for transmitting and connecting to a wireless cellular system or personal area wireless network. A transceiver is a circuit that can transmit as veil as receive byte streams. In communication system, a pulse dialer, modem or transceiver is used. A system provides the necessary interfacing circuit and software for dialing and for the modem and transceiver, directly or through a controller. 1.3.11 Interrupt Handler A timing device sends a time-out interrupt when a preset time elapses or sends a compare interrupt when the present-time equals the preset time. Assume that data have to be transferred from a keyboard to a printer. A port peripheral generates an interrupt on receiving the input data or when the transmitting buffer becomes empty. Each action generates an interrupt. A system may possess a number ofdevices and the system processor has to control and handle the requirements of each device by running an appropriate 1SR (interrupt service routine) for each. An interrupts-handling mechanism must exist in each system to handle interrupts from variousprocesses andfor handling multiple interrupts simultaneously pending for service. Chapter4 describes in detail the interrupts, ISRs, and their handling mechanisms in a system. Important points regarding the interrupts and their handling by the program are as follows. 1. There can be a number of interrupt sources and groups of interrupt sources in a processor. [Section 4.31 An interrupt may be a hardware signal that indicates the occurrence of an event. [For example, a real-time clock continuously updates a value at a specified memory address; the transition of that value is an event that causes an interrupt.) An interrupt may also occur through timers, through an interrupting instruction of the processor program or through an error during processing. The error may arise due to an illegal op-code fetch, a division by zero result or an overtlow or underflow during an ALU operation. An interrupt can also arise through a software tinier. A software interrupt may arise in an exceptional condition that may have developed while running a program. 2. The system may prioritize sources and service them accordingly. [Section 4.5.| 3. Certain sources are not maskable and cannot be disabled. Some are assigned the highest priority during processing. 4. The processor's current program has to divert to a service routine to complete that task on the occurrence of the interrupt. For example, ifa key is pressed, then an ISR reads the key and stores the key value in the processor memory address. If a sequence of keys is pressed, for instance in a mobile phone, then an ISR reads the keys and also calls a task to dial the mobile number. 5..There is a programmable unit on-chip for the interrupt handling mechanism in a microcontroller. 6. The operating system is expected to control the handling of interrupts and running of routines for the interrupts in a particular application. The system always gives priority to the ISRs over the tasks of an application. A system provides an interrupt handling mechanism for executing the ISRs in case of the interrupts from physical devices, systems, software instructions and software exceptions.
  • 35. Introduction to Embedded Systems 19; 1.4 EMBEDDED SOFTWARE IN A SYSTEM The software is like the brain of the embedded system. 1.4.1 Final Machine Implementable Software for a System An embedded system processor executes software that is specific io a given application of that system. The instruction codes rind data in the final phase are placed in the ROM or flash memory for all the tasks that are executed when the system runs. The software is also called ROM image. Why? Just as an image is a unique sequence and arrangement of pixels, embedded software is also a unique placement and arrangement of bytes for instructions and data. Each code or datum is available only in the bits and bytes’ format. The system requires bytes at each ROM address, according to the tasks being executed. A machine implementable software file is therefore like a table having in each rows the address and bytes. The bytes are saved at each address of the system memory. The table has to be readied as a ROM image for the targeted hardware. Figure 1.5 shows the ROM image in a system memory: The image consists of the boot up program, stacks address pointers, program counter address pointers, application programs. ISRs, RTOS, input data and vector addresses. Interrupt Service I Routine Vector . Addresses of 2 Bytes each I Bootup ; Program j- Codes i Machine Codes; for Real Time i Operating f System (RTOS)j 2 Bytes for j Address of I Stack J" on i Reset ' System ROM Memory 1 2 Bytes for ■ Address from I Where System I Starts Execution on Power Up ' (Not Needed in i 80x86,8051,80196, .. ) Bytes for - . i Data as Inputs for each Interrupt < Service Routine r Machine Specific I Codes for •. each ! Program, ISR - L and Task Fig. 1.5 System ROM memory embedding the software, RTOS, data and vector addresses
  • 36. 0 Embedded Systems Final stage software is also called the ROM image. The final machine implementable software for a product embeds in the once programmable Hash or ROM (or PROM) as an image in a frame. Bytes at each address must be defined io create the ROM image. By changing this image, the same hardware platform will work differently and can be used for entirely different applications or for new upgrades of the same system. 1.4.2 Coding of Software in Machine Codes During coding in this format, the programmer defines the addresses and the corresponding bytes or bits at each address. In configuring some specific physical device or subsystem, machine code-based coding is used. For example, in a transceiver, placing certain machine code and bits can configure it to transmit at specific megabytes per second or gigabytes per second, using specific bus and networking protocols. Another example is using certain codes for configuring a control register with the processor. During a specific code-section processing, the register can be configured to enable or disable use of its internal cache. However, coding in machine implementable codes is done only in specific situations because it is time consuming and the programmer must first have to understand the processor instructions set and then memorize the instructions and their machine codes. 1.4.3 Software in Processor Specific Assembly Language A program or a small specific part can be coded in assemblv /mtguoge using an assembler after understanding the processor and its instruction set. Assembler is software used for developing codes in assembly. Assembly language coding is extremely useful for configuring physical devices like ports, a line-display interface. ADC and DAC and reading into or transmitting from a buffer. These codes are also called low-level codes for the device driver functions. (Sections 1.4.7 and 4.2.4.] They are useful to run the processor or device-specific features and provide an optimal coding solution. Lack of knowledge of writing device driver codes or codes that utilize the processor-specific features- invoking codes in an embedded system design team can cost a lot. A vendor may charge for the APIs and also charge intellectual property fees for each system shipped out of the company. To make all the codes in assembly language may. however, be very time consuming. Full coding in assembly may be done only for a few simple, small-scale systems, such as toys, automatic chocolate vending machines, robots or data acquisition systems. Figure 1.6 shows the process of converting an assembly language program into machine implementable software file and then finally obtaining a ROM image file. 1. An assembler translates the assembly software into the machine codes using a step called assembling. 2. In the next step, called linking, a tinker links these codes with the other codes required. Linking is necessary because of the number of codes to be linked for the final binary file. For example, there are the standard codes to program a delay task for which there is a reference in the assembly language program. The codes for the delay must link with the assembled codes. The delay code is sequential from a certain beginning address. The assembly software code is also sequential from a certain beginning address. Both the codes have to be linked at the distinct addresses as well as at the available addresses in the system. The linked file in binary for run on a computer is commonly known as an executable file or simply an ‘.exe’ file. After linking, there has to be reallocation of the sequences of placing the codes before actually placing the codes in memory.
  • 37. Introduction to Embedded Systems ! 21 I Fig. 1.6 The process of converting an assembly language program into the machine codes and finally obtaining the ROM image 3. In the next step, the loader program performs the task of reallocating the codes after finding the physical memory addresses available at a given instant. The loader is a part of the operating system and places codes into the memory after reading the '.exe' file. This step is necessary because the available memory addresses may not start from 0x0000. and binary codes have to be loaded al different addresses during the run. The loader finds the appropriate start address. In a computer, after the loader loads into a section of RAM. the program is ready to run. 4. The final step of the system design process is locaiing these codes as a ROM image. The codes are permanently placed at the addresses actually available in the ROM. In embedded systems, there is no separate program to keep track oflhe available addresses at different times during the run. as in a computer. In embedded systems, therefore, the next step instead of loader after linking is the use of a locaior. which locates the IO tasks and hardware device driver codes al fixed addresses. Port and device addresses are llxed for a given system as per the interfacing circuit between the system buses and ports or devices. The locator program reallocates the linked file and creates a file fora permanent location of the codes in a standard format. The file formal may be in the Intel Hex file format or Motorola S-record format. The designer has to define the available addresses to locale and create files to permanently locate the codes. 5. Lastly, either (i) a laboratory system, called device programmer, takes as input the ROM image file and finally burns the image into the PROM or flash or (ii) at a foundry, a mask is created for the ROM of the embedded system from the ROM image file. |The process of placing the codes in PROM or flash is also called burning. | The mask created from the image gives the ROM in 1C chip form. To configure some specific physical device or subsystem such as the transceiver, machine codes can be used straightaway. For physical device driver codes or codes that utilize processor-specific features-invoking codes, ‘processor-specific’ assembly tahgua^b is used. A file is then created in three steps using an Assembler, Linker and Locator. The file has the ROM image in a standard format. A device programmer finally bums the image in the PROM or EPROM. A mask created from the image gives the ROM in IC chip form.
  • 38. Embedded Systems 1.4.4 Software in High Level Language Since the coding in assembly language is very lime consuming in most cases, software is developed in a high- level language, ‘C’ or ‘C++’ or visual C++ or Java' in most cases. ‘C’ is usually the preferred language. The programmer needs to understand only the hardware organization when coding in high level language. As an example, consider the following problem. Example 1.1 Add 127, 29 and 40 and print the square root. An exemplary C language program for all the processors is as follows, (i) # include <stdio.h> (ii) # include <math.h> (iii) void main (void) { (iv) int i1. i2, i3. a; float result', (v) il = 127; i2 - 29; i3 = 40; a = il + i2 + i3; result = sqrt (a): (vi) printf(result);) The coding for square root will need many lines of | ........ —~ code and can be done only by an expert assembly Preprocessor Commands language programmer. To write the program in a high .. . ~ ~ level language is very simple compared to writing it in ----------------------i-------------------- assembly language. ‘C‘ programs have a feature that Interrupt Service Routines adds the assembly instructions when using certain Tasks 1 N processor-specific features and coding for a specific ------------------------------------------ section, for example, a port device driver. Figure 1.7 Kernel and Scheduler shows the different programming layers in a typical Standard Library embedded ‘C’ software. These layers are as follows. Functions Including (i) Processor Commands, (u) Main Function. Functions for j (iii) Interrupt Service Routine, (iv) Multiple tasks, say. Sending Stack and I 1 to N. (v) Kernel and Scheduler, (vi) Standard library Receiving Stack _____ i j functions, protocol handling and stack functions. - ----------------------------------------------: Figure 1.8 shows the process of converting a Fig 17 The different program |ayers in the C program into the ROM image file. A compiler embedded software in C generates the object codes. It assembles the codes according to the processor instruction set and other specifications. The C compiler for embedded systems must, as a final step of compilation, use a code-optimizer that optimizes the codes before linking. After compilation, the linker links the object codes with other needed codes. For example, the linker includes the codes for the functions printf and sep t codes. Codes for device and driver (device control codes) management also link at this stage: for example, printer device management and driver codes. After linking, the other steps for creating a file for ROM image are the same as shown earlier in Figure 1.6. Preprocessor Commands Main Function Interrupt Service Routines Kernel and Scheduler Standard Library Functions Including Network Protocol Functions for Sending Stack and Receiving Stack Tasks 1....N C, C++, Java, Visual C++ are the languages used for software development. A C program has various layers: processor commands, main function, task and library functions, interrupt service routines and kernel (scheduler). The compiler generates an object file. Using a linker and locator, the file for the ROM image is created for the targeted hardware.
  • 39. Introduction to Embedded Systems Fig. 1.8 The process of converting a C program into the file for ROM image 1,4.5 Program Models for Software Designing The program design task is simplified if a program is modeled. The different models that are employed during the design processes ofthe embedded software are as follows: I. Sequential Program Model 2. Object Oriented Program Model 3. Control and Data flow graph or Synchronous Data Flow (SDF) Graph or Multi Thread Graph (MTG) Model 4. Finite State Machine for data path 5. Multithreaded Model for concurrent processing of processes or threads or tasks UML (Universal Modeling language) is a modeling language for object oriented programming. These models are explained Chapter 6. 1.4 fi Software for Concurrent Processing and Scheduling of Multiple Tasks and ISRs Using an RTOS An embedded system program is most often designed using multiple processes or multitasks or a multithreads. | Refer to Sections 7.1 to 7.3 for definitions and understanding of the processes, threads and tasks. | The multiple tasks are processed most often by the OS not sequentially but concurrently. Concurrent processing tasks can be interrupted for running the ISRs, and a higher priority task preempts the running of lower priority tasks. An OS provides for process, memory, devices, 10s and file system management. A file system specifies the ways in which a file is created, called, named, used, copied, saved or deleted, opened and closed. File system is the software for using the files on a disk, flash memory, memory card or memory stick. OS software have scheduling functions for all the processes (tasks, ISRs and device drivers) in the system. Since the running of the tasks and ISRs may have real time constraints and deadlines for finishing the tasks, an RTOS is required in an embedded system. The RTOS provides the OS functions for coding the system, provides interprocess communication functicjis an,'/hcontrols the passing of messages and signals to a task. RTOS functions are highly complex. There are a number of popular and readily available RTOSs. Chapters 8 to 12 describes the RTOS functions and examples of applications in the embedded systems.
  • 40. 24 Embedded Systems RTOS is used in most embedded systems and the system does concurrent processing of multiple tasks when the tasks have real time constraints and deadlines,. 1.4.7 Software for Device Drivers and Device Management in an Operating System An embedded system is designed to perform multipie functions and has to control multiple physical and virtual devices. In an embedded system, there may be number ofphysicaldevices. Exemplary physical devices arc timers, keyboards, display, flash memory, parallel ports and network cards. A program is also be developed using the concept of virtual devices. Examples of virtual devices are as follows. I. A file (of records opened, read, written and closed, and saved as a stream of bytes or words) 2. A pipe (for sending and receiving a stream of bytes from a source to destination) 3. A socket (for sending and receiving a stream of bytes between the client and server software and between source and destination computing systems) 4. A RAM disk (for using the RAM in a way similar to files on (he disk) A file is a data structure (or virtual device) which sends the records (characters or words) to a data sink (for example, a program function) and which stores the data from the data source (for example, a program function). A tile in a computer may also be stored in the hard disk and in Hash memory in embedded system. The term virtual device follows from the analogy that just as a keyboard gives an input to the processor for a read, a tile also gives an input to the processor. The processor gives an output to a printer for a write. Similarly, the processor writes an output to the file. A device for the purpose of control, handling, reading and writing actions can be taken as consisting of three components, (i) A control register or word that stores the bits that, on setting or resetting by a device driver, control device actions, (ii) A status register or word that provides the flags (bits) to show the device status to the device driver, (iii) A device mechanism that controls the device actions. There may be input and output data buffers in a device, which may be written or read by a'device driver. Device driver actions are to gel input into or send output from the control registers, input data buffers, output data buffers and status registers of the device. A device driver is software for opening, connecting or binding, reading, writing and closing or controlling actions of the device. It is software written in a high level language. Il controls functions for device open (configure), connect, bind, listen, read or write or close. The device driver executes after lhe programming of the control register (or word) ofa peripheral or virtual device. The programming is called device initialisation or registration or attachment. The driver reads the status register, gets the inputs and writes the outputs. It executes on an interrupt to or from the device. A driver controls three functions, (i) Initializing, which is activated by placing appropriate bits at the control register or word, (ii) Calling an ISR on interrupt or on setting a status flag in the status register and running (driving) the ISR (Interrupt Handler Routine), (iii) Resetting the status fiag after an interrupt service. A driver may be designed for asynchronous operations (multi pie use by tasks one after another) or synchronous operations (concurrent use by the tasks). Using the tuuctions of the OS, a device driver coding can be made such that the underlying hardware is hidden as much as possible. An API then defines the hardware separately. This makes the driver usable when the device hardware changes in a system.
  • 41. . introduction to Embedded Systems A device driver accesses a parallel or serial port, keyboard, mice, disk, network, display, file, pipe and socket at specific addresses. An OS also provides device driver, codes lor system-port addresses and for hardware access mechanisms. A device manager software provide codes for detecting the presence of devices, for initializing these and for testing the devices that are present. The manager includes software for allocating and registering port (in fact, it may be a register or memory) addresses for the various devices al distinctly different addresses, including codes for detecting any collision between these, if any. It ensures that any device accesses to one task only at any given instant. It takes into account that virtual devices may also have addresses that archillocated by lhe manager. An OS also provides and executes modules for managing devices that associate with an embedded system. The underlying principle is that at an instant, only one physical or virtual device should gel access to or from one task only. Sections 4.2.4 and 8.6.1 will describe device drivers and device management in detail. The OS also provides and manages virtual devices such as pipes and sockets. Sections 7.14 and 7.15 describe these in detail. For designing embedded-software, two types of devices are considered: physical and virtual. Physical devices include keypad, printer or display unit. A virtual device could be a file or pipe or socket or RAM disk. Device drivers and device manager software are needed in the system. The RTOS includes device­ drivers and a device manager to control and facilitates the use of the number of physical and virtual devices in the system. 1.4.8 Software Tools for Designing an Embedded System Table 1.2 lists the applications of software tools for assembly language programming, high level language programming. RTOS. debugging and system integration. Tao’? 1.2 Software modules and tools for designing of an embedded system j Sojimire Tools Application Editor For writing C codes or assembly mnemonics using the keyboard of the PC for entering the program. Allows the entry, addition, deletion, insert, appending previously written lines or files, merging record and Illes at the specific positions. Creates a source file that stores lhe edited file. It also has an appropriate name [provided by the programmer]. Interpreter For expression-by-expression (line-by-line) translation to machine-executable codes. Compiler Uses the complete set of codes. It may also include codes, functions and expressions from lhe library routines. It creates a file called object file. Assembler For translating assembly mnemonics into binary opcodes (instructions), that is, into an executable file, called binary file and for making a list file that can be printed. The list file has address, source code (assembly language mnemonics) and hexadecimal object^ codes. The file has addresses that reallocate during the actual run of the assembly language program. (Contd)
  • 42. I 26 Embedded Systems Integrated development This is a development software and hardware environment that consists of simulators with Software Tools Cross assembler Application For converting object codes or executable codes for a processor to other codes for another processor and vice versa. The cross-assembler assembles the assembly codes of the target processor as the assembly codes of the processor of the PC used in system development. Later, it provides the object codes for the target processor. These codes will be the ones actually needed in the final developed system. Simulator To simulate all functions ofan embedded system circuit including that or additional memory and peripherals. It is independent ofa particular target system. It also simulates the processes that will execute when the codes of a particular processor execute. Source-code engineering software For source code comprehension, navigation and browsing, editing, debugging, configuring (disabling and enabling the C++ features) and compiling. RTOS Refer Chapters 8 to 10. Stethoscope For dynamically tracking the changes in any program variable or parameter. It demonstrates the sequence of multiple processes (tasks, threads, service routines) that execute and also records the entire time history. Trace scope To help in tracing the changes in modules and tasks with time on the X-axis. A list of actions also produces the desired time scales and the time expected to be taken for different tasks. ' The locator program output is in the Intel hex Hie or Motorola S-record format. environment editors, compilers, assemblers, RTOS, debuggers, stethoscope, tracer, emulators, logic analyzers, and application code burners in PROM or Hash. Prototyper This simulates and does source code engineering including compiling, debugging and, browsing and summarizing the complete status of the final target system during the development phase. Locator* This uses a cross-assembler output and a memory allocation map and provides the locator program output as a hex-file. It is the final step of the software design process or an embedded system. i Software tools are used to develop software for designing an embedded system. Debugging tools, such as a stethoscope, trace scope, and sophisticated tools such as an integrated development environment and prototype development tools, are needed for the integrated development of system software and hardware. 1.4.9 Software Tools Required in Exemplary Cases Table 1.3 gives the various tools needed to design exemplary systems. RTOS is essential in y- Jis most embedded systems to process multiple tasks and ISRs. Embedded systems for medium scale and sophisticated applications need a number of sophisticated software and debugging tools.
  • 43. Introduction to Embedded Systems Table 1.3 Software tools required in exemplary systems Software Tools Automatic Chocolate Vending Machine* Data Acquisition System Robot Mobile Phone Adaptive Cruise Control System with String Stability# Voice Processor Editor Yes Yes Yes Yes Yes NR Interpreter Yes NR Yes NR NR NR Compiler Yes Yes Yes Yes Yes Yes Assembler Yes Yes Yes No No No Cross Assembler NR Yes Yes No No No Locator Yes Yes Yes Yes Yes Yes Simulator NR Yes Yes Yes Yes Yes Source code engineering software NR NR NR Yes Yes Yes RTOS Yes MR Yes Yes Yes Yes Stethoscope NR NR NR Yes Yes Yes Trace scupe NR NR NR Yes Yes Yes Integrated development environment NR Yes Yes Yes Yes Yes Prototyper NR No No Yes Yes Yes Note: NR means not required. MR means may be required in a specific complex system but not compulsorily needed. 1.5 EXAMPLES OF EMBEDDED SYSTEMS Embedded systems have very diversified applications. A few select application areas of embedded systems are telecommunications, smart cards, missiles and satellites, computer networking, digital consumer electronics, and automotives. Figure 1.9 shows the applications of embedded systems in these areas. A few examples of small scale embedded system applications are as follows: 1. Point of sales terminals: automatic chocolate vending machine 2. Stepper motor controllers for a robotics system 3. Washing or cooking systems 4. Multitasking toys 5. Microcontroller-based single or multidisplay digital panel meter for voltage, current, resistance and frequency 6. Keyboard controller 7. SD, MMI and network access cards 8. CD drive or hard disk drive controller
  • 44. 0 Embedded Systems 9 The peripheral controllers ofa computer, for example, a CRT display controller, a keyboard controller, a DRAM controller, a DMA controller, a printer controller, a laser printer controller, a LAN controller, a disk drive controller 10. Fax or photocopy or printer or scanner machine 11. Remote (controller) of TV 12. Telephone with memory, display and other sophisticated features Telecom I J, tg I - Mobile Computing - Mobile Access Smart Cards I - Banking - Security Missiles and - Defence - Aerospace - Communication Computer Networking Systems and Peripherals (a) - Networking Systems - Image processing - Printers - Networks Cards - Monitors and Displays Digital Consumer Electronics -DVDs - Set top boxes - High definition TVs - Digital cameras Automotive - Motor Control System - Cruise Control - Engine/Body Safety - Robotics in Assembly Line - Car Entertainment - Car Multimedia (0 Fig. 1.9 Applications of the embedded systems in various areas 13. Motor controls systems—for example, an accurate control of speed and position of the d.c. motor, robot and CNC machine; automotive applications such as closed loop engine control, dynamic ride control, and an antilock braking system monitor 14. Electronic data acquisition and supervisory control system 15. Electronic instruments, such as an industrial process controller 16. Electronic smart weight display system and an industrial moisture recorder cum controller 17. Digital storage system for a signal wave form or for electric or water meter reading system 18i Spectrum analyzer 19. Biomedical systems such as an ECG LCD display cum recorder, a blood-cell recorder cum analyzer, and a patient monitor system Some examples of medium scale embedded systems are as follows:
  • 45. Introduction to Embedded Systems I 29 I 20. Computer networking systems, tor example, a router, a front-end processor in a server, a switch, a bridge, a hub and a gateway 21. For Internet appliances, there are numerous application systems (i) An intelligent operation, administration and maintenance router (10AMR) in a distributed network and (ii) Mail client card to store e-mail and personal addresses and to smartly connect to a modem or server 22. Entertainment systems such as a video game and a music system 23. Banking systems, for example, bank ATM and credit card transactions 24. Signal tracking systems, for example, an automatic signal tracker and a target tracker 25. Communication systems such as a mobile communication SIM card, a numeric pager, acellular phone, a cable TV terminal and a FAX transceiver with or without a graphic accelerator 26. Image filtering, image processing, pattern recognizer, speech processing and video processing 27. Video games 28. A system that connects a pocket PC to the automobile driver mobile phone and a wireless receiver. The system then connects to a remote server for Internet or e-mail or to a remote computer at an ASP (application service provider) 29. A personal information manager using frame buffers in handheld devices 30. Thin client [A thin client provides disk-less nodes with remote boot capability]. Application of thin- client accesses to a data centre from a number of nodes; in an Internet laboratory accesses to the Internet leased line through a remote server. 31. Embedded firewall / router using ARM7/ multiprocessor with two Ethernet interfaces and interfaces support to PPP, TCP/IP and UDP protocols. Examples of sophisticated embedded systems are as follows: 32. Mobile smart phones and computing systems 33. Mobile computer 34. Embedded systems for wireless LAN and for convergent technology devices 35. Embedded systems for video, interactive video, broadband IPv6 (Internet Protocol version 6) Internet and other products, real time video and speech or multimedia processing systems 36. Embedded interface and networking systems using high speed (400 MHz plus), ultra high speed (10 Gbps) and a large bandwidth: Routers, LANs, switches and gateways. SANs (Storage Area Networks), WANs (Wide Area Networks) 37. Security products and high-speed Network security. Gigabit rate encryption rate products 1.6 EMBEDDED SYSTEM-ON-CHIP (SoC) AND USE OF VLSI CIRCUIT DESIGN TECHNOLOGY Lately, embedded systems are being designed on a single silicon chip, called System on chip (SoC), a design innovation. SoC is a system on a VLSI chip that has all the necessary analog as well as digital circuits, processors and software. A SoC may be embedded with the following components: 1. Embedded processor GPP or ASIP core, 2. Single purpose processing cores or multiple processors, 3. A network bus protocol core, 4. An encryption function unit,
  • 46. 30 Embedded Systems 5. Discrete cosine transforms for signal processing applications, 6. Memories, 7, Multiple standard source solutions, called IP (Intellectual Property) cores, 8. Programmable logic device and FPGA (Field Programmable Gate Array) cores, 9. Other logic and analog units. An exemplary application of such an embedded SoC is the mobile phone. Single purpose processors, ASIPs and IPs on an SoC are configured to process encoding and deciphering, dialing, modulating, demodulating, interfacing the key pad and multiple line LCD matrix displays or touch screen, storing data input and recalling data from memory. Figure 1.10 shows an SoC that integrates internal ASICs, internal processors (ASIPs), shared memories and peripheral interfaces.on a common bus. Besides a processor, memories and digital circuits with embedded software for specific applications, the SoC may possess analog circuits as well. A SYSTEM ON CHIP I'SINGLE PURPOSE!_ ;PROCESSORS n I ASIPs ! —— i ,ps : BUSES DIGITAL ; CIRCUITS- ' TIMER. ; MUXs.... | I DATA ADDRESS ; I GENERATOR I I.... T--------- ____ LC.-JL ;-------- i PROGRAM ■ ADDRESS 1 i GENERATOR I PROGRAM, DATA AND PORT MEMORY PORT i INTERFACES I DMAC MULTI­ PROCESSOR I ; DSP I ; gpp : I INTERRUPT ; CONTROLLER ANALOG CIRCUITS, A/D FIASH or E2PROM L H------------------> - 15-20% AREA - 60% AREA -20-25% AREA 7|A’ Fig. 1.10 A SoC embedded system and its common bus with internal ASIPs, internal processors, IPs, shared memories and peripheral interfaces
  • 47. Introduction to Embedded Systems 0 1.6.1 Application Specific IC (ASIC) ASICs are designed using the VLSI design tools with the processor GPP or ASIP and analog circuits embedded into the design. The designing is done using the Electronic Design Automation (EDA) tool. [For design of an ASIC, a High-level Design Language (HDL) is used|. 1.6.2 IP Core On a VLSI chip, there may be integration of high-level components. These components possess gate-level sophistication in circuits above that of the counter, register, multiplier, floating point operation unit and ALU. A standard source solution for synthesizing a higher-level component by configuring an FPGA core or a core of VLSI circuit may be available as an Intellectual Property, called (IP). The designer or the designing company holds the copyright for the synthesized design of a higher-level component for gate-level implementation of an IP. One might have to pay royalty for every chip shipped. An embedded system may incorporate several IPs. • An IP may provide hardwired implementable design of a transform, an encryption algorithm or a deciphering algorithm. • An IP may provide a design for adaptivefiltering of a signal. • An IP may provide a design for implementing Hyper Text Transfer Protocol (HTTP) or File Transfer Protocol (FTP) or Bluetooth protocol to transmit a web page or a file on the Internet. • An IP may be designed for a USB or PCI bus controller. [Sections 3.10.3 and 3.12.2] 1.6.3 FPGA Core with Single or Multiple Processors Suppose an embedded system is designed with a view to enhancing functionalities in future. An FPGA core is then used in the circuits. It consists of a large number of programmable gates on a VLSI chip. There is a set ofgates in each FPGA cell, called macro cell. Each cell has several inputs and outputs. All cellsinterconnect like an array (matrix). Each interconnection is programmable through the associated RAM in an FPGA programming tool. An FPGA core can be used with a single or multiple processor. Consider the algorithms for the following: Fourier transform (FT) and its inverse (1FT), DFT or Laplace transform and its inverse, compression or decompression, encrypting or deciphering, specific pattern recognition (for recognizing a signature or finger print or DNA sequence). We can configure an algorithm into the logic gates of FPGA. It gives hardwired implementation for a processing unit. It is specific to the needs of the embedded system. An algorithm of the embedded software can implement in one of the FPGA sections and another algorithm in its other section. FPGA cores with a single or multiple processor units on chip are used. One example of such core is Xilinx Virtex-Il Pro FPGA XC2VP125. XC2VP125 from Xilinx has 125136 logic cells in the FPGA core with four IBM PowerPCs. It has been used as a data security solution with encryption engine and data rate of 1.5 Gbps. Other examples of embedded systems integrated with logic FPGA arrays are DSP-enabled, real-time video processing systems and line echo eliminators for the Public Switched Telecommunication Networks (PSTN) and packet switched networks. [A packet is a unit of a message or a flowing data such that it can follow a programmable route among the number of optional open routes available at an instance.]
  • 48. Embedded Systems 1.7 COMPLEX SYSTEMS DESIGN AND PROCESSORS 1.7.1 Embedding a Microprocessor A General Purpose Processor microprocessor can be embedded on a VSLI chip. Table 1.4 lists different streams of microprocessors embedded in a complex system design. Table 1.4 Important microprocessors used in embedded systems Stream Microprocessor Family Source CISC or RISC or Bothfeatures Stream I 68HCxxx Motorola CISC Stream 2 80x86 Intel CISC Stream 3 SPARC Sun RISC Stream 4 ARM ARM RISC with CISC functionality 1.7.2 Embedding a Microcontroller Microcontroller VLSI cores or chips for embedded systems are usually among the five streams of families given in Table 1.5. Table 1.5 Major microcontrollers®1 used in the embedded systems Stream Microcontroller Family Source CISC or RISC or Both Stream 1 68HCHxx. HC12xx. HC16xx Motorola CISC Stream 2 8051. 8051 MX Intel. Philips CISC Stream 3 PIC I6F84 or 16C76, 16F876 and PIC 18 Microchip CISC Stream 4’ Microcontroller Enhancements of CORTEX-M3 ARM9/ARM7 from Philips, Samsung and ST Microelectronics ARM, Texas. Philips, Samsung and ST Microelectronics etc. RISC Core with CISC functionality Other popular microcontrollers are as follows, (i) Hitachi H8x family and SuperH 7xxx. (ii) Mitsubishi 740,7700, M16C and M32C families, (iii) National Semiconductor COP8 and CR16 /16C. (iv) Toshiba TLCS 900S (v) Texas Instruments MSP 430 for low voltage battery based system, (vi) Samsung SAM8. (vii) Ziglos Z80 and eZ80 1.7.3 Embedding a DSP A digital signal processor (DSP) is a processor core or chip for the applications that process digital signals. [For example, filtering, noise cancellation, echo elimination, compression and encryption applications.] Just as a microprocessor is the most essential unit of a computing system, a DSP is essential unit of an embedded
  • 49. Introduction to Embedded Systems system in a large number of applications needing processing of signals. Exemplary applications are in image processing, multimedia, audio, video, HDTV, DSP modem and telecommunication processing systems. DSPs also find use in systems for recognizing image pattern or DNA sequence. DSP as an ASIP is a single chip or core in a VLSI unit. It includes the computational capabilities of a microprocessor and Multiply and Accumulate (MAC) units. A typical MAC has a 16 x 32 MAC unit. DSP executes discrete-time, signal-processing instructions. It has Very Large Instruction Word (VLIW) processing capabilities; it processes Single Instruction Multiple Dala(SIMD) instructions; it processes Discrete Cosine Transformations (DCT) and inverse DCT (IDCT) functions. The latter are used in algorithms for signal analyzing, coding, filtering, noise cancellation, echo elimination, compressing and decompressing, etc. Major DSPs for embedded systems are from the three streams given in Table 1.6. Table 1.6 Important digital signal processor® used in the embedded systems Stream DSP Family Source Stream 1 TMS320Cxx, OMAP1 Texas Stream 2 Tiger SHARC Analog Device Stream 3 5600xx Motorola Stream 4 PNX 1300, 15OO2 Philips 1 For example, TMS320C62XX a fixed point 200 MHz DSP (Section 2.3.5). 2 Media processor, which besides multimedia DSP operations, also does network stream data packet processing. 1.7.4 Embedding an RISC A RISC microprocessor provides the speedy processing of instructions, each in a single clock-cycle. This facilitates pipelining and superscalar processing. Besides greatly enhanced capabilities mentioned above, there is great enhancement of speed by which an instruction from a set is processed. Thumb * instruction set is a new industry standard that also gives a reduced code density in ARM RISC processor. RISCs are used when the system needs to perform intensive computation, for example, in a speech processing system. 1.7.5 Embedding an ASIP ASIP is a processor with an instruction set designed for specific application areas on a VLSI chip or core. ASIPexainples are microcontroller, DSP, IO. media, network or other domain-specific processor. Using VLSI design tools, an ASIP with instructions sets required in the specific application areas can be designed. The ASIP is programmed using the instructions of the following functions: DSP, control signals process!ng, discrete cosine transformations, adaptive filtering and communication protocol-implementing functions. 1.7.6 Embedding a Multiprocessor or Dual Core Using GPPs In an embedded system, several processors or dual core processors may be needed to execute an algorithm fast within a strict deadline. For example, in real-time video processing, the number of MAC operations needed per second may be more than is possible from one DSP unit. An embedded system then incorporates two or more processors running in synchronization. An example of using multiple ASIPs is high-definition television signals processing. [High definition means that the signals are processed for a noise-free, echo-cancelled transmission, and for obtaining a flat high-resolution image (1920 x 1020 pixels) on the television screen.] A cell phone or digital camera is another application with multiple ASIPs.
  • 50. Another Random Document on Scribd Without Any Related Topics
  • 51. March 28. March 31. April. occupied in 1775 as the headquarters of Gen. Richard Montgomery and staff of the American army in Montreal. Melvin G. Dodge, librarian of Leland Stanford Junior University, California, wishes copies of Volumes I and III of the Journal of the Society for that institution. He writes us to that effect. Gaelic Notes in this week’s New York Irish World has the following: “Now that the question of teaching Irish history in the schools has again come to the front, we would repeat the suggestion made by us a couple of years ago to the American-Irish Historical Society, that in no possible way could it so promote the objects for which it is organized as by the preparation of a popular text-book of the history of the race in America, suitable for the use of schools. The Society has the material for doing this; it could do it without loss to itself, and with great profit to the race, which it would thus have put under a debt of gratitude.” Death of Gen. M. T. McMahon at his home in New York City. He was a judge of the New York Court of General Sessions at the time of his death. He had practised law in New York for many years and was a fine speaker, but he was known chiefly as a soldier. He was educated at St. John’s College, Fordham, from which he graduated in 1855, and then went to Buffalo, where he studied law in the office of Eli Cook, then mayor of the city, in company with Grover Cleveland, since president of the United States. Although able to pass the examination, he was too young to be admitted to the bar, and he became a correspondence clerk in the general post-office at Washington. In President Buchanan’s administration he was appointed special post-office agent to the Pacific coast. He was admitted to the bar at Sacramento in 1861. At the first call for troops at the breaking out of
  • 52. the Civil War he raised the first company of cavalry on the Pacific. He was elected captain of the company, but when it was decided that the company should not go to the front he resigned and went to Washington. He was made a captain in the regular army and an aide-de-camp to Gen. George B. McClellan, whose bosom friend he remained until “Little Mac’s” death. He served in every engagement in which the Army of the Potomac took part. When the Sixth Corps was disbanded he was adjutant-general and chief of staff. He also served under Generals Franklin, Sedgwick (who was killed at the Wilderness), Baldy Smith and Wright. He received the congressional medal of honor for bravery at the battle of White Oak Swamp. Congress also presented him with a jeweled sword for conspicuous bravery at Spottsylvania and other battles. At the close of the war he was assigned as adjutant-general under General Dix, to the Department of the East. He resigned in 1866 and became corporation attorney of New York City. President Johnson made him minister to Paraguay. In 1879 he ran for Congress against Robert B. Roosevelt and was defeated. Two years later he was appointed receiver of taxes by Andrew H. Green, then comptroller. He was United States marshal for the Southern District of New York under President Cleveland. After that he was an assemblyman and a state senator. For years he had been one of the managers of the National Home for Disabled Volunteer Soldiers. In 1896 he was elected judge of the Court of General Sessions. General McMahon was a Fenian and was ready for service in Ireland. He was also a member of the Clan-na-Gael in its earlier days. His brother, John E. McMahon, who was attorney-general and adjutant-general of New York state under Governor Seymour, was colonel of the One Hundred and Sixty- fourth New York Volunteers, which he raised in Buffalo at the outbreak of the war. The regiment was later
  • 53. April. April. April 7. April 9. April 18. April 18. consolidated with the Phœnix Zouaves, a Fenian regiment, and McMahon became colonel. It was part of the Corcoran Legion. Col. John E. McMahon was killed at the siege of Suffolk, Va., in 1863. The other brother, James P. McMahon, was a captain in the Sixty-ninth with Thomas Francis Meagher, later became lieutenant- colonel of the One Hundred and Fifty-fifth New York, and was promoted to be colonel of the One Hundred and Sixty-fourth New York, in place of his brother, Martin. He remained in command of the latter regiment until he was killed in a charge at the battle of Cold Harbor on June 3, 1864. About this time is issued from the Blanchard Press, Worcester, Mass., a volume entitled: “A Study in the Etymology of the Indian Place Name Missisquoi.” The author of the work is George McAleer, M. D., of Worcester, a member of our Society. The Munsey Magazine (New York) for this month has a paper on the Irish in America by Herbert N. Casson. Death today of Capt. Patrick S. Curry, Lynn, Mass., a member of the Society. He passed away at Nashua, N. H., where he had been superintending the construction of a new post-office building. Daniel Walsh, a member of the crew of the Monitor when she fought the Merrimac, during the Civil War, died in Lawrence, Mass. He was a native of Ireland. Hon. James D. Phelan, ex-mayor of San Francisco, who is a member of the Society, is appointed a member of the Committee of Safety by Mayor Schmitz of that city, which committee is rendered necessary by the great earthquake and fire disaster. E. Festus Kelly, of Northerwood House, Lyndhurst, Hampshire, England, expresses his interest in a paper on
  • 54. April 20. April 20. April 25. April 25. April 26. “The New Hampshire Kellys,” which appeared in Volume V of the Journal of the Society, and desires a copy of the same. Patrick J. Meehan, of Jersey City, N. J., editor of the Irish-American of New York, the oldest Irish newspaper in the United States with the exception of The Pilot, and who may be styled the Nestor of the Irish-American and Catholic journalistic fraternity, died on this date. A despatch from Lowell, Mass., today states that the O’Sullivan Rubber Co., of that city, has wired $500 to the mayor of San Francisco to aid the earthquake sufferers. The check was signed by Treasurer Humphrey O’Sullivan, who is a member of our Society, as is James O’Sullivan, president of the company. At Phalerum, Greece, today, Martin J. Sheridan of the Irish-American A. C., New York, won the contest at discus throwing. Giorgantas, a Greek, was second. President Roosevelt, in a proclamation today, urges the American people to now send their contributions for the alleviation of the distress in San Francisco, directly to ex- Mayor James D. Phelan, chairman of the finance committee in San Francisco, instead of to the American Red Cross. The proclamation goes on to say: “The need of employing the Red Cross, save as an auxiliary, has passed, and I urge that hereafter all contributions from any source be sent direct to James D. Phelan, chairman finance committee, San Francisco. Mr. Devine of the Red Cross will disburse any contributions sent to him through ex-Mayor Phelan and will work in accord with him in all ways.” Reception this evening to Rear-Admiral John McGowan, U. S. N., the new president-general of the Society. The
  • 55. April 28. April-May. May 3. May 5. event took place at the residence of Hon. John D. Crimmins, 40 East 68th Street, New York. An editorial in the New Century, Washington, D. C., this date, says: “As an individual contributor to the San Francisco relief fund, one notices an Irish name leading all the rest—far and above in amount, the generosity of the Rockefellers, the Astors and the Vanderbilts. The name is that of James D. Phelan, who subscribed $1,000,000. And this, notwithstanding that he himself lost $15,000,000 by the fire. These great catastrophes always evoke large-hearted acts and assure us that neither magnanimity, public spirit nor courage have yet vanished from the face of the earth. Mr. Phelan’s conduct proclaims him a man worthy of his wealth. We learn, further, that he is a Catholic, a graduate of a Jesuit college and that he was mayor of San Francisco from 1896 to 1902. As he is only forty-five years of age, we shall hope to hear more of him hereafter.” A committee organized by Archbishop Farley, of New York, for the relief of the San Francisco sufferers, has been very successful. Among the members of the Society who have contributed to the fund, together with the amount given by each, are the following: Archbishop Farley, $1,000; Hon. John D. Crimmins, $1,000; Hon. W. Bourke Cochran, $1,000; Eugene Kelly, $1,000; James S. Coleman, $300; Francis J. Quinlan, M. D., $250; Hon. Morgan J. O’Brien, $250; Edmond J. Curry, $100; J. Henry Haggerty, $100; all of New York. Mr. Crimmins is treasurer of the fund. Warren Upham, secretary and librarian of the Minnesota Historical Society, St. Paul, Minn., writes that the organization is desirous of possessing a complete set of the Journal of the American-Irish Historical Society.
  • 56. The New York Irish-American for this week has the following relative to our San Francisco member, ex-Mayor James D. Phelan: “In San Francisco the man of the hour in whose hands is the management of the great relief fund, and under whose executive direction the important movements that are to lift the stricken city up from the depths and rebuild her shattered fortunes have already been begun, is that well-known Irish-American, James D. Phelan, former mayor of the city. Although his personal and business losses must reach millions, it is reported that he has devoted the sum of $1,000,000 out of his private fortune to employ the afflicted laboring people of his native city. Mr. Phelan, whose father was one of the men who made San Francisco rich and famous, was born in 1861, and was educated at St. Ignatius College, in that city, where he graduated with honor, after a four years’ course of study. He then entered as a student at the law department of the University of California, of which he is also a graduate. He was selected mayor of the city, as a Democrat, in 1896, and served until 1902. His régime was marked by zeal and ability in the public service. The Democrats of the state Legislature complimented him with their nomination for United States senator a few years ago. He is one of the leading capitalists of the United States, and has numerous commercial and mining interests. He is president of the Mutual Savings Bank and the finest business block in San Francisco, situated on Market Street, bore his name. It withstood the shock of earthquake, but the resulting fire reduced it to a mass of smoking ruins. Mr. Phelan has been for years a generous supporter of the Irish cause and has stood by both Parnell and Redmond with his influence and his money. His father aided in receiving Terence Bellew McManus, John Mitchel and Thomas Francis Meagher when those patriots escaped from the
  • 57. May 12. May 29. May 30. British penal settlements in Australia and sought liberty and new careers in America. No city has been more generous in aid of Ireland than San Francisco and its people, of all races, are renowned for their hospitality and liberality, and foremost among those who offered that hospitality has always been James D. Phelan. In the new city that is to rise triumphant from the ashes of the present disaster his grateful fellow-citizens will no doubt give him every honor in their bestowal.” The funeral took place, at Boston today, of Patrick E. Flood. He was a member of the crew of the U. S. S. Kearsarge when she fought the Alabama. John F. Sweeney, Buffalo, N. Y., becomes a life member of the Society. In the old Granary burying ground, Boston, this morning, was unveiled a slab marking the burial place of those who fell in the Boston massacre of March 5, 1770, and of a boy who was killed on the previous February 22. The modest slab of slate is in keeping with the other memorials in this historic burying ground. It was erected by Boston Chapter, S. A. R., and is the first permanent marker that has been placed over these graves. Dr. Samuel Crowell, president of the Boston Chapter, unveiled the slab with a brief introductory speech, presenting Dr. Moses Greeley Parker of Lowell, president of the Massachusetts Society, who congratulated Boston Chapter on the work it has done and is doing. Edward W. McGlenen, city registrar, of the committee, gave a brief historical sketch of the events leading up to the massacre, including the shooting of the boy, Christopher Snider, by the British soldiers, who fired into his father’s house. Little attention has been paid in history to the killing of this boy, called on the slab “the innocent first victim of the struggles between the colonists and the
  • 58. June 4. crown.” The slab stands close to the grave of Samuel Adams and is in plain view from the street. The inscription reads: The Remains of SAMUEL GRAY SAMUEL MAVERICK JAMES CALDWELL CRISPUS ATTUCKS and PATRICK CARR Victims of the Boston Massacre March 5th, 1770 Were here interred by order of the Town of Boston Here also lies buried the body of CHRISTOPHER SNIDER aged 12 years Killed February 22nd, 1770 The innocent first victim of the struggle between the Colonists and the Crown which resulted in INDEPENDENCE Placed by Boston Chapter, S. A. R. 1906. Hon. Arthur P. Gorman passed away this morning in Washington, D. C. He was the senior United States senator from Maryland and was the Democratic leader in the upper branch of Congress. Deceased was a native of Woodstock, Md., and was born in 1829. His grandfather,
  • 59. June 13. June 15. July 18. July 23. John Gorman, came to Pennsylvania from Ireland in 1784 and settled in Harrisburg. John J. Coffey, of Neponset (Boston), Mass., passes away. He was a member of the Society and took much interest in the work of the latter. Death of Hon. Michael J. Sullivan, a member of the executive council of the governor of Massachusetts, at his home in Boston. He worked his way through the Boston University Law School and continued his legal studies in the office of the Hon. Patrick A. Collins, afterwards mayor, and was in July, 1898, admitted to the bar. He was elected a member of the Massachusetts House of Representatives in 1898, and re-elected in 1899. He served on the important committee of metropolitan affairs and represented Mayor Collins on that committee, looking after the interests of the City of Boston. He was a candidate for the state Senate in 1900, but was defeated. In the following year he was chosen a member of that body, and re-elected in 1902. He was a member of the governor’s council in 1904, 1905 and the present year. Governors Bates, Douglas and Guild, in whose councils Mr. Sullivan served, had high admiration for him. In June, 1905, he was in charge, officially, of the Massachusetts delegation to the Lewis and Clark Exposition in Portland, Ore. The state was represented at the funeral by Governor Guild, Lieutenant-Governor Draper and members of the executive council, Senate and House, and the city by Mayor Fitzgerald and members of the board of aldermen and common council, and men connected with the different departments. Death of Patrick F. Sullivan, Boston, Mass., a member of the Society. Hon. John J. Flaherty of Gloucester, Mass., a justice of the Superior Court of Massachusetts, died today.
  • 60. Aug. 22. Aug. 26. Aug. 29. Sept. 25. Oct. 1. Oct. 12. Oct. 13. Oct. 21. Rev. Denis P. O’Flynn, New York City, a member of the Society, passes away. Death of Col. O’Brien Moore, Tucson, Ariz., a life member of the Society. Col. James Quinlan, a member of the Society, passes away at his home in New York City. Richard Deeves, New York, contributes $100 to the Permanent Fund of the Society. William Pigott, Seattle, Wash., becomes a life member of the Society. The Ninth Massachusetts Regiment, under command of Col. William H. Donovan, starts for New York City to participate in the dedication of the new armory of the Sixty-ninth Regiment, N. G. S. N. Y. With the Ninth went a number of invited guests, including Mayor Fitzgerald of Boston, Mayor Duggan of Worcester, Mayor Casey of Lowell, Mayor Kane of Lawrence and other Massachusetts gentlemen. Dedication in New York City today of the new armory of the Sixty-ninth Regiment. Mr. Justice James Fitzgerald of the New York Supreme Court, a member of our Society, presided. John C. Sullivan, registrar of probate for Plymouth County, Mass., was accidentally killed tonight by being struck by a trolley car. He was sixty-four years of age and had been registrar of Plymouth County for many years. Born in Ireland, he came to this country alone when a small boy. He attended the local schools and later Peirce Academy and Brown University, the latter in Providence, R. I. He enlisted during the Civil War and served out his full term, being a good soldier and comrade. After the war he was admitted to the bar.
  • 61. Oct. 29. Oct. 29. November. Nov. 2. Nov. 5. Nov. 6. Nov. 6. Nov. 6. Death today of Hon. Robert T. Davis, M. D., of Fall River, Mass., a member of the Society. Reuben G. Thwaites, secretary and superintendent of the State Historical Society of Wisconsin, Madison, Wis., writes to us saying: “Thank you most cordially for your kindly gift of books and pamphlets to our library. We shall certainly appreciate them very much indeed. We trust that you will continue to favor us with your several publications, as we have a very large, growing, and much used collection of material in the field in which your Society works.” The American-Irish Historical Society this month receives an invitation from the American Historical Association to send a representation to a conference of historical societies to be held in Providence, R. I., December 26–29, 1906. William Doogue, superintendent of public grounds, Boston, Mass., passed away this evening. He was a member of the Society. It is stated that the Hon. Morgan J. O’Brien, presiding justice of the appellate division of the New York Supreme Court, today filed his resignation with the secretary of state at Albany. Judge O’Brien will become a member of a prominent New York law firm. The Hon. James H. Higgins, mayor of Pawtucket, R. I., is today elected governor of Rhode Island. He is the first Catholic to be elected to the office. Joseph F. O’Connell, a member of the Society, is today elected to Congress from the Tenth Massachusetts district. Patrick J. McCarthy, a member of the Society, is today elected mayor of Providence, R. I.
  • 62. Nov. 21. Nov. 23. Nov. 23. Nov. 29. December. Dec. 2. Dec. 11. The secretary of the State Historical Society of Missouri writes that he has forwarded us the first number of a quarterly review just issued by his society and that they shall be glad to place us on their regular mailing list, and to receive from us copies of such publications as our Society may issue. The librarian of the public library, St. Louis, Mo., writes for two volumes of the Journal of the Society to complete the library’s set. Anniversary of the birth of Edward Rutledge, a signer of the Declaration of Independence. He was of Irish parentage. Anniversary of the birth of Charles Thomson, the “perpetual secretary” of Congress; a native of Ireland. Hon. George F. O’Neil, Binghamton, N. Y., becomes a life member of the Society. Died on this date, in 1783, Thomas Burke. He was a native of Ireland, and was chosen governor of North Carolina in 1781. A meeting of the council of the Society is held this evening in Providence, R. I.
  • 63. NECROLOGY. The following members of the Society died during the year 1906, much and deservedly regretted: Coffey, John J., born in County Kerry, Ireland, 1831; died at Neponset (Boston), Mass., June 13, 1906. He enlisted for service in the Civil War on December 13, 1861, in Company C, Twenty- eighth Massachusetts Regiment (the famous Faugh-a-Ballaghs), which formed part of Meagher’s Irish Brigade, and he later fought with the Fourth Heavy Artillery of Massachusetts. Among the famous battles in which he took part were Marye’s Heights, Gettysburg and Fredericksburg. He was stricken with rheumatic fever, which necessitated his taking furloughs. With the exception of these two absences he served from the first year of the war until its conclusion, and was in the army which assembled in Washington for review preparatory to its disbandment at the close of hostilities. He returned to Boston after the war, and was active in military organizations. He joined the Montgomery Light Guard Veteran Association and various other Irish societies. He was a most patriotic man and an active worker in the interests of his native land. He was identified with the Irish National League, Irish National Federation and the United Irish League. He also belonged to Division 43, A. O. H., the Knights of St. Brendan and John A. Andrew Post, No. 5, G. A. R. He is survived by his wife and six children: James D. and Timothy J. Coffey of Boston; Charles M. Coffey, who has been in the West and Alaska for some years, part of the time serving in the United States Cavalry; Mrs. George G. White of Dorchester, Mass.; Mrs. William H. Murphy of Neponset; and Miss Anna S.
  • 64. Coffey, a teacher in the Henry L. Pierce School, Dorchester, who lived with her parents. When a collection of articles for an Irish- American loan exhibition for the World’s fair at St. Louis, Mo., was being gotten up in 1904, John J. Coffey, the subject of this obituary, contributed an Irish flag that had been carried during the Civil War by the Twenty-eighth Massachusetts. Accompanying the flag, he sent a letter, the following being an extract therefrom: “This flag has a precious history. It was presented to the Twenty-eighth Regiment, through the late Patrick Donahoe, by the Irish women of Boston, on Sept. 24, 1861, at the same time Governor Andrew presented the regiment with the flag of the State of Massachusetts. My company (C) was selected as the right center or color company, and my brother, Michael J., whose height exceeded mine by two inches, was selected as color sergeant of this green flag, and carried it until he fell mortally wounded at the second battle of Bull Run, August 30, 1862; after that it went through Chantilly, South Mountain and Antietam. On the memorable day of the attack on Marye’s Heights, at Fredericksburg, it was the only green flag unfurled—and by this I do not intend to cast any reflections on the other four regiments of the Irish Brigade. Some time before Chancellorsville, in May following, Colonel Byrnes and the other officers of the regiment concluded that it was too cumbersome, subscribed among themselves and procured a flag of lighter fabric (worsted), and laid the old flag (this one) aside, but in safe keeping, and you may rest assured that it has been scrupulously cared for and treasured by the custodian.” Coleman, James S., builder of the new Croton Dam, New York, and street cleaning commissioner from 1881 to 1891, died at his home, 38 East 69th Street, New York City, December 17. Deceased was one of the best-known contractors in this country. At the time of his appointment as commissioner of street cleaning by Mayor Grace of New York he was engaged in the construction of the Texas and Pacific Railroad, which work was
  • 65. turned over to other contractors, while deceased gave his whole time to the study of his work for the city. He was the first commissioner to realize the many commercial uses to which city waste might be put, and he so arranged the disposal of garbage as to clear for the city $90,000 yearly. Mayor Grace appointed him to a six-year term, which continued through the term of Mayor Edson, and subsequently he was re-appointed for another six-year term by Mayor Hewitt. In 1892 he received the contract for the building of the new Croton Dam, and shortly before his death the entire work was completed. Deceased was born about sixty-three years ago. He came of a family of contractors, his father having engaged in that business until his death. He spent his boyhood in Madison, N. J. Deceased was prominent in charitable work of an unobtrusive sort and was a member of the Metropolitan Museum of Art, the American Geographical Society and the Manhattan, Catholic and Hardware clubs, Friendly Sons of St. Patrick, and was a member of the board of managers of the Catholic Orphan Asylum. Funeral services were held at St. Patrick’s Cathedral. Curry, Capt. Patrick S., born in Ireland; died in Nashua, N. H., April 7, 1906. He came to this country when a young man, eventually settling in Lynn, Mass., where he was long engaged in the granite business. During the Civil War he rose from the ranks to command Companies C and G of the Third Massachusetts Cavalry, under Banks and Sheridan. He was one of the volunteers at the storming of Port Hudson, and for his bravery there was given a medal by Congress. During the siege of Baton Rouge he was made provost marshal at that place. He was wounded several times. In 1883 he was elected representative to the Massachusetts General Court from Lynn, and was the author of the free text-book bill. He also presented the bill abolishing contract labor in prisons. At the time of his death he was superintending the construction of a new post-office building in Nashua, N. H.
  • 66. Davis, Hon. Robert T. (M. D.), born in County Down, Ireland, 1823; died in Fall River, Mass., October 29, 1906. He was the son of John and Sarah (Thompson) Davis. His father was a Presbyterian and his mother a member of the Society of Friends. They came to America in 1826 and settled in Amesbury, Mass. Doctor Davis was educated in the Friends’ School at Providence, R. I., and at Amesbury Academy, and began the study of medicine with Dr. Thomas Wilbur, well remembered as a leading physician in Fall River. He passed two years at Tremont Medical School in Boston and was graduated from the medical department of Harvard in 1847. In 1850 he went to Fall River and began the practice of his profession, winning a high rank as a skillful physician. When a young man he was active in the anti-slavery movement and in 1851 made a speech in favor of instructing the local representatives to vote for Charles Sumner for United States senator. He was a member of the state constitutional convention in 1853, and in 1858 and 1861 was a state senator. He was a member of the national Republican convention which nominated Abraham Lincoln in 1860, and also in 1876 when Rutherford B. Hayes was nominated. At the request of Governor Andrew of Massachusetts, he introduced the resolution for the appointment of peace commissioners to attend a convention in Washington in an endeavor to preserve peace between the North and the South. During the early days of the Civil War he assisted in the formation of the Seventh Massachusetts Regiment, intending to accompany them to the front as surgeon, but gave way to a relative of the colonel of the regiment, who was desirous of securing the appointment. He was later appointed by Governor Andrew medical examiner of recruits for his district, and later examiner of applicants for exemption from military duty on account of physical disability. He was one of the three local surgeons who, in obedience to a call from Washington, after the second battle of Bull Run, went to Alexandria and assisted in treating the wounded. In 1863 Governor Andrew appointed him a member of the State Board of Charities, and in 1869 he was appointed a member of the State Board of Health by Governor
  • 67. Claflin, and when the two boards were consolidated he was appointed as a member of the new board by Governor Talbot. In 1873 he was elected mayor of Fall River without opposition, and at the close of his term he donated his salary to the Children’s Home. He was elected to Congress in 1882 and re-elected in 1884 and 1886 and was afterwards appointed by Gov. Oliver Ames a member of the Metropolitan Sewerage Commission. Doctor Davis in his long life had been prominent and successful in so many different fields that his early life as a physician and politician had been in a sense forgotten by the present generation. During the Land League and other Irish movements, Doctor Davis was always generous in support of Home Rule principles, and he had frequently been heard making eloquent and appealing pleas for the freedom of his native land. He was identified with the business interests of Fall River as a large owner of real estate and as one of the largest holders of mill stock in the city. He held large blocks of stock in a number of the mills, preferring to invest so as to be a dominant factor in the corporation in which he was interested. Doctor Davis held many offices in the corporations of the city. He was a director and also president of the Algonquin Printing Company, the Stafford mills and the Wampanoag mills. He was also a director in the Davis mills, the Merchants’ mills and the Stevens Manufacturing Company. He had been president of the Fall River board of trade, the Union Hospital Corporation and the Home Market Club. Doctor Davis married, in 1848, Sarah Congdon Wilbur, daughter of Dr. Thomas Wilbur of Fall River, who died in 1856, and in 1862 he married Susan A. Haight, daughter of Moses Haight of Westchester County, New York, who passed away a few years ago. He is survived by one son, Robert C. Davis of the law firm of Jackson, Slade & Borden. Doogue, William, born in Queen’s County, Ireland, 1828; died in Dorchester (Boston), Mass., November 2, 1906; superintendent of public grounds, Boston, Mass. When a lad his family emigrated, settling in Middletown, Conn. Here Mr. Doogue was
  • 68. educated in the local schools, having in his native country received primary instruction at a private school. At the age of seventeen he was apprenticed to Affleck, Whitmore & Co., of Hartford, Conn., who operated one of the most extensive nursery and greenhouse plants in New England at the time. Here he learned the science of floriculture, horticulture and landscape gardening. He served five years with this firm, and during the last three years of his apprenticeship studied botany under the tuition of Professor Comstock of Trinity College, a well-known writer on that subject. After the death of Mr. Affleck, Mr. Doogue became a partner in the firm, the style of which was changed to that of Whitmore & Co. In 1865 Mr. Doogue dissolved his connection with the firm and came to Boston. He assumed the entire management of the floricultural and horticultural business of Charles Copeland in Boston and Melrose, Mass. Later he established himself in business as a florist and was most successful. In 1871 Mr. Doogue’s skill was fittingly recognized when he was chosen to lay out the grounds of the Centennial Exposition held in Fairmount Park, Philadelphia, and make a tropical and sub-tropical display. He did splendid work and was highly complimented, and as a reward was presented with two gold and two silver medals and diplomas. Mr. Doogue transformed the Boston Public Garden from a place of a few monotonous floral displays during the summer season, to one of a succession of brilliant, attractive and artistic flowering and rare plants and exotics, which have been the delight of visitors. He propagated many of the most rare and costly plants and bulbs, and accumulated stocks of these and other products of the greenhouse and nursery, which are today worth in money much more than the whole plant has cost the city. It may be said he created the department of public grounds, for when he took charge of it it was only a name, a title; now it is a substantial and creditable asset of the city, as well as a fitting monument to the genius and memory of William Doogue. Mr. Doogue was liberal, but unostentatious in his contributions to works of religion and charity. His aid to the Home for Destitute Catholic
  • 69. Children and St. Mary’s Infant Asylum, Dorchester, is remembered with gratitude by the Sisters having charge of those institutions. He leaves five children, Mrs. Timothy McCarthy, Mrs. D. H. Sullivan, Mrs. John O’Connell and Luke J. and William J. Doogue. The funeral of Mr. Doogue took place from the Church of the Immaculate Conception, Boston, in which for years he had been a faithful worshipper. In the congregation were Mayor Fitzgerald, ex-Mayor T. N. Hart, city officials and representatives of organizations of which Mr. Doogue was a member. Interment was at Middletown, Conn. Kenedy, P. J., born in New York City, 1843; died there January 4, 1906. He was educated at the Christian Brothers’ School in Canal Street, New York. Being brought up in the book business, he assisted his father in his stores in Centre Street and in Mott Street and Barclay Street. On his father’s death, Mr. Kenedy succeeded to the business, and so well did it develop that he soon took over the entire building at No. 5 Barclay Street, which in time became the most extensive Catholic publishing house in the country. A few years ago he took two of his sons into the firm with him, and they will continue the business, the foundation of which their grandfather, John Kenedy, laid eighty years ago. In the fall of 1895, Pope Leo XIII made Mr. Kenedy a publisher to the Holy See, in New York. He leaves a widow, three sons and four daughters. Moore, Col. O’Brien, born in Ireland; died in Tucson, Ariz., August 26, 1906. A life member of the Society. At the time of his death he was general manager of the Citizen Printing and Publishing Co., Tucson, controlling a valuable newspaper plant and issuing a daily and weekly. He was a man of great brilliancy. On the breaking out of the war with Spain, he entered the service as lieutenant-colonel of the Second West Virginia Infantry. After a year’s service, and peace being declared with Spain, he became lieutenant-colonel of United States Volunteers for the operations in the Philippines, where he served for eighteen months, until his regiment was mustered out. He then settled in Tucson. He was a
  • 70. newspaper man of much ability and experience. Some of his early newspaper career was spent in Houston, Tex., on the Post, of which journal he became managing editor. He was later managing editor of the St. Louis Republic, and was also Washington correspondent for that paper at Washington, D. C. McCall, John A., born in Albany, N. Y., 1849; died at Lakewood, N. J., February 18, 1906. He became clerk in the Albany State Currency Assorting House; was later in the service of the Connecticut Mutual Life Insurance Co. until 1869; served in the New York state insurance department as clerk, 1869–’76; was deputy superintendent, 1876–’83; superintendent of insurance of New York, 1883–’86; comptroller Equitable Life Assurance Society, 1887–’92, and was later president of the New York Life Insurance Co. He was a life member of the Society. O’Flynn, Rev. Denis P., born in County Cork, Ireland, 1847; died in New York City, August 22, 1906. He was educated at St. Colman’s College, Fermoy, and then spent two years in study in Paris. He entered Louvain University, Belgium, and obtained the degree of doctor of theology. Returning to Paris, he was ordained to the priesthood and then came to America. He was eventually made vicar apostolic to the Bahamas. He became rector of St. Mary’s Church, Saugerties, N. Y., and for fifteen years, up to the time of his death, was rector of St. Joseph’s Church, New York City. Quinlan, Col. James, born in Ireland, 1843; died in New York City, August 29, 1906. He came to this country when he was but seventeen years of age. He became a first lieutenant in the Sixty-ninth New York Regiment, and, in 1861, went with it to Washington, D. C. He was mustered out the following year, and joined the Eighty-eighth New York Volunteers, which was part of Meagher’s famous Irish Brigade. For conspicuous bravery at Savage Station, in June, 1862, Colonel Quinlan subsequently received the United States medal of honor.
  • 71. Sullivan, Patrick F., born in County Kerry, Ireland; died in Boston, Mass., July 18, 1906. He came to Boston, Mass., when he was about sixteen years of age. Obtaining employment in a clothing store at the North End, his first venture in life’s struggle was made. Later he took a position with the house of Leonard & Co., brokers in furniture and auctioneers. Succeeding years found him connected with Libbie, dealer in rare books, and he continued in this business under the title of Sullivan Bros. & Libbie until the early eighties, when he took premises in School Street, Boston, under the name Sullivan & McDonald, and later Sullivan Brothers, auctioneers. As one of the principal assessors of the City of Boston, he established a reputation for skill and judgment which caused his opinion to be sought and followed without hesitation. His generous, charitable nature and his devotion to religion, as well as his broad, practical mind, is shown in the following disposition of his fortune in public benefactions. By the first clause of the will, the testator gives to his sister, Catherine A. Sullivan, $30,000 as a preferred legacy, and then the following bequests are made: To the Catholic University of America, $5,000; to the trustees of Boston College in Boston, $5,000; to St. John’s Ecclesiastical Seminary, Brighton, $5,000; to the trustees of the Boston Public Library, to be expended for the purchase of Catholic standard books, approved by the archbishop of Boston, or by the president of Boston College, $5,000; to the Little Sisters of the Poor on Dudley Street, Roxbury, Mass., $5,000; to the House of the Good Shepherd, Boston, $5,000; Carney Hospital, in memory of Thomas F. Sullivan, deceased brother of the testator, $5,000; to St. Mary’s Infant Asylum and lying-in hospital, Dorchester, $5,000; to the Free Home for Consumptives, Quincy Street, Dorchester, $5,000; Society for Propagation of the Faith, $3,500; to particular council of St. Vincent de Paul Society, to be distributed among the various conferences of the archdiocese of Boston, $2,500; to Home for Destitute Catholic Children, Boston, $2,500; Holy Ghost Hospital for Incurables, Cambridge, $2,500; to the reverend superior of the Paulist Fathers of the City of New York,
  • 72. for missions to non-Catholics, $1,500; to superior of Rocky Mountain Mission of Society of Jesus, to aid in carrying on religious missions among the Indians, $1,500; to Cardinal Gibbons, to aid in carrying on religious missions among colored people of this country, $1,500; to the Conference of St. Vincent de Paul connected with Church of All Saints, Center Street, Boston, $500; to the pastor of All Saints’ Church of Center Street, to aid in paying off the debt on said church, $1,500; to Conference of St. Vincent de Paul connected with Cathedral of Holy Cross in Boston, $500; to the St. Vincent Orphan Asylum, Camden Street, Boston, $2,000; to the Working Boys’ Home, Boston, $2,000; to House of Angel Guardian on Vernon Street, Boston, $2,000; to Trinity College, Washington, D. C., $1,500; to Church of the Immaculate Conception, on Harrison Avenue, $500; to Church of Our Lady of Perpetual Help, Boston, $500; to Cathedral of Holy Cross, Boston, $500; to Church of St. Mary of the Sacred Heart on Endicott Street, Boston, $500. Five thousand dollars is distributed among certain nieces of the deceased, and the rest and residue of the property is given to the sister of the testator, Catherine A. Sullivan. Travers, Ambrose F., born in New York City, September 8, 1851; died in New York, January 29, 1906. He was of the firm Travers Brothers Company, cordage manufacturers, and was a brother of the late Francis C. Travers of New York. The latter was also a member of the Society and very active in advancing its interests. Vincent P. Travers, another brother, is likewise a member of the organization.
  • 73. MEMBERSHIP ROLL OF THE AMERICAN-IRISH HISTORICAL SOCIETY. [For officers of the Society see pages 5 and 6.] Adams, Hon. Samuel, president and treasurer of the O’Neill- Adams Co., 20th to 22d Street, Sixth Avenue, New York City; director, Garfield National Bank; member of the New York Chamber of Commerce; trustee, Excelsior Savings Bank; an ex- state senator of Colorado. Adams, T. Albeus, president, Manhattan Refrigerating Co., 525 West Street, New York City; president, Adams & Co., New York; president, Union Terminal Cold Storage Co., Jersey City, N. J. Ahern, John, 5 Highland Street, Concord, N. H. Aspell, John (M. D.), 139 West 77th Street, New York City; member of the Academy of Medicine; of the County Medical Association, and of the Celtic Medical Society; recently president of the latter; visiting surgeon to St. Vincent’s Hospital. Bannin, Michael E., of Converse, Stanton & Co., dry goods commission merchants, 83 and 85 Worth Street, New York City; member of the Merchants Association, New York; director, the Emigrant Industrial Savings Bank; vice-president, the Catholic Summer School (Cliff Haven); member of the Merchants and Catholic clubs, New York, of the Montauk Club, Brooklyn, and of the Brooklyn Arts and Science Institute; director, the Columbian National Life Insurance Co.; director, American Investment Securities Co.; director, Citizen Trust Co., Brooklyn.
  • 74. Bannon, Henry G., 107 East 55th Street, New York City; president of the Irish National Club; secretary, Celtic-American Publishing Co. Barrett, Michael F., of Barrett Bros., wholesale and retail dealers in teas, coffees, etc., 308 Spring Street and 574 Hudson Street, New York City. Barry, Hon. Patrick T., 87–97 South Jefferson Street, Chicago, Ill. (Life member of the Society); advertising manager, Chicago Newspaper Union; director, First National Bank of Englewood, Ill.; director, The Chicago Citizen Company; has been a member of the state Legislature of Illinois; prominently identified with educational interests. Barry, Rev. Michael, Oswego, N. Y. Baxter, Rev. James J. (D. D.), 9 Whitmore Street, Boston, Mass. Blake, Michael, of John Leonard & Co., iron and steel, 149 Broadway, New York City. Bodfish, Rev. Joshua P. L., Canton, Mass.; formerly chancellor of the Roman Catholic archdiocese of Boston; a director of the Bunker Hill Monument Association. Bourlet, John W., of the Rumford Printing Co., Concord, N. H. Boyle, Hon. Patrick J., Newport, R. I.; has been mayor of that city many terms. Brady, Rev. Cyrus Townsend (LL. D.), rector, Trinity P. E. Church, Toledo, Ohio; member of the Society of Colonial Wars, of the Sons of the Revolution, of the Military Order of Foreign Wars, and of other patriotic organizations; chaplain of the First Pennsylvania Volunteer Infantry, war with Spain; formerly Protestant Episcopal archdeacon of Pennsylvania; author of For Love of Country, For the Freedom of the Sea, Stephen Decatur, Commodore Paul Jones, Border Fights and Fighters, The True Andrew Jackson, and other works.
  • 75. Brady, Owen J., with The H. B. Claflin Co., 224 Church Street, New York City. Brandon, Edward J., city clerk, Cambridge, Mass. Brann, Rev. Henry A. (D. D.), 141 East 43d Street, New York City (Life member of the Society). Brennan, Hon. James F., lawyer, Peterborough, N. H.; a trustee of the New Hampshire State Library. Brennan, James F., contractor, 2 Garden Street, New Haven, Conn. Brennan, P. J., 788 West End Avenue, New York City. Brett, Frank P., town clerk and attorney, Waterbury, Conn. Brierly, Frank, 268 West 131st Street, New York City. Broderick, William J., 52 Morton Street, New York City. Brosnahan, Rev. Timothy, rector of St. Mary’s Church, Waltham, Mass. Buckley, Andrew, Parsons, Labette County, Kansas. Burke, Robert E., recently city solicitor, Newburyport, Mass. Burr, William P., office of the Corporation Council, New York City. Butler, M. J., real estate and insurance, Morris Avenue, corner of 144th Street, New York City. Butler, T. Vincent, with R. G. Dun & Co., New York City. Buttimer, Thomas H., lawyer, Hingham and Boston, Mass. Byrne, Dr. C. E., of the C. E. Byrne Piano Co., East 41st Street, New York City. Byrne, Joseph M., insurance, 800 Broad Street, Newark, N. J. Byrne, Rt. Rev. Mgr. William (D. D., V. G.), rector of St. Cecilia’s Church, St. Cecilia Street, Boston, Mass.
  • 76. Byrnes, Patrick J., builder and general contractor, 105 East 31st Street, New York City. Cahill, John H., lawyer, 15 Dey Street, New York City; prominently identified with telephone interests; vice-president, secretary, attorney and director of the New York Telephone Co., and the Empire City Subway Co. He is also a director of the American District Telephone Co.; the Chesapeake and Potomac Telephone Co.; the Holmes Protective Co.; the New England Telephone and Telegraph Co.; the Delaware Telegraph and Telephone Co.; Northwestern Telephone and Telegraph Co., and the Southwestern Telephone and Telegraph Co. Calnin, James, 101–107 Lakeview Avenue, Lowell, Mass. Cannon, Thomas H., of the law firm Cannon & Poage, Stock Exchange Building, Chicago, Ill. Carbray, Hon. Felix, Benburb Place, Quebec, Canada; member of the Royal Irish Academy; Fellow of the Royal Society of Antiquaries, Ireland; member of the Quebec Harbor Commission and of the Quebec Board of Trade; consul for Portugal at Quebec, and dean of the Consular Corps; trustee of St. Patrick’s Church, and of St. Bridget’s Asylum; has represented his district in the parliament of the Province of Quebec. He was one of the pioneers in the lumber trade between the St. Lawrence and South America; has engaged in the general commission and shipping business; and has been a member of the successive firms: Carbray & Routh; Carbray, Routh & Co.; and Carbray, Son & Co. Carmody, T. F., lawyer, Waterbury, Conn. Carney, Michael, of M. Carney & Co., Lawrence, Mass. Carroll, Edward, Leavenworth National Bank, Leavenworth, Kansas. Carroll, Edward R., 333 East 51st Street, New York City; clerk’s office, Court of General Sessions of the Peace, City and County
  • 77. Welcome to Our Bookstore - The Ultimate Destination for Book Lovers Are you passionate about books and eager to explore new worlds of knowledge? At our website, we offer a vast collection of books that cater to every interest and age group. From classic literature to specialized publications, self-help books, and children’s stories, we have it all! Each book is a gateway to new adventures, helping you expand your knowledge and nourish your soul Experience Convenient and Enjoyable Book Shopping Our website is more than just an online bookstore—it’s a bridge connecting readers to the timeless values of culture and wisdom. With a sleek and user-friendly interface and a smart search system, you can find your favorite books quickly and easily. Enjoy special promotions, fast home delivery, and a seamless shopping experience that saves you time and enhances your love for reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookgate.com