Embedded Systems Architecture Programming and Design 2nd Edition Raj Kamal instant download
Embedded Systems Architecture Programming and Design 2nd Edition Raj Kamal instant download
https://ebookgate.com/product/embedded-systems-architecture-
programming-and-design-2nd-edition-raj-kamal/
https://ebookgate.com/product/embedded-systems-design-2nd-edition-
steve-heath/
ebookgate.com
https://ebookgate.com/product/programming-embedded-systems-with-c-and-
gnu-development-tools-2nd-edition-michael-barr/
ebookgate.com
https://ebookgate.com/product/making-embedded-systems-design-patterns-
for-great-software-2nd-edition-elecia-white/
ebookgate.com
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
https://ebookgate.com/product/tcp-ip-lean-web-servers-for-embedded-
systems-2nd-edition-jeremy-bentham/
ebookgate.com
https://ebookgate.com/product/real-time-uml-workshop-for-embedded-
systems-2nd-edition-bruce-powel-douglass/
ebookgate.com
https://ebookgate.com/product/embedded-system-design-third-edition-
santanu-chattopadhyay/
ebookgate.com
,:.
,
.·,
Embedded
. S y stems
Architecture. Programming and Design
Second Edition
Raj Kamal
004.16 KAM
KK Mohapatra
lilima Fulmare
Dept, of Electronics.
Hindustan College of Science and Technology. Agra
National Institute of Technology, Rourkela
JikhiJ Kothari JK Mendiratta
)ept. of Electronics and Communication Engineering, Dept, of Electronics and Communication and Engineering.
>haram Sinh Desai Institute of Technology. Gujarat II. K College of Engineering. Bangalore
Santa Kumari
himli Adhikari
Dept, of Electronics and Communication Engineering.
>ept. of Electronics and Communication and Engineering,
Andhra University. Vishakhapafnafn
'alcutta Institute of Engineering and Management. Kolkata
V Murlidharan
Hpankar Ghosh Dept, of Computer Science and Engineering.
)ept. of Electronics and Communication Engineering MS Ramaiah Institute of Technology. Bangalore
■engal Institute of Technology. Kolkata
Josephine P Kumar
lebashish De Dept, of Computer Science and Engineering.
>ept. of Electronics and Communication Engineering. MV.I College of Engineering. Bangalore
leghnad Saha Institute of Technology, Kolkata
Stanley Johnson
I
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 vii
Preface to the First Edition ix
1. Introduction to Embedded Systems I
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
.5. Programming Concepts and Embedded Programming in C, C++ and Java 234
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
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
1.1.1 System
A syStem t' 4 *” wnrClllg. organizing or dimly- nW •» male. '.< .1- si'irilnli; In J 11 sei. plan, pc.glani.ir
•<t ofrok‘. A spk-inisalw. an MrangeiTk-ni m which all ■!' umis a.w-mHe amt <nrk u-gilbc'according tn the
plan or prugrani.
Consider a watch, It is a tnne-di-play .y.lcn, Ils pails j>< n. hardware. needles ami hatiery with I he
huuliful dial, chassis and strap ffu-n- i*jrn iv Jinn* ttic real nine ci cry s<v«Hid and cuntinwwsly
update the lime every second. The system. program updates the display using three needles alter exh second.
Itfutluwio let ofruin. Some of lhc.<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 itneiunu tn same position after an hour, (in A shun needle n nates e > 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
Simple approach with interesting
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 examples and figures
lime if the system is nut programmed in waler-saving nude. Step lit Alter draining imii the water completely,
spin the motor fast fora programmed (dud for drying by wniriiugingout waler Irunt ihr clothes. Step IV:
Show the Wash-over status 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
Can be m> re rx n ii on from Slept unless the u-arr resets the sysigmby in-efting another sc"1' clothes and rc.-els
thr program
E^twMcd Systems
ASYSTEMONCMiP
SIN&.E PURPOSE BUSES
PROCESSORS
OSGiTAi.
Simple approach with figures to asipi cmcuns
. . TWER
explain complex topic of system IP, MUX,
CBCWTS.
• i5-2tr* -cm -a a%
AREA AREA AREA
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 die JVM d rum comparatively elowly. Thia disadvantage can he
overcome aafollowa-. Java byte rode* can he convened toriMsve nwtune codes ftx faw .•jraimg using
jusl-rn-time (JlTJcompilalitm. A Jiva accdoalor teo-pwever) can be used in the system ft* fast
code-run.
X jAvabytn coder that arc prtendeefresafa larger memory. An cntbedW Java tyOcm may need a minimum
Cf SI2kB POM and 512 kB RAM became of the need to fire tnoalJ 1VM and run the application.
5.7.4 J2ME
(J»e of J2ME/Java 2 Micro Edition) twJav* Card c* Embedded Java helps in reducing the rude luetuK kH
for (he uaual application! like man card. How? The foUowiog arc the method!
I, Use roteetaacaonly.Claueaftwbalkron-timcenvironment fetmtheVM interns! t'ormai araloMy
(he programmer"* new Java clauea are not tn internal formal.
X Provide for configuring the run-time enviroctrneti. Eaamplca of configuring aredrfetmg rAeesrepnun
haniling clout), mer-defincd cluit loader), file ciautl. AWT clout), rrni'hnmited thread), thread
groufi. tnoill-dmmtiaul array) and Jong md flooring data ryptt Ocher cwfiguring examples are
adding che specific cluaea—daugnme. input, output and streams fr> connect tons to network when
needed.
3. Create one object at a time when running the multiple threads.
4. Reuse the object! instead of using a larger number of objects.
3. Use scalar 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 of the 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 Simple way of point-wise
alltmaiivecoctfiguraliooa.connected device configuration (CDClarsticonrcctcd limited desire configurations
rrtno CDC inherits a few classes from packages for oet. security, io. reflect, sccurity-cea test. leu.resources, presentation of the details by
util, jar and zip. CLDC does oct provide fee the applets, swt, bears, math, net, rmi. security and *ql and ten
packages hr jiva.lang. There is ■ separate javu.mircoedrtiaa.so package itr CLDC cun figuration. A PDA using lists and tables
ipenonal digital assistant) or mobile phene uses CDC or CLDC.
There is scaleable OS future in J2ME. There it new virtual machine. KVM nr an alternative 10 JVM. When
using the KVM. the system needs a 64 kfi instead of 512 iB run-time environment. KVM features arc as
follows:
1. Use of following 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 the java bO package far the exceptions.
3. Ute of a separate set of APIs (application program interlaces) instead uf JINI. JINI importable. But in
(he embedded system, the ROM hu the application already ported and the user does not change it.
4. There is no verification nf the classes. KVM presumes the elistc as already validated
t. There is m> object finaliUUoii the garbage collector does nor have tojx-rti *111 InlK-viinwiviigrtungcv
in the object 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 of java.Ung.rcflection, Thus, there are no interfaces that do the object serialization,
debugging and profiling.
)/• End«/Cotte Cw d^pVyTLmeCtec ftmclkm •/ L Mx mt/ fruM rmAardtLJ m/rmi dr»iffi th? thtrr • i/’e* ihm/iuM */lt4 in t*wi
69. r BR coda far po*Vg ■*»<■ far lap U>TM.Cfc<*«y •/ t *toi/M«*f uW (ovr m rW w <r rkipw r 7 V /i • u i r i (mJ* t v 1 iAn outtRaniif <Avriita' *
SR_TIneU<tt <>( , _
y. r^f— far crMseg * nvtragr far <r* and <fa*C ate each >’»? mtmfl fate 1V V Mem T. rr^tf Mliu fXCVM/ !■ Ate A »H' rJ aj • h/ nn tn*r I. Hl 2 / A/ • -^<
it^fh it tif milmrn«it«'rJru'br<iA ) V) 4 <*'4
KTCfct’f a */ fcAii A rvi tWAJtHfii cii'hr' ia < //
/V ubftx D.n lAf»* i tJw urr Ut i
TO. OBMtaxIVs (MbosTuacD^StrMsg, timcDaac); t !•* irvn» hrv ti* irf 44 ijirrm uzr
71. )7>En>c( 13R_TtmeDate euV’l liilftL
2. Ta At* UHl. n wi/ u> iV ^rnx*i t-f /Ar ijifr***.
J. Tit {ett'n fo defint htrdtrtft m/i tttprt’cri u>t •••
/ 7i> Au m A* ki (Afbv* ^Ar wjhiw *rAiQcWr A fv r <rrv/w* tumid* •
"11.2 CASE SHIM OF DIGITAL CAMERA HARDWARE AND SOFWARE
plated rfUmi *Ar ia^*ufT i*ru
ARCHfTECTURE K <7«iyK«KHJ>, /VTItftTfrM «/M^AaKr
1 T<t feat* lading fur d/ttin impUfnfnialion un^r A/VCVZY u*/ VrUti/li
TK digital OWi was iiuroduccd earlier in Section l.hl.4. Athgiialeainen issneeam^cidSrX.ISeetteilA I C, #T7V.V’. dlx« /V uif r/ tT(\ f,u fiu* ivni Aa*<«/iin uaJ < w'rrn;
1.10.4 Ihied tV camera funetkte. hardwwcaruj wdiwwc units. Hjirt' 1.14 4u—rd tWrdwwe
tn) wfiwarc cnmfeeicnu in * wnpte d>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.1 CASE STUDY OF EMBEDDED SYSTEM DESIGN AND
o
11.2.1 Requirements COOING FOR AN AC/TOMATfC CHOCO1ATE
RcquirmeW'ufiV digital earner* e» he undcruond through a requirtment table given m Table II I VENDING MACHINE |ACVM) USING MUCOS RTOS
nr OruiM funrtum iiuU* du earner* an ai faOm: ■J ACVM wi* 1 arodueerfcaiIiftNafiwn I H>,2. h ACVm fafKlic*'. hMJwjre
I. A « <9 onurcdlen crnuol Jitdicr. flash. <fro example, for pcnfdtcnh. direct mermuy KCOS. nJ i/xl Wiwdc unib. Fipjfc t.U *1**01 j diagrarrunjcic ripvtxflLiui«n H ACVM
fote*r. neo facts and eye-ball image control. GUI consist* of the IXD display tor graphics. and SechnM JI I.Mo IIJ.AgivethedeMgnan AC'VM. V.2ik'wnt'cd
< wils-Vi and Iwueass f« inputs al camera. A liaahxrcen n amaher ahemaurc !•» VXD an) keypad. '£
MUCOS StTOS. It ta a portable. ROMabk. scabbte. proemfioe. real nn« jai!
TV user give* commands for twitching on the omen. Huh. diuricr, adyvrl brightness. couth. multiuskifif kemeL Section 11. J.? 4ncnhe* Gm AC'VM tohin^MUCtA** KHAS
s-ulnr. tare nJ transfer. The t»cr cnmmaruK vc in the hem of truerropr ogaah. Each sagnal groerate* c (Scctiw 9.2) propimrung envmmmrnl.
farm aute inpul from an t^craied twitch or burton. Uhen a bunucr (or opening the dwuer n prewol.
a I lash lanq) ghros and a self* timer circuit switcVv off the lamp aulcenalicaJIy. T
2. IV (Vrarc generate light, which fill, m tV CCD array, which through an ADC tranuraw the bib 11.1.1 Requirements
far eachpitetin each row in the frame, and also for 1V dark area pitch in each row in a veriKsl scrip / TIkcrifui/ttwntt td dtf mo;hinr rm he uMentm«J lhAAigh j rrquftc/ncTM IjNc
lie nflri cwrcctirm in CCD signaled light intensities far nit row. IV srnp t* m adjacent frame pun in Table N.I.
3. A pkswvcrwvriH eda number of pi lets. TV number ofprset'used fir: pcture determines ffwilroiiuL ‘1/
f*K picture sirtsoas of a number oThcrnnmlaJ and tenical pitch. Fur 2592 < 1944 (wtcK there are
2592 * 1*44 s SO.'KMK arts cd celts. i-Vti *ct of pixel hat three cells. fir the red. erren and blue 11.1.2 Specifications
nimprnu in J piacf. Each cell getsespuaed Io a picture when tV shutter ufcanwruiysensim a met The ACVM spccircAik*i\ in brief arc v Jullu»>.
command. 7he »anrro ffrnrds rte pictures irong a rtarge-tiwipW desires iCCDramy 0>r array 1. Ct h<s an ulfd^nunffie keypad <w» iftc l"p the flixhi/w TJol cnjhte* J
crourtsefa Urge rutrnber of CCD cells. throe at each pitch J chihJ to imencl »rth 11 when bovi a c a rbw ci Parr The«r» ner c.m J w* cy* i imji-1
j nJ <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
ErrMdod Sr»*™
(( f7iw*c /Y/SfX* (prwt f«qp<i_ini fvflnl* »n utrng lhe HJSf.V iparom tfr Tufbrw'ngs
< < I The tu fK i nAi R«d*«LMiU^ i ««cuu«t« <e\ the V t.Wiek*. Idwwy *u fcvwMi uw v( the KWX <>«w*
rhj DrfurKtun,^ i<w«rr. na^ vhner wlinkl JMUUuc.ck^andrmivc j.md m*cw
tel Dr ftfAaam n^.wuHi i / the ailnbvicid* a RISIX speoc.
4 K* B'jJf /mm iht f'JL^ing j/i rAn ,ipkf. Ml 1 he funciaau osteal < । mJ «fn_ft\xi*e () unloA and M • <f«w.
fu Bu.<k ftinchotu and npti vf fTOSti IcJ The fiwitiq n<i_iUjty I t ugMh <oa tingle warling ti'Alh* ihctma^e <* av«UMe The
'£ hi' XTPX pCOS-lt ai MUCOX «n fht lent thrvugh iff riMwipffr— mKv '*• <' * fcv a tab. which ha» hem tegrtrfed fa a mmTrai k* I feg i Ucrcd *i c an *
tMtinplf 1V. I m 9 20. WAar arymi*iUj art paiwrfuaf irfeM nJwJ an minted Jaitfot ukctocMcUihc na^nutifyj. Thi* prwrani n eMfO^fy mefo/fuo wrver tuk. A *er>cr
A fttr rtii h <0V/i MUCO31 finiftw* •ill 6r cj^w«A Itartin* *ht m<v «/
in rV AWCOJij tMp'fcvv/«r a remit• tvtn t] onaAtr UFOS it
tart Kvciver tir m^iicatuMi from a drnt t*dc thruiigh a Mgndhaaikr fiuKtk* (like an JKK i
H l lie fofeinm Ifrtfktct ihr aiuitarte irfa PDSLC (ftroc
urd Utttf J hit- di Ar/p f/r«jrfv m wUrr itum&Af fr ijJhmcW- and fgt The rt)M\ .jane n^unlhik I 1net drun^ Ac <f«w imrAhatcly hut petent*
K mhrddrd JtfTAVi lairt <m. the <nhc« U«U ln« rung the ifurnc l>r ipeur »dl gs douuyvd urdy if the 11M usk cfane* ebe
ran k'rHo/Lj fuim Wtnd Hiivr* Stitmi m ofiff an HTOS far »^ph/ifii and ipcw. Jkak.iy iw b> dC'JtUxak* Ur nr'ruxy iMnriwd »ilh qmc IXB.
K tfdmMrJ irifi'MJ vi/A fuivttfal tuyl loppy*• thniugh irnn tuirtplct^ VcWitfU 4><vc\ bw»e tJcrAfaanal hjhuwtng fnii/tc* djTiotcwieficwnam he u<d. liilTwu
Ktamplfi 9.21 *•• 9.27. bifffnnftx brtntrt <Ar ft Hart 1 irm*tpAarrt I-11-0 mdJok h« queue* bom hy multiple ia*L* RfSIX qumaa have the akiicavial firfh/wjag (e•kirr
I wwiJfes tt i u</ 4*/w i irirt ft QVd tv Aai ofMUCOS ndl ht •"•lit fltof U4 ft 41 freJ Km m t **e a single *stu*g ttfk is i vaiUMe IftJ there On be U pri<rity k*d» in place
O»pw K* • rff drxfr&t lAc Hv>fowt Ct OSfiX reirf-f*mr fjftu f flTfa/uui. or imc|Wumly iocH.'KGfXTft VcWiniL
12. CVruAKf a t*r»r drmc f»o nuJ.+nir or //*Ck Wh0 a Uak oukx a tskJD alkKUto tScctnm 93.il.
When OMOg the uU <eUtorf fmtfiom. the nunAcr tail iidca Uak ideAtfy. Sranlariy. a prpe fSaiiim 7.14 i<m
m Aid t Sci.v*i 7 I $ r im Gte I Stxdm X.6. ? I when cruiei. a fi te docrif*r<feta urudUK m cmal md a nuntfrr.
Q 5.1 BASK FUNCTIONS AND TYPES OF RTOSes
Ge cample, id n xuigrrd m ideveify Ac devcc croud. Tte numbs* h rnwgixd iffci claHiimeg j xi rd Jr
A rumple* rnd'jtt*tirt£ embedded QUem detigfi re/juicc* (he dcvelapmcm of numhen abpnJy aJkratrd Whe» mwij: Ac deviedreltfal ImdiiMb. Ae nmotier farilitifca the dr* ice
thwwghly tcUeJ hup free cafe* fa The devuT fmrtM esampln arc vfen iv rod or write or gd Ufibur 9 vet 9 afifttuc ck“c tSnm<i X 61
l. JAtegnacd devtJapmeft efivinmment A pqr it. VaWicts h i HFO^w. wbuch i* managed <M by quor tfC AnO/tn* Nit by the dc«icc4n«er
o 2 Tuk furwiiixn in emhakfcd C « emtakferf C** funutiiau. VtWud* ha* maoagcml funcucm f*M a pvpc-drHd (like a device Aixcrj pqw*/n*. Thi* 11 analifiaA
V Rcif-tinv ckxk-bwed hiftjwwt ind mftwire umen l‘» ihe named ppe driwr m Uwi. fipe* ahn in^Jcfncnt the unafrro.tjrmd iMtanauwt of tok.*.
a. Scheduler FufKijiwi pipel'eiCfcaiC i’/jnp«//wprXo**r* . muuMki. maukfj/llytr/i crraici a pipe device named
V (Tevet driven «nd device mi Mger ptfnHaon far muinaim «toi*i<7 mc\Mps E*h mage oa he of ni&Ktnis) ua Artec It cnicr*
6 Funetn«> f« [HTj vtiftg the vgMh. event (U< fnwp. wmiptvrr-hiftUmg ir.m a I in uf tk»ice* «m crerfxuu dev* f 1 fuiKtwn retrieve* th: 1n( of devrfts with the de«uT numbrr allftied
fuHciiofti »d function* for the queue*, m*ilbu*fcv pipe ind wekeb. id Meh device including |wpc dencr*
E 7 AddiUauJ (qm'mjim. fur cutapte* TCMP of US8 or RlwUjOth* a WIK of Curuadu m cumplc (« crcAog a pipe named u piprUurinfo. Aswnre itaa *1 cac have a rottnfesn tX
IfDAMdGUh. fnur tncuagev i&cr name. po**«d. ictephunc number and c-ruait ID. tadi the< cuO b: of a nuAimum
R Fjra md exception htftdtuig function. m/c of J2 byto iMify A gkXmi variable fJ»» an integer number far J file docripfer that tdetuifet a (k*u*e
c v. (ruing and 5, uc m de huggiry wrffwirt for Icwag RTOS a% « e 11 a< de vchpcrf anmng a ninahcr of de»K^ at die IO *yucm. 77k ik*k*e can te a fife ur ppe or wekcl nr >*her dote.
embedded 4ppliCJ»f*, K*ample V 26 ctpCam* Jk mde* tor creating. »*riimg and reading.
-r 9.UuJ shows the tag fumu*m* cipcttcd from the kmd of an RTOS.
The RTDS'% hi«c the fdJowing future* in genenl. Example 9.26
i 1 Ic/tkI fuiw'iiou and ichcduling.* preemptive e» pre-cmRrtc plus lime
I. * include Vedjh.h" P Indiofe du [0 librvy fmlicn*. */
dicing.
2 . Pnuniic* definicmns fur ihe CxsX> and 1ST. pipeDrv l). /* Iroafl a ppe driwr. */
V Pnoniy mhenuncc tenure <« oRjm ci pnurity ceitag (eattfe. 1. <* Declare file dscnywt. ♦I
J. Lmui fa number of la«Xi mfdi
E 5. TA't synchroAUion md I PC function*. 3. P Mode refer* 10 the pennhoan in at* NFS (Network Rfe ScrrerL Mate h rev 0 0 for urnurfeial
6. IDE consisting of cd hew. plat form builder. (iUI and trephre* wifiwjr?. permi«tkM. *f
5 •.(Cipher, ikbugp3|! mxI hnsi urpci 'vpprihoA IDI
?. (revue imaging tool and device driven. 4.7* Create pipe MmeJ a* pipeUicftnfo for J menage cart )2 byta maairaa */
Embedded Syilents
inlcmaj cwnmuntcutiorf. E&ten.ion diKA nrt permit creation and deletion ol t^vls durinp run. l*Aienxii>n defines
exh (1st <>f different priority and activates iiotfy inc taihecvdo. iMlcnsiim imi um; n>es<ape queues »1
vies semaphores as event flap only with no ask havmp rvo-time deletion <T crvjlinn of ilr'C.
|" OSEhMKAoiMcit............
i (Throe standards: MOPISTARC, Carrarwiotai slack and Network Management)
i'S "•
i EOfcient design ol , ■
. artMMtm' The ..
■ hint tie. 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
Appendix 2:
Select Bibliography
A. PRINTED BOOKS
I. GrWwn Fto<liF» B’ll 9ten« mJ Mm KaA*. vLm« Ajfiiantt Dr A Ma^>Oa GvaA
Fut^tSeixtan F^icliM SyriraA Uriah an".Springer, Mor. 2006. Acporuiaj- 9etoa euto^icny
Omi^r*i Txts'. £*«* CUtaJJy. Cce 3>A 19.MpjVwvx.iMte nateAvs^lFx n^cntiog»»^ftiratMei t/ammsgujatl
IMIItaam.May. 8U 20.lup/hraraEETAw.com(Frr rutecnlaAy u a W»l«otMted a>«Km rayUMel.
21 MpjrvwweRcnrWraibedBih |Fk wtaoibuf » • popular eateftW lywem rra^mrat
’.2tat It w»« erMridtol-crranpiiuci cotwelcacr I For wbecrita*( » a pabular cotaddcd cooipuUf lyurm
rtMtopW. Arartrah IMI r^lra. Teykn Bl Froch. 0«. 3B5. maywraj
2) Mp/AraafomBModdmtA ppdar eoMdriri ry*a ■%!
21 KiqrWaaa aa« wrt^oiaxizri IA pofarls world "ifc rad BfCkvadia cm wt^Hc is daily de Lcy-ttnni
m «*riawi M<f«n|
us*, ro
9 mj KmmL 4taf*Drdfa*,
pwY» EdKf^B. $i*«E<L 2003.
C. PRINTED JOURNAL PAPER REFERENCES
Ma*. USA. MM.
■ Huan Ll Knthi RrinasmMm. FruhaH Sheaoy. Rods* A.G«0ri«adH>eD. SwWney. •«<«< Woufrww
11 K. VXL ‘WaiJrffcd te Spw.- Cortpo. Mp Mrffofrjvvf - tat Aral Raw TeaAa M «oMr Roterirr", Jewraai o< Syacna and Snftwwe. K>(1|. 962-971, 20%
fW l/<h» Drvi wrh. 200). 2. C. R. <i«A N. Shnu. K- RawtiMhim. S. MrirwW.'EJIrriwhM nxSttrtnfxAmmuawAfpUcami:
1) 0u^U» Bobftf WtOOVJ CLNfT.UXA. 2OQ3. A .wr Srad>~, Pnx at 11* tE£E Wemarari Goo/erracu oo Enriedfed taJ Tima Coanpding Syarirra lad
CwAtlia. "Dr4«v CnMW fiortwi'', M SAraa. CTR«2)> 2W1 Afele&au" 2006
prwt C V C K.. VUdGv^k Avhab Dm. AAr jkr&iMft 1 Lriv Berre. FtBxkaaai wad Knar. "CWfer Cnaien!frMdri Axotuotrn ttaxnrtj' IEEE Mem. 23r«).
M-». xm
(--o— w. Vajrara. Hitnrs^wr Syaaray. Aral Raw Mariydrtaf*. 4 Wayw Well, Bail Oia BM Tehaa La. "SwvrGracrar or CaaPaaAM Syumu**. IETF Micro. 22(5). 46-35,
2002.
1 tear Lmur Btlrt. 'EtgSadagHartrWCf>-dt»f* tA Wreea-U Pm FFCA>~ /Zryi) Jcamd. gp
prairie Halt 2001 H-n. Saw, law,. 2UO2.
$1MA 8. B«JL W*t4W Jynmr K^i ■brtf Druft, BaflD*vonb 4 Ou-Tiny UM| and Hom hoy 'Or"*B Uoftiat Cndar Cramed MA Caorararad Srrint StoMwy' law
itaam. Nw Mw. USA. 19% (T* Mfa. Mat 9021 Vehicle Syuma Dyrunucr. Jl.fV- Jll-JJO. 1909.
7. Tldad Mmu, */*arri Aru /*apr>urL AoJyei radAypteafaar ”. hoc. (EEE. 77(4), $41-3W>. IM9
EnfeddM Systems
B. WEBSITE REFERENCES
1. MrpVAra*abpvina<e.’i.CTn IFnr Telia i.jmnirim DSP Pwcuo. Secwn lie, 136)
2. teipJhrav ncnmrfcaodrandaa (Far Sedrie IA|.
3. MipyfrrivjuairdicMeiei/ukMiedaleVvmTJain and anodjuni (For Scetina 2J3|.
4 InpJfmwjmao ISrnieo 13J, Ftr ARM froesm).
3. bepJAn<xjLeoaAcAkic i/lnhccttA2«racL,appApa»6MaJrtrt I For Scam 2-16(
6. hBpZMnrxaibcor| IRar temteunlaj rf|aifonuancea ti mdaatfrii Syacsa, Seaana 2.6 and 133.3],
7. hspJ/aww.jarajriiLCDcn.'fTOiiea/ja»«c«rd (ForSca™ 3.73).
<. tajrZArriw.nebc9edaxr»WrERW7<<cifiu»lin6_«rncnM>" I Fa SBia 2 tl.
9. hip-jTw».nnx«n |ForSB%i 9.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 (For Secta IlJI.
14. tapJAraw.taBXoml-jjJanitariniiMttai jFcTluwiM “ MBL Seco* till
13. IS^®c/2mmAteuxftteeAn|/taoriAVnMlira (For MIDI imafice. Seem 12.11
16. tapvKra*j(iiner(.ot (furSeaioa IZiwdbtGiiddiaet tar <br Vic of Ac C Loefeafc sMeetataad
Software tf M1SRA (Mast bdaoy Srfwere Rriiabiliiy AiwriMimH.
17. bap^ArwwaacarcKtaxcira'ieraayscTni/icarrLhon (Fee Secta ll4l
IS. bspcffirwwftoavdJataeccnd-alind^^^erVusaRCardScarityZ (For Seetioo |14|.
I
S.J«. INSTITUTE «F
technology library
BANGALORE - 5iO *60.
Embedded System^ i
DATE
Section 1. 1
Definitions of system and embedded system
Section 1. 2
The processing unit of an 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 of an embedded system consists of
I. An embedded system power source with controlled power
dissipation
2. /I clock oscillator circuit and clocking unit that lets a processor
execute instructions
Timers and a real time clock (RTC)for various timing needs
of the system
£ Reset circuit and watchdog timer
System and external memories
System input output (10) ports, serial, parallel and wireless
communication, serial Universal Asynchronous 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,
E pulse dialer, modem and transceiver
8. Multiplexers, demultiplexers, decoder for interfacing of the
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 tools for system design
Section 1.5
K Examples of applications of embedded systems
I Section 1.6
Designing an embedded system on a VLSI chip
I. Embedded SoC (System on Chip) and examples of its applications
2. Uses of Application Specific Instruction Set Processor (ASIP) and Intellectual
Property (IP) core
Q 3. Field Programmable Gate Array (FPGA) core with single or multiple processor
units on an ASIC chip
Section 1.7
The complex system consists of
0 1. Embedded microprocessors or GPPs in complex systems
2. Embedding ASIPs, microcontrollers. DSPs, media and network processors
e 3. Embedding application-specific system processors (ASSPs)
4. Embedding multiple processors in systems
7 Section 1.8
The design process has
E 1. Challenges in embedded system design
2. Design metrics optimi~ation
C 3. Co-design of hardware and software components
Section 1.9
T The system design formalism is defined
I Section 1.10
The design of embedded hardware and software in an automatic chocolate vending
machine, smart card, digital-camera, mobile phone, mobile computer and robot are
V given as examples
Section 1.11
E
Classification of embedded systems into three types ' 'ir'
S Section 1.12
Skills needed to design an embedded system
Introduction to Embedded Systems
II__3 )।
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.
'>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 of Small 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”.
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
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.
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 for graphic 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 of general-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 of 32- and 64-bit microprocessors is the classic Pentium series). IBM PCs use 80x86 series
and the embedded systems incorporated inside the PC for specific tasks (like graphic accelerator, disk
controllers, network interface card) use these microprocessors.
High performance processors have pipeline and superscalar architecture, fast ALUs and Floating Point
Processing Units (FLPUs). [A pipeline architecture means that the instructions have between 3 and 9 stages.
Different instructions are at different stages of the pipeline at any given instance. A superscalar architecture
refers to two or more sets of instructions executing in parallel pipelines.]
The important microprocessors used 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
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.
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 for specific applications or computations or as controllers for peripherals,
direct memory accesses and buses.
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.
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,
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 if a 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).
1 1 1 1 1 1
Internal RAM at Internal External Flash/ ROM/ Memory
RAM at System- Caches RAM EEPROM PROM Addresses
Micro on- at Chip(s) at
controller Chip Microprocessor the System
or [Hold Copies External
Ports
External of System and/or
RAM Memory- ,th Internal
pages]
ROM or EPROM Storing application programs from where the processor fetches the instruction codes.
or flash 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) Storing the variables during program run and storing the stack. Storing input or output
and RAM for buffer 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.
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.
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 of serial 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.
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
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.
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.
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 2 Bytes for
■ Address from
2 Bytes for j
Address of I I Where System
Stack J" I Starts
on i Execution on
Power Up
Reset ' ' (Not Needed in
i 80x86,8051,80196,
.. )
Interrupt Service I
Bytes for
Routine Vector . - . i Data as
Addresses of Inputs for each
2 Bytes each I
Interrupt
Bootup ; < Service Routine
Program j-
Codes i
r Machine Specific
I Codes for
•. each
! Program, ISR -
L and Task
Machine Codes;
for Real Time i
Operating f
System (RTOS)j
System ROM
Memory
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.
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
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 i 1. 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 .. . ~ ~
Main Function
level language is very simple compared to writing it in ----------------------i--------------------
assembly language. ‘C‘ programs have a feature that Interrupt Routines
Interrupt Service Routines
adds the assembly instructions when using certain Tasks N
Tasks 11....N
processor-specific features and coding for a specific ------------------------------------------
section, for example, a port device driver. Figure 1.7 Kernel
Kernel and and Scheduler
Scheduler
shows the different programming layers in a typical Standard Library
embedded ‘C’ software. These layers are as follows. Functions Including
Network Protocol
(i) Processor Commands, (u) Main Function. Functions
Functions for
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
Receiving Stack
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.
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
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,.
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 archil located 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.
Tao’? 1.2 Software modules and tools for designing of an embedded system
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].
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
Cross assembler 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 of an embedded system circuit including that or additional memory
and peripherals. It is independent of a particular target system. It also simulates the processes
that will execute when the codes of a particular processor execute.
Source-code For source code comprehension, navigation and browsing, editing, debugging, configuring
engineering software (disabling and enabling the C++ features) and compiling.
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.
Integrated development This is a development software and hardware environment that consists of simulators with
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
' The locator program output is in the Intel hex Hie or Motorola S-record format.
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.
Note: NR means not required. MR means may be required in a specific complex system but not compulsorily needed.
9 The peripheral controllers of a 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
I I
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
A SYSTEM ON CHIP
; gpp :
A/D
FIASH
or E2PROM
H------------------ >
- 15-20% - 60% -20-25%
AREA AREA AREA
L
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.
Stream 4’ Microcontroller Enhancements of CORTEX-M3 ARM, Texas. Philips, RISC Core with
ARM9/ARM7 from Philips, Samsung and Samsung and ST CISC functionality
ST Microelectronics Microelectronics etc.
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
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
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.
A WITNESS FOR THE "Yes," replied the Doctor; "and until the outrages
DEFENCE. became so notorious that the attention of the
civilized world was drawn towards them, many
official Englishmen in the British colonies were very
lukewarm on the subject, and evidently did not wish to impede the progress
of the cotton and sugar industries by interfering with the business of
procuring laborers. Let me give an instance of this:
"Captain Palmer, the predecessor of Captain Markham in command of the
Rosario, seized the schooner Daphne, of forty-eight tons burden, fitted up
exactly like an African slaver, and with one hundred natives on board. They
were entirely naked, had not even mats to sleep on, and the hold of the
schooner resembled a pigpen more than anything else.
"The Daphne had a license to carry fifty native 'passengers,' but it made no
mention of Feejee, where she was seized, and whither she had taken her
cargo for sale. The natives were landed at Levuka, Feejee, and placed under
the care of the British consul, and the Daphne was sent to Sydney for
adjudication. The Chief-justice of New South Wales, Sir Alfred Stephen,
decided in the Daphne's favor in the following words, which I will read from
Captain Palmer's Book, 'Kidnapping in the South Seas:'
"'.... It will not be enough to show that artifice has been used, or even
falsehood told, to induce the natives to enter into the agreements or
contracts mentioned, if they really did enter into the contracts.
"'The morality of the proceeding cannot be taken into consideration in
determining the question raised here. The captor will have substantially
to prove that the natives were going to be passed into a state of real
slavery by those who had taken them on board the Daphne, or were to
be put into a state really amounting to slavery, and in violation of the
agreement and against their will.'
"The Daphne was released, and Captain Palmer was compelled to pay the
expenses of the trial, amounting to nearly $900. This money was afterwards
refunded to him by Her Majesty's Government, which approved his action in
seizing the schooner and placed his name on the list for promotion."
"How do the colonies obtain their laborers at present?" Fred asked.
INDIAN GIRL
HOUSE-SERVANT
IN FEEJEE.
"They get them from the islands in legitimate ways, as I before told you, and
they also import Chinese and Indian coolies. The supply of Polynesian labor is
not equal to the demand, and in the last few years, especially in Feejee, there
has been a large importation of coolies from India. We will learn something
about them when we visit the Feejee Islands."
CHAPTER VI.
THE SAMOAN ISLANDS.—APIA.—ITS POSITION AND PECULIARITIES.—
BEACH-COMBERS.—HISTORY AND ADVENTURES OF SOME OF THEM.—
CHARLEY SAVAGE.—SAMOAN POLITICS.—ATTEMPT TO POISON
MISSIONARIES.—FRENCH CONVENT AND SCHOOLS.—COMMERCE WITH
SAMOA.—VISITING A NATIVE VILLAGE.—GAMES OF THE YOUNG PEOPLE.—
YOUTHS THROWING SPEARS.—MISSION COLLEGE AT MALUA.—HOW THE
STUDENTS LIVE.—PANGO-PANGO.—ADMIRAL WILKES'S DESCRIPTION.—
ATTENDING A SAMOAN PICNIC.—DIFFERENCES OF TASTE.—MASSACRE BAY.
—LA PÉROUSE.—HOW HIS FATE WAS DISCOVERED.—THE SWORD-HILT AT
TUCOPIA.—LOSS OF THE BOUSSOLE AND ASTROLABE.—VANIKORO ISLAND.
The Pera reached the Samoan Islands without mishap, and anchored in the
harbor of Apia. The Samoan group is also known on charts and maps as the
Navigator's Islands; the former name is the native one, while the latter was
bestowed by Bougainville in 1768, who called the group Archipel des
Navigateurs, in consequence of the skill displayed by the natives in managing
their canoes. There are nine inhabited islands in the group, with an area of
about 1125 square miles and a population of something less than forty
thousand.
A BEACH-COMBER.
"Apia isn't much of a place," said Frank, "but what it lacks in numbers it
makes up in variety. Among the residents there are Americans, Englishmen,
Germans, French, and several other nationalities, the Germans being most
numerous and controlling the best of the trade. Then there is a fair sprinkling
of men whose nationality is open to question, and whom any respectable
country would not be anxious to claim. Samoa is at present the favorite resort
of the beach-comber; perhaps you don't know what a beach-comber is.
"All through the islands of the Pacific there are men whose history is shrouded
in obscurity, and who are unwilling to tell the truth about themselves, for the
simple reason that the truth would be inconvenient. They are deserters from
ships, runaways from home—perhaps in consequence of crimes for which the
law would like to lay hands on them—outcasts from decent society or society
of any kind, and not at all particular as to how they make a living. They were
more numerous fifty years ago than at present, but there is still a sufficient
number of them for all practical wants of the country. In the days when
England sent its criminal classes to Australia, the South Sea Islands were filled
with escaped convicts and ticket-of-leave men; but that source of supply no
longer abounds, and thereby hangs a tale which may as well be told here as
anywhere else.
"'The plot was wellnigh carried into execution. The opportunity was to be
embraced when the teakettle was on the fire. Cooking and boiling of
water are carried on in open sheds on the islands. The time fixed upon
for carrying the plan into effect was service afternoon. The lad who
attended to the boiling of the water was accustomed to fill the kettle and
put it upon the fire before going to the service. Hence there was afforded
the opportunity which our enemies sought. We had all gone to the
service, and there was no human eye to watch their movements. The
appointed afternoon happened to be windy, and while the man who had
undertaken to carry the plot into effect was in the act of doing the deed,
another, who had been smitten with remorse, struck his arm and
scattered the poison; they had no means of obtaining more, and so the
attempt failed. The man who was instrumental in saving our lives
remained on the island several years acting as pilot to vessels entering
Pango-Pango harbor, and in 1841 he left in our missionary brig Camden.
It was not from himself that we learned our obligations but from another
white man who lived on the island at the time of the plot, and knew of it
though he had no hand in it. The occurrence led to the breaking up and
scattering of the party of would-be murderers, as they feared the arrival
of a man-of-war, and they could no longer trust one another.'
"The Samoans are a handsome people," continued Frank in his journal, "of a
deep bronze or copper color, and graceful figures. Some of them have
adopted foreign garments; but a good proportion adhere to the native dress,
which consists of fine mats or thick handsome tappa, made from the fibre of
the mulberry or bread-fruit tree. Their tappa is thicker than that of the
Marquesas, but unfortunately the manufacture of it is diminishing year by
year, and in a little while no more will be made. Foreign calicoes are taking its
place, just as in Tahiti and the Marquesas. Of course the foreigners wish a
market for the goods they have to sell, and therefore they encourage the
wearing of garments or materials of European make.
"The most lightly clad Samoans were those that came out in boats when we
lay at anchor and wanted to dive for money. They are excellent swimmers and
divers, and when a piece of silver is thrown into the water they are after it
instantly, and catch it before it reaches the bottom. The best of the divers was
a girl who appeared to be about fifteen years old; when she caught a coin she
held it between her teeth till she rose to the surface, and after taking breath
for half a minute or so was ready for another dive. The performance was
exactly like what we saw at Singapore, Malta, and other ports, where there
are always plenty of natives ready to dive for the coins that passengers throw
over for them. The water is perfectly clear, and though it is fully a hundred
feet deep, every object on the bottom can be seen.
"As at Tahiti and in the other islands, it has been necessary to import laborers
from elsewhere to work the plantations, as the Samoans are not fond of
exerting themselves any more than are those of the Society group. Thus far
most of the laborers have been imported by the Germans, and they come
from all the islands where the German vessels trade. The Polynesian Land
Company and the American Land Company have also made some
importations of the same sort, but up to the present time they have not
equalled the Germans.
"While walking in the outskirts of the town we were thirsty, and asked the
native boy who accompanied us where we could find some water to drink. He
immediately suggested cocoanut-milk, and on our acquiescing he hailed a boy
who was lounging under a cocoanut-tree close by, and said something to him
in Samoan.
"Immediately the second boy took a small piece of rope which had been
twisted out of cocoa fibre, and prepared to ascend one of the trees. By means
of this rope and his hands and feet he went up about as quickly as we could
have ascended a staircase of the same height, and threw down several nuts,
with which we quenched our thirst. Any one who has been in the tropics
knows how refreshing is the milk of the green cocoanut when he is weary and
thirsty.
ebookgate.com