You are on page 1of 216

COA Unt-1 Notes Minakeli

Fuwnctiomal

Fumdhomal umih
vnits and

Inbul wt
utpuf
ea
Unut
|
thw imteonnactubru
cotpeilu dhei lal syslen a

Emtal Porocus ing Unit (CPUJ


MemoryH
Bus stuctue

Proesso
Memoy
unit
ALU
CU
Ragistis

Bus in Comneeh ou

Outpeur
wnit
Baaie aam
A
NDT
Note Tueory abou dtuLe wmponavts an guven Fundarnoutal

amd 1 Notü»(about bus)


CoA Notes {Uriut
6uses, bus Archi tect,tPes obust a bus cbetaluon

Bus
datitma
Bus is a somnuni caiom ysim hat mlbs
belween dleune modules oe Agmputu oe 0L
pathusau mnuiing
A bus Aa ommunicaluon
ove deuices
hat pa
A bus ds a nous o eleivical lins fwire

compuliysigmals/bib

A sak of mutiple in.Ealn lme i Aable


bus
esausviung
1 bmau0
amLmitling Agnas
(ProCEso,
bus thal Aonnui mays% Aompull Apmponna
H A alled a AYslinn bus
mempiy, z/0)

7w a bus luins mvbe lasfied


jmo Xhree untion

O Aata Bus
Address
Bus
Bas
Corttio
dat belween
Bub '
-Qata iwsrovidus patho moving
dola
Cemponoui.
-Bidirectional
bus
Width ed databus ji nmbu el hins un dnta
ERoh Lm Aam LA omy ono bét al
a. Jn
Address Bus; ( Unilizuctiomal)
ud to duigmale (knew) the z0nce
Te addrs limas ase

0r destivation d ta daa o ae dat bus


wishes to ead on
wlu a mmo
p
LOondy
on Ho
t
he procesgor
pul ta
addkess lnmes
addiuss of duired
wnd

posible
Tha Loich e addaesS bua dlamins Ee maximum
mwno Capau e hi Ayslem

oniol Bus (Bidiuechional)

-The aovdial
lnus ane uaed o coiel H actssZo and uáe otRe

data amd addkess ines


Cowaol sinals deamsmit bot eommamd and murg inormatin

the of
dabaannd addss
valisdity
Timung Agnals= mdi ati
rlomalon
to be
Command ugnals = speify oteutions peyoimad

Limu indude,
ypica owtsol
Meupiy wne uuupt Kugues
Kaad
Memovy T upt Ack
Tlo ORd tlock
To Kaad etc
Tvamaei Ack
Bus Raguest
BA Srramt
CPU Memouy

Comiol inus
Bu Adduwss lints
Aale lines

Bus Jmnconnuon stheme

ypesBuses
Dedicatd
Mulki ptoxed

- Declicaload im s permanodtiy, asimed eithu to om


bus
funtuom
o to a phiical Aubset e compucombonuis
elucical
Hu ue l separali
- Example. of wndional cuslitaluon-
addhess nd
data mes
tatnsmitzd
data unlomation may be
Adases aud conhel
uplexed yalid
Owe Hu smue t o lines using an Addseas

For exonmbll He addies s placed


data tonsu,
beaennig la ne is activaud 4tAia peat
0m hu

The adudks is
bus amd Addus

he
valid

remeved eom
o de bus
sma
((tus
bus

nod u lonti odal tsa


GR Lucdfr Subsequut
korowon as time muh plari
ng)
Bus Arbi taauon
-Move an oe meclule mau
uoed ohol o e bus e.9

CP md DMA COMioller o7 Loila duiedh * memDy


0 modula may nted lo read
the diia D to 7oUsor
without Auolima ane AeLoizydA
whiuw mutiple RLgueig arbitraio
Aalled abitbetio
he prous by hem sAalld
thm
ven
Gnc gsan paou
- Arbitratiom am be Cevtializedlbcaliged
Dutibuted
Decevtialized|

lered to as
4a Aikauzed sutumu.
o
a Amalo handhoaAL dwica,
s sestonsible gor allocatiiy
am o
a bua 0omlhollei arbiter,
J bus The dovice may be a gehauate moolule tato

dn dutkibudod sthme ,Hire no nial aovluolorRadtRes,,


and She modules
alws Aovuol leqic
eac mpolule coviiuu

act togulhs Joshae te bus

*o puspoie is o dusignat
mhods eabitaaton
with
ne
bott

dewite, eith tls proc@ssor dr am o modul, aA masti

Read or Lwnt)
Te master may iniuai a dat toamsl(e
oheehw eus as alave l hs
wrtn s0me ptles dwice,

padiwloh erchanmp
limun Timung Rikis t Ts wa m Lou eens ae
AOOrdunated on he bus
Buses ude O Sypmchronous imms
AsymthronUA limin
Sumch ronDus limg
-with symthronous Aumung occuhiunu Heeens on
h bus s
diiummad by a wlock
Th buu mclude a k me wpon sniidh
os and Is
a clocK
aMsmUs a equla sauenu e alternctive

eua duratin. A Aimgl -0 tnamsmusion ds3glesed


20 4 a lock yele or bus aele amd delumes
à
tme Mot
Al eves stuts at Tha bgmnung aAbkyk
plock.
0
AStntronous (iming

wito asymdhonous ming, he occwne o neeven


ma bus ollouos md debemds on he ocuALnce aa
evous eemt.
No tlock
Bus Arbetaatdon Techniqras

ko Pnv
hugn prioy

Dausy Bus Module Medule2


Module3
Gnamt

BusReauust
II
Bus Bus

PModule 1 Mocule Module


a
PoLL
Polin Count Linu

Bus RaauntH
Bus Buy

2 Modul 3
Ldepeudent
Mocule Maclusle

Bua larlJ
BusReuezi Bus
Gami2- Bus
BusRenet2
BusRegut
ot Seual Method:
Daisy-chDun Methocd

Te Lqut bus uage lan e placed by anmy mocule onnecled

Te bus wvholler .qRamna u bus ouly o fhe wtmodule


ovructd
a modue
mocuule gtaoknd-btu,
loho has heen g5anted bus o,
ke
okeaA et hve not Saqested tu bus, will tosoasd

ue
e moclule who skauing

bus, makes the buy ipnal


o qamt wmts
aet' amd use
To

e
bub. Ata Maig bus, hmoedule urset busy o
slnal.
isadvantags Modules us xed Pnioxity

Polling Method

Polling
tol lmu =h
ax Numbe.e, comudkd moduls &
Modulu squsts
bus coniuall laues my one o
s
bus uAimg Bus Rugustlme
on Hh AMes
poll countlinu
The moclule, Jor ohith pollng
saunu is alocalad bu
omd
bus bus coniolu, Aan st busy siqnal use

ioviy
> It
st by o
ä time onsuming
bus cotuolla
methoel

Non-preoproduchve Poltng> Bus wuull genated te


polung geqemo ort nadisOn hirh mat 329uost teobu
Tnda penduu Krquuar rbihnluiov Techniquu

Intis mathad, evey moclul has mneclid to te


avnd Bus
bus toväolluy by sepanati Bus gsamt
Raauunt

Tdivicual modul nun ALqu to o bus Aonkoll


Bus lemtolle
wls ouen Bu Requust Jin. had,
bap

an gm ea bus &o te module


o ehich has

bus.

ut u
Saquuuidfor
method wmeass

3ete leaJormamee
Bus nmd Memorylsamsfe
taleomputu has maay Regusers
A
Tpical
paitu mu
ollgi

be providtid tramsu nomalion om


bus sIuucise
Commom
usig Mutiplure
T'stt B
vsing

Multtplure; Numbu omuulti ploses =Siza o


Bus Ayeimn udiug
Austo
For fous Aeapstes
Exameple
Sia muuHpLxe- Numbe o
REgisteu
4-lins
Lomme

Se MUUX MUX
So MUX
MUX MUX
3 21
DCBA
Rasista
B ugil A
D ResistarC
Ragisb,

Funukon Table S So Rigister


seleetad

D
Mevmoi Iana

bstoreet
kiadtaaeaaadaertnakcon

om memey p
MemoryRead T tramsd Amlo maliou
alld ashad
eouctiide ewironment
eion
Read: DRM[ARJ
DR Data Ragist
by
Aelders Kgester
locaton speuified
mumeiy
MUARJ AR
new inomallon obe
Memey wailh, Tlo tromsor en sAald a aalled
AoRed nlo Ho memoy
Loile epeauon

keRWhuli M[ARJ< DA
Kagistps
- Riaistess e uAd t stiu dala tinporaiuy
Ths Auaistis
im tPU proms tuos aolus

Conhal nd Stalis Keestes


Wser Visible Kiget3)
Lourliv
neual Hur pese Pegist rogtam
Oata Raoistu Trstuduom Kegistou

Addsexs Ruaitbu -MAR


Condition eodlas MDR

se Visible Kagistës
mathme
-A uk Visibe ugstis may be aeunuRd by maams
*h frouisor exeutos
mguage Had
CatigoieA -Geual Kumbose
Jata Ragistz
-
Addsos Kayistau
- Condliton Codes

erenua!fusp0st Requsleus
CM be uad by s
progsamnn
opeodo
covdains Cheonnd sor omy ndue
(e-q: Requiv
Ambeused aoldhissng uutlions
dis place ment).

Aata Rigula Aata Rugiste my be sed py to Aold ts dola


Addaus Kequsi
Acdduuss Reaistes my be durotid oa piticulas addiussing

MOdLs Examplus
Seamwnt femti
Tndeo Reista

-Segum ounlaa helds tu addass e


w
stack Poimiu

e base ohe sgn


ADgmwviod addsessing

Tuces Rgustis
udd inde Xed .
as d ser tndxed addsessing and may be

Stack, foumiy poini t tu top e *hi Atack,, Tuus

allbvws implitit
TALA
Atak
Mstauuhoms need nef
etesamol
o
addsesing that is push,top and othuu
tovtain am expliut

Conclilion todes (Hso lund to as Plags):


condituom podes l tu buta set by he roUMor asduOaL

Excmblo -pesitive or agative Aeiulk

Zexo Ruult
ueulow
etc
Ckol nd shtus Riautex

ompleyd Ho amiol &a oheion .epro Uor.


Rists
Not visible to fhe useg

ase essential to instauuio exeuluo


Fou Kuazsins

O Promam Lunli
Tnsbudim kagisteu

Memo ata
Addss Kugual(MAR)
Memo kagsta (MDR)

7osa Aounliu Antaiims the adduss ha unsuuhon To beertud

omtams the umsucion most Miaastiar


Instaudion Kaguste

etentlytthed
he address ela ocalom m emOmo
MAR contams Aonitimi auoeo d
MDR MBR( Momey Bulhe Kigou) thi wnd mDT
A cala be ti to mimoy
writfen

BRwnty Read

statusWed W,
knousn as PS
PsW,
PSW'l7osam induslu
a aet o
Aeglas Knousn
rocosors
Many
contain
lalis momaiin
h
*hat
amd
inomaion
othu Atatius inoumauon
D
-Comaduon cecle
Ho hu esult
slsa but
Lomlard
em Hho Reslt
is gu
Acd
susulted
m a caly nto
Casyset
CAS
om ebeauo
oa highu orce
bit.
R bovrow
out
Equal s a Jogical veonane s
seut equal

Overloo:
usod to n oieati
aithmefic uelpw

Enable olisable Uaed to enable on disable intiupti


TAtumupt
ha is execuutng
protussor
indicatus
whetis
Subevisor
Subevisor
usMde ean be
instuchons
Cextain revile dgd mode,
amd
ereutd
m
only subeuised
m supewisog
accessed onlig
antas am be
CRAaM memouy
mode
Topic
yowssor Urgani Katn

Prowscor Lonlains ALU, CU md Rrgulns

Tue kogic Unit) dou


Hu acua
R ALU(A»itmetic
e he data
omulain eking ol
tw momut edata
CU: Combo wt CU cortiols
mtb omd outaf Hs poussor amd
omd instaudhin

Aoliols hn oheuaión ALU


Ragilau : miimal inluna) munmey

Unik
Atemic dogie Reistos

stalus Plags

Sits
Complwmmi k
Athmetic omd Cowel
unut
Boolean LogiC

pol Patis

Inal utn oCPU


now hn combonuds oH
FsotRor Orgamigauon mamd
taska
rouso aeconnetk omo acLomplsh Hhein
Protsser dou
ho fellou8 ing hurgs
- Fett Instauciom

Lntubrct imiutiobn
Fetch Iata
Prous Nata
unili Oat

Feth Jstauulon
Tho prowA8Y
Reads m inshLLOLDM om
mm.ou4
is develecd dh detmne
Inlobadt Instuituon Te insuuton
oiat acH oms eqjuušed
seaune
o an intiulion maug
Fetch dati Uhe exeuiuon eL Z
am Tlo modula
lala aom mmoy
Readung ma4 ARajune

rotos an u exevuuon eqm instudiou


somu ëthmilie
losical opeatiin

on o
peroming
elata
Requuie LOmt
Wile Dato, The Aesut eam exeuilon may
dala T6 MLmoy Tomnotule
Gennal Rtaisis Orqanizaion;
SevEM CPU Aai tor
A bus ovgamZatuon or

Tnput

RL
R2
R3
RH
RS
R6
RT

SELA
t6 5 4 3 210
SXI MuY
4
Sx1
321
Muw
SE

3X8
Decode
AL O
sELD OPR

SELA
B 3
SELB SELD
3 5
OPR
outpau

Coniol wend

Kegistn Set wih Common ALU


-Tu o each Ragute i Aonnetid to two muk blexes.
S
oucbut
Do žh buses A amd B
ome
le selution Aines m eah multplexet seluuts RRaisles

inpul foi to qutiulas eus

Tu buses A omd B 0RM *h nls To a Aommon ALIJ.


he ancthmefic
Tue epesaluon Aeluitzd m Hh ALU ditemuns
be
iail au *o soemed

Te
Aoge microshealon

susut iu anailable pu 0utpuil dala aud qos mto


e
npik etae
uss Rugiilo o outpudt
is selestd

a decodas,

T
by

dtodes activalai vne e o Seyustei


Joad inudt,

selution,
Ragistey

Benas SELB SELD


Cooleg SELA
Nome
input nput|
RI
R2 K2-

lo0
R3
KY
R R3
lo
Ry
KS RS
T'oble o ofeodtPns peoune by
ALU

OPR
Seled DbeAanom

TrmsfesA
O0000 Tntiment A Tuis Hable zptues
60Ol0 Acdol A+3
Oo0 Subtiat A-B 30m selectuo

ODITO DewmutA Dpetm gmly9 11


AND A 8
olooD an nprusent
0lol10 OR ABA, B five bib

eol l00 xOR total 32 operatien


A
Complem
Rig A
6 lo o00 Shikt

looD ship Lel A


Toic
Stack bagamizalo

Stoves inomiln isLIFO


esde (Làst In Pist Out

teaddius ef He Aaule Aallud


Ths segisti
Hal helds

Atauk eineu
's valuu aluoays fointa
žö e Zsp
elumur

ack lonnlen

Teo epesaliovs oh Auuk Push

Pop

*7Lush to inut om elmut in Ha Auk

ob t delltu am ehynil foem tkstaik


is full
1
Alack u emsy
ehun Slack
setfo
stais Fll 1 ohn
bmly> se ti

wends
& Aeguua
tack A be olution ememnety

EXompls. 64- wod ftgisbn Atask

163 Pull Pull


full 2ot

ful
Empa Emba1Emb

C
SP
B
A Locaton 1 Loill alua4s
Stores FIRST ebitnt

localion .0 cuwauys ateieu AST elument


dntal SP<O

)
EM PTY1
FuLLo

Full= hew Tu js insutud 'uoih


push opexaluen
Atack uoiTh popobea
CEMPTY= 0) a ilim cam be deted hom

ush opealuom feuulu


SPSP+1 ncsemens Statk
tack
ack
LOnu dem on Hs top
MCSP] DR
if (Rehhv SP=o) en FULL
EMPTY FO
MESP
M[SP deneis emmey ond speu ted
un he SP.
byo adldress

ha
PALLUNy

ust iun
s
omailable

Zlosed m Alaek at
addsess
at
|
.
addies o.

Th Rst lem
s Aloud in Hs slatk

alatkul nat emst


A hew lim s deldludom te
Alaih

o dala om #utop of
DR M [SPJ Raacl
Halk
SP
SP-I Qeeunnevt
SP
EmPTY-|| Aeck.
Ydtu stack
If (SP=o) thm emply
fll
Mauk is stack not

FVLL0
A DDRESSI NG MODES
: Minakski

issus How ista addres ol am etexandu she fred?

Hew
ouku
#he

H
bet o am
otexaud addrulses
d
instmution vr9tza To
BheaLPM S
ttd instuuutim.

ta fe

eatiom teld
m instution
ut
Speu fies
be exeuutd
ofeatiuOM
on sce data
lha
beerlormad
This obeale
ompu Bgais
o mumei words

iu Hua
Atoced

on he d adasesg
modo ha spuchon
exeuulon dtpeuds
mode sheuifies a ulh o miubsetig
beloiei
The addaussing
Ha addks jeld
e tha iunsbutuen
modi fyin elerenced
Gbexonnd
As adua

Telhntguws
Most Common addossing
Addussing
mmediate
Diruct Addrussing

Indirect addrussins
ter Addressins
Regis
4ndiruct darening
Register Rlatie Addressins
splaumumt-- Base Register
Addresng

3ndexi7
Stack addaussms
0 Tmmecluala Addiuskirg

An his addoc3817 modde,


*he pemd value is #Ratt

no memory suerene sth haw


o
e
Holvantage
wntution
he ohexmd
et is fLAuixed
sbtai

linitud ephaand maguiluoh


Dis advanlage:

stuuhion
ohexond

Addbussi ng ovdauns te
Diect *ha addras eld
Sn his addhusih meda,
o He pexand
attual eecthreaddress
Sngtuuutir
A meme
EA= A

om address ield
A conlut o Opezama
M he nluuluon

AdvantagE
oe memo som amd no heial
Omlu
seguizLs
calulatiom
Suimple
dinitil addsus shae
Suaduantage:
rHu
Snoduuct Addrussing:
oadassenmoda,
addres eld sles o ihi adciruss

a wrd im ti mimou
unstuuuhon memo
A

opezamd

EA (A)
heue
¥Poiathises iinung

*
Cmiml o
EA= Acuay/eue
acltlus e e localuou Aovlaining
*a

N,
shace
an addrns
addsess spau of
Adwantag kasge er a woel denath
le

nouo awailab

Ren0
nsfor addips oema
monnoy
gequus t0D
sadwamlage.
ge
value
Lopesmd )

addrosi
drrectaddresig.
4) Raqistor Adldresin
naE sinulas to direct
sopes
ts ö
adldpus eld
ielcd seles
Kagu s
addkessin hat fhe addspus
Hhe
addsuis.
ham a man
memai
Ta 0ly dyamce
Aatha Sstudeu
eapMu

EA R
hscovllano a segii am instutom
operan

addussield R5is Jntinded


5, imaud
Aegis
He valud ds tovtavned
Ragisls
Chexamd Ln K5
aclavuss,
Advanlagts:
mly a smal! addrus eld on nstiuteu i ueeded
nD T con mrg memeu Aesmus
isadvatages
uuithd ugivis addks pete
vey
Covdovmt
Acdsi
e o qistie llbe ebeSmd n KLgtsto

(5 Registes Tndiect Addhusig


similas to ncluecr addruusing
But Mel, Hhe addue ield
euuctton speufes
ohose couiuls que
he add oHe
aAuga m the mmey
peaond = EA (R)
Advaniaa han a mnoyasdu4
ewe bili elut a egua
sats
kangr addnus

Sis odlearta Exba mmey Kiueme

uvtiunton

mome
obexm

Raguvn
0isplacemoud

Tuis addaunins
Addsing
mpde Dnm binns e lapabi lities
ndiech addsusi
e
amd gistv
dieet addusing
EA = A+ (R)
Three mot ommen uus oduplau mud addRAsAng

Relative addseivg
Base-Aister addiesing
TndaxtnA

Rrlative AddRussing
PC-selaive addsessing
he rogom Loutiu
lsocallad
n us mede 0nlnnt h he
e
nshuuion im
ndu
t
added
Hu addsis part et

to oblauin
ha hue addus
925
Examp lo ;aMm PC
uRutu =24
adoriss patin he
is nad emm mtmer duniny
Buldon at Localiom g25
Aouwti on cemenad bu s u
ebe hama th roAam
oue 826
addones computaion
o elatve addaes
Tha

Ts is
hective
mode
4 memBR
s 326+ 2Y = 350
Loealens qonarel aom t addius

*h nxt myaueuem mullens


uled with bronchtype
ctin
weS
aves addsus bi un Hiu imshuulion

z tontuuto coumt + addsess in


Efective addues
Paogsamu
instiuctiom
Base Riguav AddoOARiNg $
An hiu mocle ha eounl ea base Lgtiy is added t
e addssaI e
MBBLLLOM

Js assww.el
AD
9 Ha eechve
ibold he base
addihew

aclds auud
A base kegitu
res a diaplacemea
Hhe addkus part oA MBuuusn
&lative t his baseaddas
BatKaquster +aclobwss in insbuchion
=
Addses covl
EAtechive

mode
ed Addhessing

n is
Tndexing9 or Tndex

a
mocle ,u
addss anž
cprnlent

eam
am indix Reguxe
o
inutuuon
is added

obtaun Hu

ectve addiuss
CPU RRgater at ontaus
feld e
a sheial Ha ndtuhor unstiution
The thclx augsla
eld
am indar value. The adduss
addtK
eshef
a a olata
fue
Wnat
u mey
the
clelines

Each opeamd
begimning
in tte assayiu stoted
n Hhe memeiy Slaive

toi beginnung addsešs

Efechive addus= conlato indey Ruqi t edds


) Stack Addsessiv
A stack is a unea asAaK olocalions. list e
ako to as a pusudeven
A is nlosed
stack
kast- in- t-ut quon
LIFO concaft* a orm implied addrusin
The stack mede el addausna
nst muude
ueecd
mne Relerence
Te mahme msiucdièn
ou he top stack
beu

EA=top
Aduamtags
a
implLuty speaa

N
suk
memey mte

innild applicabiliG
ui adwanlage

Tnplicit mode
Tmplied Mode
an peuufed mnplicitlp
.ohesmdls
ueh as CMA (complnmuutF
Tntiuuchion
Exammple Accumulalon)
mhukonsat osse useam
Aquler Audeemee
n daut all

accumulalo ase mplied moda instuutios ae


Kto address mtinuehoms
M slaek rqaized
Aomuly

Modle iwstuchions
wmplied
AD 1ntmout os AuãboluLMud lode:

The aulo muemuns modt i &milas iAeguler indiuet


mode except tiat ts segste. cornt) s intitnanš

atu
ho executipn oHo instbuhen
Efeche adas= conunt of 3gastes tadduAsin insbuthio

No ncaemaut tha contuutel Regsliy R= K+I

n Ts auto decument modu,


ihe exeuuou oh insbucieu
duwmenlod elore

R-R-1
addess= contont ef segsts
+ addseus jn jnsteus
Efective

adokus mans addess e-openmd


Efechive
Numexical Exampla o Addrsging Modes

Address Momms
PC 00 200Loadto Ac. 1
Mode|
Addhes 5o0
RI 400 20
202 Next Tnstuuttion
XR
Oo

AC 399 450
400 700

S00 800

600 goo

To2 325

g0o 300

at
Tne two word ionsthuthom

200 md 201 ds aa
Load to AC Modle Adldoussdo

e
addsess

T 4st word eAo AnsEMLUTOM &peufios opesauon cods an


moda, amd Mo
scond wend Apeufies to addhess part

Pe (Pezan Couvta) has *lu


valus 2oo ethug His

e dnstuc
Te oriln e pootUs ARsler RI

XR Js 400
J 400 amd he cortim

ndux kRgila

AC (Acumulator) ALCves
o epeud ata te snstudin
exeuulad
bl modu , we caluulati dhu
For eath
addsus
possi

amd ta shexamd a eutive


must be loadel anlo AC

ODireet mode elkctive


addus JA u hast of instruchen

effecive Addhus=500 emmd 3 Soo

is tu patoh1%RuudiOU
mediali mede, oherand

operamd
=500
EA Atdp 201

(Induuet Mocle
Elfectie addius isAtoud at Hhe

addus at o nniudiou 'so'


> Soo Opexand- 300

(
E Pfectie Aeddjos

comntof
Pt +instuulo
Rilative Mode EfPechive addess addns
Pat
EA=ad9+SDO0
t02
-pexamd 325
Tndux Moth EA= Cotut o imder kigestn + instudiem
addess
PaAk
ootsvo
6o0
eeamd J00
Rgiuts Mode
Thesis no ecive addu entenl e o kagusta, Rl
will be loadid o AC

Rigusta Tndunc mods


Ri Loviluns ta eputive adehess.
Kugsti

EA 4o0 ema= too


(3) Auto-noomovd Mods
Seme as Ragistea indixet mocda , but
e covttent o
Ragasta
s inutmeutid o *ts exeulen he e
wwluuin
Eh=400, tpesamd =Too RI=40

G Auto-eemouled
Sae
Mod
as Regast wndireckmode, but
s Avrdunt

e
ts ecsLMUniad bulpe
He exeuulbn
kugu

etpexand
450
eferive Addluns303
ohesonna
adduss
Effechive
Table Acldhussig Mocla
500 300
isect
Tmmediate
201 300
Tndiact 325
To2
kolatve q00
600
Tndeed
Adokessun7
modt cive addses ermmd
ugis tas

Rugistes indiece 400 700


Auta incawrment 4400 Fo0
Aito-daciemani 399 450
COA Unit-2 Note Minakeb

Adderss
-Hall Addess
Pull Addus
n-bit Bmary Pasalle Addew

Addu (or Fast addu or aped addo).


othy ovk-ahaad

Halt Addo adus wo bil .


Hal
Hal
addu sa ombualisnal
ciruit
adduL
siruut of Ralk
Tuuth Tabe Hal hddu
Sum= AB
pu
nput TSMca
A B Sum
Qutbu-
cass

Full Addu hal adds 3 be


ciuit
Full addi
Aa Combmalupna

TuthTab B C Sum Cou


Sum- A ABEC
Cput = AB+BCtAC
Mmaksw

Adldilonm

GCoo Cau npul


As A A Ao
+82 B2 Bj Bo
Sunm
Sa S2 S So
Cy CC =9 cany output

4-bt bmasy addu duagram


Bo Ao Co
E0

FA FA FA FA

Cu S3 CS C So

A pauallek
addes. consusi o4 tull
addus n
4-butbinaty
wih parsy Aom me full adls.,
Aastade, outhut add
To he cany unput of tho next qull
sonntd
o duagsam eFul adds

A Surm

-D
D
Cau

Lout + ABc + ABC+ABC


ABC Propexties

ABC+ +ABC + ART +ABC+ABC +ABC +=x{


BcA+AJ + AC UE+8J+ AB [T+¢]
BC.I+ +AB 1
Cout e+Ac+ AB

n- bit Bmay aalla Adder,


An n-bet bimang paral0)
add adds n-bit numbes
An n-bit buvnas Odde uA n lladdus
addu adds lwo 4bat binaa numeeu
An 4-bit bmasy
exomple
A Ad
A Ag A
B BB B1 Bo
Mnaks

Casny Propegaluen P= Ai RB; Bel RHS dos


Casy Genualun
Gi- A B not Aontasn
wC
e output si =¢@c
CitI =Gi + P;q
addis wsig
mLati n-bet rnk. sany look-ahad
tues wo equatuons

Examble
adde;

For
4 bat
4-bt i
camy look- ahead

emove he dspenconur e Ci+


o h3.
9m Ci ,
we niad to
To

express Ci anlo A,Bi amd Co .


Cl+1 Gi tPeC;
Puut

Co+Got PoCo
C Co tRCo
CI+lG +PhC
Ca + RIGotPo Co

2+162tC2
C3 Gra tlG t P LGo tPoCoJJJ
kovk altad Adde
Cany
n-bit parallu!
addu-
batk, ef AoMhiclid
DAa ull addlu)
-7hi Any output oni Atage(ei et ull addon
*o next "hishu sdagel
to Hhe Xasy nput
is called hibple An
Tuis Aah not be produced
iu Aum amd AasR Aam
Thueore,
until Input Cany oCcus
Thi
This
in addilion procos
Tuu Lead t6 a lomu delay
olulay

dulay
u kneeN as Ay
propagatuón

Addes
sAy- Lookahtad lowea
look at the
Tuus mchod

ole bis
tlzes logic gatis
and addend.
to see
To
hghs a
o%dos
oaugerd
is
caty be
qunuatid noT o
uss wo umions
La look- ahiad Lomupt

Fropagali (Pe)
OCaRAy
(Gi)
Casy Gjeneroti
Full addlar, using
uwo hal Qddvs:
Sum= A P @cq
At
2
G
t3 C3t1 Ga t gC
Cy Gas + B G2t P Ga1t R LGot PoCo]

look-ahead HeLa Cass eyemsation


4-but Catsy uiru

Co
Po
LD
A
B
P C2

Ga

Az

D
A
Mmakslw

4+bet cuy lookakoad addu irit:


Co
So
Po

S
A

D
C Cy
-S
4-bt
Cory Lookahtad
Addes
Block
Dianam SI
Ci

So
CoF0
Mnoksui

Siqmed Muli plicaluon'"(BoothsAlqovilhm)


Flow a t

Stost) NOTE
iklialisalin
MMultiblicamdL Loast

8 udtiplier rumba, of bidk


ds
vo-0
A O
ho bits
h

10 o/
A-A-M

Sht Kughe
A o
Axithmehic

n=h-1
NO
n=
Yes
NOTE

(orsignbit) Rusul in AS
MSB
is 30
aud
Rultis positive STOP
H maspdtuce
tha produet
bet 1
IfMSB(orsign
Kisult nlgeve s o
tovnplmmuwt
take
get
u magnitucli
amd
AqS
plae neaaive
Swd Booth MuT pli catiom Exampl

Examble
)*(3)=(-2 M=- =25oII)
loo
-M=lol1D
7acig Table

yo Atuou/Commnt
A
inilalizauon
STEPO
OolI
A=A-M A= A+(-M)

ooI1 100 ASR AS N= 3


STEPO 3 110D
n=n-
ASR AC V%
m= 2
STEP A=A+M
ASR ASV%

STEP1
I10
o n=h-
ASR
n-h-l
A 8,Vo

Reuult
A g
11oIoll
st but is ome,
So uHuuult is nujalire,
take
aud place
&'s wmplumunt
to gt maruitiole

negaure Ain

Final uult: -21),


11lo oll
iscelunt
+
ooolo lol (2)
Munaai
Arvran Multplies

Buinay Mult plicatuën JA don by doung adoli'Hions. fartial Predue


tu eathr
mut pli cand by
by
n Aummur u
aut dalulatd multiplpna

oo and pantill produes


bit muliplier

DLAL un Hx3 n bmary Array muth pue

A A2A A3 Ho
Given
B2B2 m Bi
Bo
4t3-
produl
Numbes e bull

Ao
A A2 AI
Ag
X B,'B1 Bo
Ao Bo
Bo Ao ABo
AoB
X

A3 B AB AB X

H3 B AzB A BzAoB2
P P
Py

A11 Az AoB AtBo

AB
FA PA
FA

AoB2

FA
FA -0

Fo
Munmakaw

4x4 Bna Aray Muuktple

',
A= A3 R2 A o
XB- B, B, B1 Bo
ABo
Bo A1Bo
Az X
Ap Bo

Aabt
A1 Ato&

X
Ap2
Aq B X

P
Ag

's
Ba
Agb

Ps
A 1B3

P
Ao ba

A
FA
FA FA
A18/

FA FA FA FA-
Asy

FA
FA FA PA

Po

of 4X4 may Mulkipie


cinuit Buugsam
MinaksM

Divisin
ivision wwwwwgmd igps: Kustoin AlgoriAnm

Floro ahart

(STARTD

nnoc bi
MDivisor
A6
Dividend

slit Lef A6

A A-M

O MSB

RstoveHA

GCoT-1

n=n-1
NO

Yes

Kemaundzi
nA
STOP
Muakaw

Examble Divicle
1l
by 3
6) Divisor
Dividund=
=3
||

(M)
in M= ht|
hti

M 3 (o0ol Numbes
bii un
olbilk

2
M (I1o1
Traing Table

6 Actim /commeu
M A
loll Tutttal2ation
O D000
4 O0ol
0000I oll?
000ol
A A-M>
11 110
ALnJ=l
Restore A
OToj
ollo
t
1?
000D
o0010 T1o7 Shit A
A A-M

Ooolo I10o s,to RestoreA


n=n-
OO1ol100? SL AG
olo 1o07 A A-M

h h-
SL A
000lo 001? A=A-N1
ooOlo
Munals
Flow hart o unsismed Ttege Divisi
Non- Rostoninz Mathod

Staxt

h-umnbet.o bi
M-divisor
AO
-Dividend

MSB
A

ShittAagtAs
A
A-A-1 A AtM

MSB A El

MSB A
AtM

Ouatient im&
Romaundu inA

SToP
M Aton commnt

DODlI 000l0 Ool

Now udient in & =ooI| 3


Romaunda, mA O0olo
2
3 Sustie
Divždema)/ 3
(Divisor) 2Rnauntuu
Mialsi
Exomsle Divida by 3.
() Dividemd==i Numbe s buls n:4
(M) Divisor 3 Numbu cf is M= ntl=5
Nuw M 1d
I7aung ble
Aclien Comment
M A
loll Tuitiatizaiom
Oooll O0o00 SL A6
0000 AA-M1
oll?
ol l'o
11110 ollo hh-l
3 O1lo SL AQ
O0 I 107
A A+M1

SL A8
I11 Do?
A= AtM 11
+00011
To0olO it
Tdiscard
Gt1, n=n-i
SL AG
oo1?
o0lol A= 9-M
O0o10 001?
oY)
MSB
MsB A= un Kuult;
Quctient, =
(oo1=3
Kumauidur,inA=00o
1o=2
Minalei

Dvioe by

Dividened=
M-Pivisor
M I6l
8 ung
¥
=3 I
Non

6oi|
Ratoring mcthod

n=3
0-Subt
IAdd
A Arion
O000
TuaizalTom
1? SL AB
+1I DI A=A-M1

Shitlet
A =A+M:
o0
tCasd
0,00
0
Cassychb
o1?
f1o A-A-M1

Remnada ustieut
A

tM4+00 1

Runawndu=l duien= 2
Floating Pint Rbrueundaliön
a loatm t numbt
m u fprm
we cam Aprrsww
BBase, Forbimaig B=2
tsxE oord Lolth three telds
in a bunay
Tus numbea cm be stored

sin plu oominus) S


lcamd Mantissa
signi
Expoment E .
orSimifitondl
Biased Expone
Matissa
Sin
Formal
IEEE 7sy
Precision (32bit)
O Stle C64 bet)
Rouble huuisiom
bit| Bias
Facton bel
Exponent
sipybet Biasec
127 23 bi
Smgle reciston
o23 52 b
Double aeecisiom

hoiutnumbeus
on natng
Aepsaetinn

o
Tuooumions
Nomalizaliin
Biasi7
o posA tive

or negative
numubes
nunmbes
omalizud unmber
u one un ouieh a most slqniftcaria

For base epLbentatim

bbb--b X2tE
MX aTExponan

ohuu M Marilissa /fation sipificand


Becausr dhs mot amitcamt bet s alusays one, t us umnecessan

a numbe had is not norrmalized, hs nmber may be


Given
OTmalizod by shitng o
socdix paint to tha sight el

utmost1bit aud acyusty u exponerd accoreugly


Biasin95 is n
Expovrout
sloned
Repsuentalión bitsed

Hhe numbus
Sn siugle Pyeusiom Aase, 8 be feld ields
o HaToug 255.
valuts 0se in Ravee.
Lolh a bias e 124 (l1),u ru exponet
127 t6 t28
case, 1 bih kieldl zields he humbe
In double krcesiom
ueexponut values ore
o th7ough 2047 *hu
ith a bias el lo23 (a),
-lo23 o t l024t

wh 8iasin7s so hat e
bils in eshoneuts Cam be kalad
a usGned oa nonnegative
sbre
iieges.

L
As
stng exhonent

wmsigned'nuimbee ofth
M as tonplemout,
elelbnanA
ue Am
Poedsion andd
QULOS
1234-125) motmgk
AepRAsetauen
doubl ÞAeULLon mb bmay hunnbe
Fiost Convot 123-2s'
Ans-0

234-125
hs umbel
oollo Dolo 0ol
move e decimal einkH

(&Now Normalun
to ts mest
1
Bgt 0o]X2"
ool16loolo

reisioms 82 bit
Single
based exponet
C calwlati
E= EtBias
BiasedlExponent = tlo+124
137
l000 lool
2
ALm= nngatuve=
Mantissa (23)
Biased Exkoneut
000000000o
0001o0l 00 1lolool 000l

ouble heigion
G4 bela
expontE=
E +Bias

alulati
biased
= l0t 023
= l033
10000 60l0|
Mantissa (52)
Exponont (E) --
l001 00lolool oo0]
o oDo0D- 0
o 0D
lo00006
Kepasent 000loollolol' DOllo| umg Smgl
dpuble pattiMpm
PaecutonCmd

iven mbu o0ol oollolol O0llo]

Novmaluzed Numbe |0o||olol oo llo|X


Biased Exborent(s ): E' E+12
= 9+124
136
looolo0o
Riased Exporaut(DP): E'= E+1n 23
9+ 1o23 l032
100o00ol000
Snge ReceSAem

o1000 1000 olo00000 000|


Oollololool|ol

Nouble aecuinon

100 D000|000 loo||ojo(oo|| olo00-- -00


uA Rahiuuut oolooD|loo|lol, uAg
O000oo|
sma keciston amd dloubl Preceston

Normalig
enumbe
o0o 1loo |lol X2

BHased ExþononAn sP E= EtBias -6t|2¥|


121
0llilool

ed Expemet M r E'E+ B/as -6+ 1023

OlIlllool

single Retisuon

lolo 00000000000
olllool|o0o||0o

louble keceson

O1I1I|DolO00llollol o0o00-- o0d


AdditioM and ubtzachbn
Floalung-Poimt

Four basic phases ehe algouithm adolitiin and

eck, o os
subbauion

Augn algifcamds
hu aizi fieands
3 0Actd
Auwbtact

4.Nosmalize he Alsult

int Numbes | amdaubtracien


Floats Adldiion

(XX BE* +Ys)X B'


SEYE
X+Y=
X=XgX x BE-
YYX B X-Y= (Xs Ys)xBY

Example
X=O3 X|o= 30
Y=O2 x|o=2.00
X+Y 3X102-3 +D2)X |o°= (oo3 +o.2)x jo

23X ID3
23D
x-Y = o:3 X 1o-o2)X 1o= Co0302)xio3
(-17)xioS
tesame
Fr oatims- þaiut
newssasu
o
eMune
addittom
botw e
and sustuauton,
Spexamds hane
hR radk'x peint
is

expomemP alue Tus mmay seaune Alhkng


MOme epeamdi toaclieve algumnt*.

pocduca prue oese


ma
A Lodiluons.
oauinp.pouut
Expoment Ovenloiw
Expovnt Undu 4lew
StÝmificand witlule
oveulew
Sqiftcama
exceeds ho MAxjum
Exponan Over Plouo A bosittve exponaut
value: n A0mo Asuns,
possible exponmt

hus may be dusgnatid


as +oa
exboneut
s an he
less

ezo A negatire
-20o is
us han-127)
Eponent Vndu value (eg. and it
erpomet to be Sopresernkid
ossibla. uoo small
munwmum
Tuis meams u muwnmbu
ib

Simicamd
dugit ma
ndeo:
low
u
m
6
hu

kahtend
eajuuid
f
pmws aluing
Aljuificard.
siqni ficmds
šo

Aoumdia
e
addilion o
so ug e
icanas
luov Aquicamds
el

Te
The addilien
a Aay Out e most-
Segwficnd
ovesleo
tm Ralinmeu
h Ame btgn may
bet.
Tuis
be ixed bt

Agikcamd
7/17/2019

Phase : Zeio Ahetk:


sapotd as te ult
flow2Jpg

eittus eprmd sO, ta ottu

Sigificamd aleqMMNt manpula Ha

.
Phase

wwbus o at ta wo expounls are equal.

Augnmevt may
be alhieved by alaUg esth Hhe Smallu
or shilti
nwmbu to Agt (inCeastng expovtnt)
7
he Aanqs umber
nuntbe is picked fot Ahiltiis
6leLmall

Phase Next, tusa sigi ficamds


ae added togetay.
Addilion:
akmg accoumt heiv sigms

He
Phase ha
9 Noynalgation osum Thiu nosmalige
digii
rlulr.
Augmificamd
Novmaluzaioncnsis ss nonzo
mDst the Aui ficamt dia?t
ex þonen aud tuus
Jatwntil
Au Causs a date meut o Ho *ho sLuul
Eneh Fnally,
ause aM exbouwl UMdlleo
ADuld
must be
Aoundas o aud apodud

2/2
L -ilnni sala comimailu/O/inboy2proiector=
equsl slgnificdnds

No
Tncrement
smaller
exponent
zo Yes
gnifcand

RETURN
Shift
Significarid Significand
o
right overflow

Ves

Shift
No significamd
Significand rieht
0%
Yes
Increment
eKponent
Putother
number ín z| RETERN
7/17/2019
Flow Ch for Floa Mulhpicaluon

MULTIPIY

No
Add
exponents

Yes Yes

Subtractbias

RETURN
Exponent < Yes Report
overtlow
Overtlow?

Yes
Exponent Report
umderflow
underllovw2

No

Multiply
signilicands

Normalize

Round RETURN
Figure 9.23 Floating-Point Multiplication (Z-X x Y)

Point Mlti|plicaiuen
:
et
Ploalunp

Tha ext, srek ATp is


epezamd is ol3eao),

om add thferm
3uo
exbonts.
e expontAtm
he Mum
sepeutid asB0t
exbon
biased
aru toed
expoB bias muat be
te bias, qus,the
0ould hawe doubled
Am' Tue Rult could be
Bubhavidom ovelew,
either anm exbonovt wndue exponont

beRaborted
ohich uoculd

1/2
illhle Hinbov2nroinctare1
4 C ena rodut witn the 7ange, the
Axt
sshen sms
a.ccown
To multiply a griicamd, takin into

APtstu js salulatad, *hu ssut A nrmalge


d Aonded brotduet
flow3.jp
7/17/2019

Flow chavf for Plocukivg Divisjon


DIVIDE

No
Subtrac1
exponents

es Yes

Add bias

RETURN Yes Report


Exponent
averfloW
Overtlow?

Yes
Exponent Report
undertlow undertlow

No

Divide

signiticands

Normalize

Round RETURN

Yoit divisien
Floatunp error is issued ol
it dwisor 3Mo Qm
or 30
ult isut
Test To intiniy
3D, he uultis
zevo

if diw dend
i ubtAactad om ho durdend
n
Next, e olivisor
Tis kemoes
erhomd
bias, wuh must be
added

overew.
back

Cxponemt

Test ase made o


dwide
exbonen
umouleo
*he suificamdls
The nert sup is to
amd TOUmd
roundtr
Followed bnbrmaliaatiom

1/1
JonnillJA Hibav2nroioctor-
Kogic Micro oeaue

7ADgic micooteratuons
Apeuty bma eperatiom ao o
shumK
Coiideach butF
am Tuse opeadions
bls Atoaed Reeistes
amd teat em as buay vauablos
H Argule sepanalg

For Examble

-AND(A)
OR (V)
NOT
NO
NAND
x-OR (
X-NOR(O)

R 1olo NOR toD


R2 oo oo
O00
AND olo
NAND-
loo

ORJolo
X-DR 1olo

NOT
X-NOR
Sht Mucro opesaon

S Mico opeatuons
ane usad seaial toaMko data

pes eSukt operaions


-
shit lay
kogical shit - shit k
sitt
suit
Rigmt
Crculass.
04 Rotat
0s
-iroula
cirulas
Kigtht
kit si

Anithmutic Right
sht
Aaith mutic
Ari tEomate Aut stt
degicak si llt:

Rupisi

Aftatsl
Lestb bb_beO

kogital slut Risht:

abes
bbb Lost

E xownple
o bbe bsby
L
oooIDTIAP MutRizh
Kolalt
cisulas Shitnlso kncuon Qs bheatuon
Ra too ends
irulas sthe bi e to egislwr gncumo.

othout doss aintoamaion.

Gsula Riaht shitt


creulas apt shit

be bs bubebbr bo be |bs|bu ba bLE


AH uulas cet suik
A-fs ciaculasRiaars

bo bs bu be bb bo b bobbaE|L

Exomple Risht
ooloT dvaulay
I10010ll
Circulau sh

humoe
Aithmeic shit a Alqmed bmau
Pn Arithmaic Ait pem
Aukt

toha Jat
igtta Alm
keaves
but uunthangsdl
Arithmelic shlt

Prt milic Kk Sh lost


bb oo o|||
bbebs bu ba ba
Lost

bsbb bolo1
bbrb
Aith metic hogic Vnit;

CPU Codauns ALU, CU anmd Rigislas

ALU s locial epeatioms


amuol
on antthmiie
sponsi blu

Basically
ALD s a digial Aäruur dha perons asdthmdic

deviston ama
opexatinsike addikon, subtaauoM,
amd eperausn ike AND, OR
logical
mulki plicouon,

XOR, NOT. etc

Tupes oALU> O ombinatuomal ALU

Seautial ALU

Combalioval ALU:

Di
So

A hithnele
Cireuit 2X
B MUX Fi

Cit

Ei

Ai UTuit
Bi
Asithmetic Kight skut:

abe bsbu ba b
Los
RuhtF
babbebsbyb b Aft Ahmelie
Sh
Lest

IO0I6I
Ciw

Xo
FA Do
MUX

A
SI 4X PA
MUX

X2
S4X1 FA
So MUX

S1 4X1 FA
So MU

4but tithmilie Ciruut eung obeuuons


deeremml
uncumont,
k addilion,Aubhactioa,
ett.
ma hansu
kasud ALU
logic
iruuit
Sequutial

k-iunput X K-inpust Y Comial

Rult

uuilt
Raisis
covtel
ADD
--ADD]
AND OR
Bi peranas
Y Atnes dala or
x omed # atthmdic logic
To Ragstas Aleei tu abproþaiata daa Arud on
Select JLontiol
whuth speomed oe he
heralion
will be slou
he 2uut
of oheaion
Pfuut
Me exeliion be set suh
seluch
im
tgstu as
gs may
may
Lud,
he exeuluon eeperaiue p negaclive
Aptu

werleo
a clansuem
pestive
3tno Aiud,
n0
byzu0
etc.
erc
O sage o auithmetic. legie siknit

S2 S
URitWomei
iscuit

FL
4X
SBsageo Ei Mx
Ai oaic Ciruüb

A-1 Shu
shl
Ait
SqoC |npu|D=
utpu b=
AtB B
AtY +Cin
Ad
O B D-AtB+I Add with casy
D AtB Sufbirad Loith Bo TOW
B D =At BtI Sbhact
.O D A Tsams AAt|
D Tntnut A
D =A-1-DecUAlA Ahm Sl ( omd So=l Hom
Ba B,B.)1111
Y input is
D =A Tkoms terA
huth
a a's cmplanmut

Dool Itmak
Ag Az A Ao A
+1 7+2scomtl,
uu staas o Logic ciuit:-
A+(1)
A-1

4X)
Bi Mur E
Bi 2.

Funclion Tabe
S S So ogic epexaton(E)
Ai AND Bi
At OR Bi
Ai xOR Bi

T NOT Ai
Minakali

COA Wnut3 Notes IT Debatmend

TAsthuiuon

The eperalione rocutOT


s deumived by
os
e antnution,
it
nstuciom
Aompulu
to as mauhune iniauutioni
exeuu Baed em exeue
tat proussos

Teakd colution e diheent initutioms


set
oad tte oteAsor's instuchon

sa benoy ceele al nstut u Compuli

A Computu
imsthutuom
a
to teerm speufc oherahon.

Elemvnts
oa Mathne indhucion;

Code
exaion
Souste ebeRamd eesence
bheamd zeente
Ktsulu
aalaente
Next wa tutho epealion
ohuuh Apeutes
aA code
HA Aoce knouon
eferaion
o be extormed
on hueh Hi obeuo
ohermdu
Kitumte
sekuwnie
Souce efetmd to be feukouned
ehuck will
see
A o
aneproduud oherand
Aha ansbuuin

Kadulr efemd kalAa the siuut


by

vszuhgm obe exeuled


to tho noxt
lountr 6bits
4bt 6 bala
epcoel epetand auhaun|9pewnda

4simpe nkulionfoimat
16bik
Soe0 nd ALuli Am be am eme ou anas
mMam eR viua! mume
fTOCa&Dr Aegisto

Tumudliati covilaimed
n instudin diuely)
I0 dwice

ae sepauetud by abbauviatuoma,alld
mnumonia
epcodes
Buchas ADD SUB, LOAD, STOR ett

An ingulom may Mame mamy


elda A ayout a sumple

etutim is knmen 0snstutuin toumal

pes o Trstuttión
aan be alasifiecd into threeRiagies
a
Most eemputa instucions

Dala
ransse wnstuuclions
Manipulaton inshutions
Porogom uontial wnstudin

ala -hs ustudiimsAause Tamu o dla aomm oue loeaon


To omptti withou Ahwmgng he bnmy imumation AOtE

lata maipulalion wmsbuudioms u hDie Hat peom tthmetic,

Aogic, amd Ayt ehexatons


capabiltiak
Poam Atiel m-uilon rovide dcésionmaking
he prosam vhen exeuitd
He path Yakn by
mtl ahange
Aompute
AData Trams er
me olata on me locaton o
msluuduoms
Wala troms ta daša tontint
aMotha oithout ahomgng
a o baung
olta To amd orn
Tuuse mulons
UAeol

To Reist
mens
EXample3
: a Kause o ow kejster
egistea
Tö amothe
mD momey
zet om a proOser
Meve desunaii
Store

ADad:
tkamae
a rama om
mmouy 6 Registo

bebueen
uco qu uul
ps a
Suoas movmiluon
Exchmg
Aegis To
omd memA
lumuna!
o proumor
Aigist

m
uuput
y omia
outpedTomial
outpud
Taput trans Kegs
povtess Sagalay
Duutput tsom kom
Kom pvuss
T epe ack
tooae Gaiu to
Push: Rmkom obslatk oussRtgist
dstnauiib
Pop
a
hamadu

Set

Date Manpulation
kom o's(gac) toto
roP tamatuevOCvl (omea)
to4
To hodestination

wosd1s

eoum epeaiens
n Hhe clata

Malaudioms
mami ulatin
data miD three iypes
diwicled
Thusi amba
O vthmoicamd bit mamipulaiuon
sntauctinu

Kogical

niuoopeilugns
Shtt
Aitomutic stutioms
Tuse mauvnors
L ALd DD
t m atthmtic epeatuovns

Exaple
Adel Aompull
Aul suM e A0 epeLmalu
tioo eheamds
Subtaut Compit oeun
Amputi he produtk euco oheauds
Mulab
Multby
Diwide Conmpuda quotieut oTuo opeomds
dise opermelA wtTh Cara
tesum e{
Add oilh CaBy eonupule
tha d mu wtt borro
Subtkactwih
boovCw ompula
Am Aa eq aeteand

Negate (2s
Comblemari)
1i
namnt Add
Subteu1
opesama
fomehexomd
letument

kogical nstauuubn
amd bat mamipuulahón mMuutiön
Daical bits
om Anuig
bimay ohealuons
etomn
matuution D
Kogical

stosed
om nistiu

E Xommple
AND Peaoms AND obeannols

OR oheamds
OR etoms
Comploment takA tontblomunt
e'NOT
X-OR Peom AOR 00nds
lea
> Dua a bit gea selctd bi to 2210

bits
Aeluilud

to sut a bet o seledud betu o1.


bib> bua
set 2eloctod

Womploymun
9 t mplumuaa bito loelid

seleild bits
aDndiion (set Anas)
Tel abecified
eamelu
Cemuson e
Test Tuso

mako logioal
Compane

Enable anlabls ornteriupt


At couinol lontto elc
homdlung,tun
Oiabe
ntau
ie wotd me
wetd ane
bels e
o e
he
Xh bib
shitt
Anstauiuons;
a e Jot n whueh
shits eperetons ugnt
mpied to
slut Rnt
omple keaical

ioeioal

A-itkrebic
Arithmclic
sup Kugtet

ugt a
Roat kgut
Rotat kt"
Proepom miol o rensa o Coniol msuuuo
A raam oniol type a
m
4tuudioms , lehon exeutid, mag
ta rar
wnwme *he
Na o adadses valu
tAovliol sö be altesud

umstuciovs 2peut mdulans qoaleig


Aounia onnd caluse

cowiol
rogam

pgsomm
onthal ingtuudion
Enomuple
PC oth
un bramthw)
Uncondiliona bma Load
specifted
oddsus

Tet Apeufed condulion ,eitarload fe


ump(Cbndlilionl)> addseB, 1 do nothig
oith speitied
basad ov eonduoon

flace auRe roram tonbol


unmp To 3ubiouiiunt
n knesn localuon,
84 CAL wowmatuon
Jumb
0 speui fied
addses.

Koun Replace
Mmlila Pt amd othes sugisloss

om u knousn locations

to PC to skip uxtnasudin
Tncsemnnt
Skit
eifhu
Test speu ked Andilions,
Skip conlaona)> ovn tonduluon
based
Akab ps
dlo noturg

Halt Stop
exeutgn
at(hola) Stoomen exeution, stspeifted.
ondilion ebratedg zasmuml exeuuon
whun Comdition s
Salusfied.

No ebeaaJuen
No ebeaton emDul rgsam exeuwie

input md outpudl Jnstautenmi


tmunal To a
input
Trams odat pom
bul (Raad) desnatton
soneboutfut
Tvamse
odat om Apifed
Ouctput (uinik)
munal to
to To rouse
Sturt 7lo Tramasa,nstuiiou
mikae epeation

T|o spim
0
nfoumalhon
Trawse statius
Tet lo dadination
a pecified

Awwesuon nsutuon
velu b Loords
Kamdat
owet
Exanmplu maluu in a sechion o
lymslati
Toamlatus
bed gn tabl eeoispoolntu
mumey
Lomeli te oovenk of uwedl pom
onet
OnL oum o amothy
Examle Conolitwa! Branh instutionu

Brameh ero

Bramh nat ziD


Bvamt
Bramh not Ay
Bath pl
mius
Bramuh
Branch 40veklo
Branth Me oueo
STOREDPROGRAM OR6ANIZATION OR
Smak Actumulalo0 Orgauzalion
oR
fvoussor Orgamizaton voih Atumulalor

ea@ze a
Lcumulalor amd
computu jnttis nuttd,

p am instudiuom Ceee 4oumat etih T


Prouor hasa Regiats eallid

pde e
Te t
ei tel
Acddses

fad Apeufes ke opeton


am adduss et opexmd
opexand

n
bertomod
Ra memoa
ie mad ha Aeru

FEAaTue ete atecomd oill be stored im he procossor Rs


EXpl Memevr 9o96X16

IS intauction
pcoelo Addus
instaucion eora

IS
Kema peRmd md daa
Numba efbkin oddius= 12
Nambui =&
omeno Lptalens = Prowsor Rigsu
4o96

S
he
bls
His
6
opeand ecdala

nahad, porusor peyeiwmu Ha ekeation Abeute b


Acuunualir or AC

opcode o
ha dots shaip b staad Bn Ha monuey
loealie

md connt Ac Rigista
Snstauckom fovmat

Most mMDnelds o instuduons asn

ppexuon field
wsh Apuitiel
tu epeaLen tobe teroumad

Adduss Rld wuth Lovtaius


he locetuón o opexanndl
i.e,

Mods
Ags
feld
mmou
iohueh
docaion

speufies
how opecamd us o be
ound

anl
emally CPU o7gauzaiuons

Sgle0 Actumulalor Orgamuzauen


Gnomual Kagiuta Orgamizabou

Sauk Orgamuzaien

ho vummbo
Ay unstuutiom
sevaious kungh dupendurg om

adaheses, at tovloins

oaddsisses muhuulon eam be las fied

On hs basis onumbel
Three addhess (nstuuliomM
Tuse addkausmsuiuen Lnstrunion formalu

Ovn adohuss aautisn


addsuss imtutiin
Keso
Three addsee înstuittóu
had sthree adduuses to specifr
This dosma ematiuctuon
locatuim
eistes e mennoy

Desanation addsens Saunee Addses Soueaddus |lcde


epcode

EXmoks: ADD R1, R2, R3

ADD RI, A,B

Tro addrens instauckign

Ths formathas onluy tuws addsuss t ape ufy aresis omemer


Localuon

Sourteacldes Mselo
epceede Dextnation
bpcede addus

Exanuples MOV R, A
ADD RI,8

ansutuon
One-addsoss
3thas onlyone addkeus do Aheufy a islev
ona mmo caxLD
-Tu ues an wwm plied AccUMULATOR % AC Regis 10
Ato om epemd seAult

Mede
ehtodsnddhesepea

EXampl LOAD A

ADD B
exD Adduss Tnstucfion
This ttauehon oma" dou ngt Aratam my adonIB eld
A Statk based computu do not u adduesa feld m mestMucHon
to eoum because Jpeomaa D
e operaioi:
two top dims o ostask
opeuuom

Gpced

Exar ADD

ex ÞRes&uOn
to evalualein
Note nauk base organiFocdion
iast it s Lonveided o Post fx netabon or

Raverse Poli sh Notuuin

Exoymple o neuihon oumads To evalue


am exbesiea

bxovmble O Exiom X= A+B)* (C+D)


Three ad.duen Forma Descuptio
ADD RI, A,B RtM[AT+MB]
ADD R2, C, D R2MC]tM[D]
MUL X, R.Ro MXJ RI #R2
He Ri, R2 al cgiutis
M nemeu leeausy
Too adds instauchens

X=(At)«CtD)
DescesUon
MoV RI, A
ADD RI, B RI-MAJ
MOV R2, C RI-RI+M[CJ
ADD R2,D R2-MC]
MUL RI, R2 R2R2t MCDJ
MOV X, RI
RIRI R2 *
MxJR
0L adlS ungtuullon
Descupuem
LOAD AC MCAJ
ADD AC AC+ MIBJ
STORE T MTJ AC
LOAD AC-M[CJ
ADD ACAC +M[DJ
MUL AC AC* MTJ
STORE X MJAc
Lohere Ptumuldor Kaqatas
Ac
to hold Hu
MIT temeay mwey loeaiin

wmt imtumnnediat Ruult


loeuon
KeRo adduUAs
Tastaution,

X=At8)*(C+b)
Post x
netluem X = ABtCD+ *
beseipon
PUSH A TOP= EeA
PUSH B TOP B
ADD TOP=AtB
PUSH C ToP= C
PUSH D TOP-D
ADD ToP-(C+D)
MUL TOP (AtE)*C+D)
POP X MX= ToP

Wauli a oggan to evaluae A-8)+C* (D¥E-F)


G+H* k
AB Thzee. addus metuhon:
Desaisluom

SUB RI, A,B RI-MAJ -M[ET


MVL R2, D,E R2- MCDJ ¥ MLEJ
SUB R2, R2,F R2 R2 -M[FJ
MUL R2, R2,C R2-R2 *M[e
ADD RI, RI, R2 RI RI +R2.
MVL R3, H, R R3 M[HTt M[kT
ADD
DIV
R3, R3
A, KI, R3
, R3R3+ M[bJ
MXIA/R3
uwo addhs instuutions
Descitstuom
MOV RI, A RIMAJ
SUB RI,B RIRI-M[BT
MOV R2, D R2 MUDJ
MUL R2,E R2R2*M[EJ
SUB R2, P R2-R2- MFJ
MUL R2,C R2R2 *MEJ
RI-RI+R2
ADD R,R2
MOV R3H R3MUHJ
ADD R3, R3R3+M[GJ
DIY RI,R3
RIRIRg
X, RI
MUXJRI
MOV

addus instucion
Dne
Descptou
A ACe MLAJ
LOAD
SUB B ACAAC-M[BJ
STDRE T MCTJKAC
LOAD D AC M[OJ
E AC AC* MEJ
MUL
SUB AC AC-M[FJ
MUL C ACAC * MMJ
ADD T AcAC+ M[TJ
STORE T MCTJ AC
LDAD H ACMHJ
MUL K AC-AC * MIK 7
ADD AcAC+M[G
STORE TI
M[TIJkAc
LOAD T AC-MCTJ
DiV TI AC AC/ M[TIJ
STORE X MX <AC
Keso addhess bstuchon

Postx Notacugn
AB- CDE* P -*+ GHK*+/
Desupto
PUSH A TopA
PUSH ToPB
SUB ToPA-B)
PUSH C Top
PUSH D D
Top
PUSH E
TopE
MUL Topb¥E)
PUSH F
TopF
SUB
Top EA))
MUL
Top
C (CD#E)-F)
ADD Top-are)+ (C+{(DEE)-E)
PUSH G Top-
PUSH H Top-H
PusH K

MDL
TopK
ADD
TopH*K)
TepGi +(H*K)
DV
Top (CA-e)+Ca ((DHE)-F
POP X (Gt(H#K))
XTop
Tcterial shaef
Uuus;0 OAd oroao exfAessuoh AtB*C us
Unituctien

S Ce acldhUS

Erpaesuompe

ro m
A tB ¥C

uAug
dudToe tcddss

due acldseS
instuo
AC-M[8J J
LOA D
C ACRC*
MUL Ac-Ac+m[AJ
A AC
ADD MDI
STORE

Tuco adduss fnstucion


TounuL
RI-M[8T
RI, B
Mov
RIR MCJ
RIRI *M[AT
RI,T
MUL
ADD R, A
D, RI
M[JRI
6FeRe
MOV

Ko addisS inshucion
Pran uum
ABC *+=
A
Top
PusH A
PySH B
PUS H
C ToP=
B*C
C

MVL ToP
ADD Top
A+8*C
A +B*C
POP D MCDJ
Neu lobC

How uCuld you nd thu nunnbe bbuh ?

usii a
auptem hos memmou o 4o26 words 16 buk peR LOorb

Size oT-
Rugsv Numbu bl Numbes of localions
Couml PC 12 =4016
Paogsamm
AR 12
Adldkas Ruis Number o bls to
Tasauilion kgab IR 16
idmufy4o96
Data Raga DR 16 LoCaduons |2
Accumulalo AC 16

e bi wm adds bus |2
Numbu ud = 16
dala
Number

A tomputis usei a mm0y e 256 K wonds 32 ber eath


H
bimy unstuuhvm Aode i stud ina one w0Ad ef mivney

The instsuchon has 4ow tou


Annduedton bit
An ehexatuon tode
and
A giste tar &pufy 64 seszsteu
An addus fat

DHouo mamy bel eter in tho eferaon 2ode, tho segist

Code aud adduuss pau? Fh numbs obel


Aau e imstuchon yorvmat
md sintlicale

dn eatn at nbus/ bub


au tae im the olaa amd addus
Houo many blb

mwmo
Avns
Numbsehwsids wm nemo 256k 266x lo24 2*2"
Sire he wna 3 bit

Size e unblaucuo=
32 beccaust 4ubrutim As
wesd of momet
Atord in Brne

Noof Induwdion bit1


e
Nmber eislai =64 2= 6
6H aLgjsteus
=|8
sb M
bua to idntity
addsess
umbea

bostuucom omat
Gue
Tnduuhiom
bit

Ibat
||32 hu

epcode Reeistes

6bi
Ads
18bi

bui in epcode
= 32 (It6t13)
Numbeus

07 Nuymbs,o
bels m kcodu
6
Wtumber o bs
0gistes=

Numbes bf ba inadiRnb 18
i) Formaloimstruclim
6 Addaers
Addses
tmdise chem|opco

Numbu ets im addsess


infput = 12

Nuubey eball
in dati ipat32
Out
QuuA
QULs for 256 ns tuctios and 1024 Lood mumY ud

e ouumber e bus saquuned in eath peefivstution

baurstuctian
kefec@nsea

As Four
ree addes imstunchem

opede A A2LA3
Rus
A solhnee
permnal!
A1H, Ag
Nexd mthuttion elunte
Ay
Numb epossib
Nwbes bes wm
wmstuciow=
oteda=
S
8

Huoel e docaiomS = [024


Nwmber ef bels iu adduess= 10 :lo24
FouYdses instnuh on

1o Adduus 1oaddus1o A lbe


8bit epteels

Nunbu e bei vn instuciom= y3


Lnstmuhon

epcode oheand) Jeteanda

ifoeamds ae tred im qster


nstuurb
,an t is Ralld ugukla

SoeREnce

cpamds
Saente
aua
instumetien.
iored in , dtom tw aallel
a memta,

o asthutuon isstored
4 128 Loovd
cA G-bt xed ongth
out ho numbu. hJs in otcodaand
ono hen nd n1 acldriss instiuhon
total nmbei e ossible epeatubs

ovmal
amtl a addkus unstucuonomat

A Ona addus instuln tomar.


m menmDy=128
Number
locatuevu
12g localuon =n
buts in addhusto dentifa
Nunbea

a 128

n
ht eb=t
bils en adduus
Nwvebe of
Tbit
16-7bets
addnes
&plede
PLe
bils

uber dn ebcode
bels =9 29S12
Nembaes eossible oh
eiatioru=
COMMON BUS SYSTEN S2
Bus

S
So
| Memmry Unit|
4096 [6

Read

AR
LD INC CLR AR Acldiegs
Rsistus

A
LD INC CLR PPom Counta
DR A Data
INC
DR
LD CLR
Kagesle

Ac Acunulao

edde TR Istuehen
Raaistiv
LD NC CLR
TR Temporay
Ragis
INPR_
INPR Inbu

IR
LD OUTR
Outf
TR Rgiata

LD INe CLR LDLooad


INC Tnumn
OUEK -clok CLR daa
LD

16 bat Common bus


Snstuthon yele:
w,ollowed by
An uniuuion cuele
conaists ean wMaluilóm
ollowed by
mo oherandselees, chak(if merups
stoes, zollowed
bey am intenupt
epenamd
a%0 enablad).

tlu ollooing sthaes12ubyels


A instution cyl
incluses

Fetch
Execule
Tntup
RLad Ha nert imstutuon ponm memo nmlo prouA8or
Feteh:
de ohcoole amd peom e
incdicated eheration

2Keude Trtupaet

mlunups
ane enabled amd m nlouuse Aas h
ocuDud,
()JDDLp PrOCessto,amd
Beruiee

nvolved
whun insliuctaddusg
(Indisect(
pnly
addittomal)

Aa am nmiuiuon
etlhed, Fet
t exonmuned
snvolved
myincluxct
or Sndnect
addaunsing
Tntwvup|
4 imvolved,
e
P

seausedopemds YExeui
wimg indnect
Aetuhed Instuctiontyele
addissiny. folbvoing exeuiibn, involved
eindirectaddkening
om ntesspt ma
be prottAed
hetore ho t dnstauncien dptea
Tgbauchion Aye Stal duagam,
inelieclior ncdiuchom
Epexl pexannd
Sfoxe
tnstsudior Ath
addtths
multple
felch wuJtipe RRLults
opepmdu

anstuhom
opesoncl Data heiand TlrouLTAlmy
ensudiom addaess benlion addaus
adlanes Operation chak
Caleulalion Calculalion
Calulakom docoduing

insauciom omplöra,,
Rn
axtimtauuionm vesfordadla
fekch

exact sequune o eedh dusing am instuuchioneyele olpendls


on a

Tnstkutuon Sub-uyele's ila Jlouo

Fetch cels ning etch eyele, am m huon s Kead pom


tawodse LQum.ter Aonlins
wm PC {Progtann

o be ed,This addeR i
he addAs et etinstaulon
Moved-o MAR, ad placed
on hs addhes bus.
a memo lad ma Ke zlault 4
The tonol nit ALqeM
ho data bus omd. Aopiedto MBR amdl moed to
placod om
IK And tRon PC J inaLmond
Jata
bus

Memoy

CU
RMBR
Coinl
addaos
Bus
aita louo eth ayle

4ndustct Cyee
TR t cordaims am
A eth agel, somhel
usimg
umt
undeRt addsig,
Ahaks
se aw induuct ayal
epeamo specetie

4odoumod
TsAht mot N bels of MBR, Leluth oniums
e adieAS RLente

mseszol to the MAR 22ad, 0 qet


oL Hhe desured

Then coviuel wnit Segpesis


a mime
ha MBK
adbS eheand wmlo

MAR Mem
Debeflo
Coel
inclsact umut

MBR D
Grdbuut eyele,
PC must be
Ha ousunt conent el

a inlvost
at h
has Oeuwred,
toDsei
An BUme nesmal attivily a
Awed so
the iniupt.

Taus Ma Lvrient e PC au ankzd


F M8R to be waitlen

mo ihe mimoly Te sheual memnoy docation 8czewedo ts


u us loaded smo MAR om heaovüol wnit
TL PC is Joadad wh fhe addes e a
nlomupt A0ultme
he nent eoill
besin by dcthwg
sa suutr, anstucom yple

appropoial instiud
bus

MAR
Memo
PC
Comel
Lnut

MBR

Covhel
addns bus
bals

Jala Plouo, minupt scl


Flow ohod o unstutkon Aycli each ans biuduon eleConiit
basic tompua,
psosanen
mimou
-Felch hemstuillon zom
indiectadiuis,
a- Decode ha instuton Hhe memeu
-Kead Ke ehuhive
addhuus on
4-Exeut He aMstkutten
do stip 1 tfeh,de tods a
A4,
exeuutte
Ma contol gou
next mstuciom
bauk

isenLounud
umloss a HaLT nshuchon
Tuisvocs
Aminus
Stat
SC0

AR PC

TRMtARJ, PC< PC+| 12


Codle
in IR (12-14)
Decode eperation
AR TRo-),T IR(I5)

(Ragisis or 10)=1

0Regsti) bndiacb=1L
o (disL

AR MIAR Nothua
Exeulr Exetu
Input-oupud Regsty Ralounte
insuuutiom Tnstauchen

SC&O SC-D exeudo MMemo


Rokence
InstuchHO
SC<O
Tht lorkast sepruta imiial corigwaluom o inskuuionLjale
amd
amalshou houo Mt onlkol delemines a|instuion tPe
alt he detodiva.

gpes instRutions:

pcode Trom 000 to Ilo e D=0


5 14 13 12 1
opode Addors8

Snstuuhon
Dy=|,
Reoustus Relerunte
opcoda II| Le I=0
5 14
Roesy 6peLatemM

snstsuhon ecccde III =I, I=1


Le D4=
Input-ouwput

Kaqutts RdeineTnstuuctons

CLA ACO ui AcC

() EEndca
EO clea E

) CLE

CMA
CME
cIR
E-E
AC

AC Bh AC
AcCIs)-E
E
AC

AC(o)
Compbmut AC
Complemunt
akulat B
E
Agt
CIL Shl AC
AC
ACCo)E
EAC0
INC AC-AC+I n uemet AC

9
SPA

SNA

SZA
ActIs)==o
PC-PC+1
(Ac(is)==
PcPC+I
eC=O) Hw
) )tRw

tRaw
Skip

8kip

sk
positive

ngative

aDc Ac Ad
PCPC+1

SZE (E==0) Av
PCE PC+I

(2) HLT S-oSis a stautF Halt wmpuli


stoP foP)

Memo Runte Tnstudioma

epexion Decoelu

OAND Do ACkAeAMRJ
DoTy DR M[ARJ
DoTs HC AC A DR, SCFOb

D T4 DR MCARJ
ADD DI
DI Ts ACAC +OA
ECout, SCEO

D2 DyTy DRMARJ
LDA
D 75 AC DR, SC-O
Load to AC
( STA

tovre. Ac
D3 MARTAC ,SCEo

PCAR , SC0
BUN
Brancv
ww.covduaonaly

BSA Ds D5T4 MIARTPC, RRARtI


DE 15 PC-AR, SC<O
Bvom ml
Sane Rutusn adois

TSA D6 Del4 DRM[ARJ


D TS DR-DR+I
Lnemu Od D T6 M[AKJ DR,

kip 3u F (DR=0)Ewv
SC<o
PCERI

Sen m
exeuuli
(Toto T)*O
Note ot we need ALznals

mstutlon ISz
Ra Aomgest
Tnput 0utput Tastuutuons

INP AcCo-7) INPR, FGIE0 putchaau


OUT OUTR ACCo-7 FGOO Qutput choRatla
skib on npus
SKI f(FGL=)ttow
PCPC+I flag
Skip on output
SkO F(F60 =)Hm a
PCPCt unlinuptmablo
IDN IEN=1 ON

TOF LENEOp idupt euble

inpud outpul lonliqunatuin

Serial Conpedei
ivpud-output
Conmumi cahen Kauat amd
TeAmunalX
ivfato

FnO
Raceiver
Pintis
fau OUTR

Ac
TromsmUl
Kyboand
ntuface INPR
INPR &bot input Rugut
Ac Accumulaton
F61T bat colial u op.
ia available
Thiu laay
And, Hhis Mag
sef to 1 w hew
sclaz lo
new

iovmution
30 ohun intosmluon ds
atcapted by ttatombilis

QU TR output Riqualu (sbib)

FaO is 1bitConhel lep 4PG0is 1 hm


AC To OUTR
tnatesnd rom
novmaluon
And hun F60 clearn o2mb
Tnstuchien cottes

by ls eqiuTos,
*The or9ani zalhon ea compuls cam be dalumed internal
u use.
e iminq annd cotel stute
a
md ha set
Aystem
ss dekued by
insfauuhiens
o AqOnte
Tue lunal rgawzauon
t
sf

feloom
oligital

en dala dloied n ili Regs


epeLauons
micro

.
a sequDvra e
is a bna cecle at Apeuftes

A anstudon
Lonpuilis
ia compulE
w.coohotuons so Aleved
an meme: (cal
arl

togethn
wih te olala
code
hn
Tun

.
nstuclon DADL
Aoihol
Conc
om memey
memBy
es. Tho
Thi
ab
T
SToredoam
Compulu
Mads enth instuetiom
insthution

tode of unshuction
To
ond mceods has
execuli

als
ousn
ivinpets ta bimauy Evey aompulis

a keqyuwneemic0ofetions
Mang
uviqui anskudion Bet
dhat nbtuck e
uo u
compula
ts

tode sapnubobib
3t is wualy
dinded
Jnstkudlon
Tm a speutic
operaton

s am mutu uaoup 6
acde pasi ubtoack
subtaack
code eheluon Auchas add,
9pexatuin
Aat dune epeáions

o
u
bih

im
Corbtnment

nn
en inaennenl

dupend
eft

on Fi number
T numbes bulb opcocde will
m conbilu
2 umbet eopeliom
ohealons
Comtol Unit: Coruol
tohal spnals provide
Aonkol wnit gmuals avtol Anals m
wnbulb o to muti plaxers in
twmmon
amd mieropeAauovns o
bua, lonhol unpuls
he aluumulatoy
PoocesorKeauslers,

Tnskutiom Rugster (IR)

54 i 12 1l-o

inpuls

3X8 Detoder

654 3210 Do
D4 Cpniel
Loic
contel

Gnatis
outhuds

IS 14 4Xl6
13
Decode

Lncummmf 4bit (Sc


aNR) Seqnl
Clea(cLR Cnunul
Clock
compula

Blockdua gAom
o onkol tunitobasic

tonol umuta
Componuds ok
0- Two datodus 3 Comhol koac galu
0mi
(2 Sequomu coum
-hn instauduon e ead om mennon is placed m he IR egute
Sn toel wrut ttu IR is diwided unto three ba
ILit (Tndinch bi)
Ha epesneriom Lode. bit l12-14)

bet ot 11
a 3X8 deuocler as 0utpuls
Thaoealuon code bi aL docecled by
Do to D

Bat 15 ttamaevud doo upflop


I
Bs a h
T
outpuse
A-br
o tsough 11

Sequu
applied

oumn pan coumt


Runlis ast dceded. una
to

16
covtuol

im biuay
logie

timining Ainals
o qalu

o AD 15.
TOto TI5
Te

S am nembucl Aleased.
ppumtu
LDuuu
SC Cm be
be animbuo
Hhu sequnta
tb provice.
Tle Aaquenu ha counM ds muUrkad
Mact ed Ste time, ds oleaud to po
inauok, ta Lourtu
iming Agals, Dnte to be To
uuns signal

Caumg
Ho next athive

A Anemnkid t provide
shue SC
Aomicdea sas md Ty m seauana
Exomepl
nbe TO, TI, T2, T3
Agnaks
SA
to v
a dstocda outbut
At ie um T4,
cleakad

D3 s autive. Tu d expaeJged umubeli caly

D3Ty SC<0
Mic so epeAaion

An exeuuion e aA0auDntO
Tu exeubon e am inlauduon nvolues
Anled Ayalai,
Aubsteps, qerialy etcn, imclbud
induud,
Cosit e
Conist e detcth,

For exommbh,
m exeuúon may
md intabupt Aycles:
Edch Ayl:
is in

exeuuls al ojentuoru
a UU o moe
undunut
du madi. up

alud miroeperations.
umveuves
mso betwee
a
pa a
bus pa
bul al
mico speatiom
qmually
and a extaal
ma aM exteinal

A Avk bteen a Kopsug


eAui
Aegusles,
uma.
ALU efeaton
Aimaple

ropam exeuuon
Lnsteuthon

insbzuion Cyae
suion instuchion ele
pe yele

TrdluectExeuleTniovapt
Fet
T
mcro
ucro
beatn
epenuon peration
between operlon (nmatro opealube) nb
DuA nat as oento
ma&o-opeaibn.
An opeatuon ia
Pn efekatim
hs pavt ewnstrudben Hu speufic

bmaytede
at tille hu rombulusTa pedovm

Tusk aoperation

Th oviuol unit geceives


s mmstkuion kom 9movmeydmcl
a
nti pAelk
e opexatom codle
to
betsH hen
initialii
issLeLs

micro otetons
Beauante etondtrol sugmas
im mtena computiv seses
he comhol a sqonte ot
For eveoperauom code
For 4sReasen
dssues
on eperatión Lodle s
mlcro eperatoms because it
Bvmutimt
alkd a macv ehenauon
Apeufnies
a Aed o micro eperatiens
dwind amd Micro prokamtd
Hard nsol
ae anv we t1pes o tonmiol orqamization. A contol
umt em be
implemnted uung two technigus;

Hasdoined lontal
ut
conhel Uniut
itoprognammetd
wi
Had sciud tontiel:

orgaizaion,
e Aomlhel umt s implemwied

-Sn haudvoired ouu cicuits

3AR
0 ps, dtodus omd
aL
dizital

gonuatd by
#ho handane
urid
uAirg
said
to

ouolkgnals Ke Avihe!
ohmthe žehnigu0
logie dleuign
owerdonal
be hdwined

IR

Status dogic Conhal aialk


Seauonitial
Snal Circuis
bvFl
lock tonhelunit
Stutan o a Laduoired

uu a ixed dgie
To upetam instucion
unit
tovthol
Haud oied
and gunuate oppropiale signals
Micao

A
prohammad

mlcro-progsaommed
tonlia!

omho ts onplemnlkd A tDAAMna


aproac

Te a sies oseuenlea) mitotpexations


eouiznlunit
The ovilkal
inihais
vosiable.s m be by
upaiuitid
a STRia e l' m
D's ealled

A micrepAoKMnmed
a Aorboloend

vaables
AmMol
otu
umit
Alod
an comial
mumo
umt whese

tol
bunang
unt is aalled
A momory hat
ss paut o aorhel
Hh atiagg
Covdluol mimoiy: memoy
Aonhol memoy Conuol
tonbiol tunut 5 &low
m the mitroprogammed
nuicro pron
Skhe
Cmad a
ue mmu
Each od
in covinol
Apeufies
mico-instaudthon3 A micro instulion
mitmmiuulion. oHheAysim
epeations
Ome oi moe mito a
OMEU uteu
micoinslaulibns
A Seguene
microbrograrm
vaácrnape
pogam
A Aohernt otionmicro
Code logically
Micvo Cole
mitro-
alled
D moe mico obenie
A
md a
mitro inslsuduon
Am
sequonaemicoinstusluon(
AMAe exeuinom
mico
eone
frogm) m Auie

u exeulion am
wmstihon
Micro pronom naadl Lool ogamu aho

Extesnal
t Next-addrns Comtkal Comiol Contol Comtio
Genualesk Address
Memo lata wend
Seguen) Ragistas
(Ror1) Registes

hext addhess inlomaluon


all
JA AAsumad
to be, a ROM, wthun ohuih
"The eomhal mimo4
peamanmlly stoved
omao momaiÝN
ha. addhes e mieroinshuclton
The onhol addsus AtgsleaAheufes Ha Beaa foD
micoinshuilon
nd tonhel data AEsl, halds
mww.ow ene eL
wena tat Apeaftes
Tha micao instudio amlamia Amial nii these operatioms
dor he procONSos
MOAR. itro efexaduons address.

AL exeulid
o Aho) muit detnmune the next
n
be He ome next
el tiu uext nicoinstrulon mmauy
n tu
Tlocaion
sA ALguome o tmay be Aocald 60nue
WhesL elst

oniol mime Aalled a_micsopo09Ram


he addns qmisalo
ws Aommelumus
adw at
hort
as t dotesmimememey he sequenCe.

Aende tt vol
Js Atad Aom
Orqamization a loel MooM

Fettw
uyee
Rouune
ump to indgge
Indinc
eucle

Jump toExeuti |)Rodtine


Aucle
Jumpto Fetth, Rolwine
Jwmp to opLocle Exeuta yle Rouline
Rowina

AND Rauwtime
fetw or
Tump to
Tntpr
ADD Roulime
To Fetch or
Jumb
up

TOF Rouim

aranged
n toviihal

ov mitro inluvien
Ts hows
his shows Loiuol
words
roulu uexeuled
tobe exeuitid

nw e
un eauh
mico insuion wifha
bramt ojump insiuuclhor

Eauh Koutnt ends


Aqulially.
indticatina
o
Go next'
olut
Microinstrutlim Fesmal
20 bal
Exomnpe

AD
FLFa Fs|CD BR|
2
3

, F2,F3 sheufy mitroebelua ouslnttmito oheralisnu


ead F doues
seen
Noefor 8e40 (00)
Dnt operatin tor
(6 6)

CD Field selecks status bit condilabvs


ha tupe ebronch to be uaed
BR field speifia
a brdmth ades Vks
Tla
eonaums mumo
AD Tuseld
AJ eRis eld dpends
pnw Hhe
Amko/

mens 2"TLwnds
He AD has t bls
thal

wm Comiel mme
Aloizontal Micso pAeaamnad (Dveolwnit
m Hat a
dutodad bmasy torrmat
The aonkal Agnals gar subyusented

1 bit peni conhol'Atinal dinh


sa3

in ta pretokor
ae puunt
S3 contol aignads
at a ims
ant be enablod
Algmal
Move. ham 1 covilhol
Aovuel oond
3 duppois
donge

hext Adas
mitroinstauchon
tondkuon
Jump

Bus veaiud Aials


Cokal
Tleuna!CPU
Aigals

hoaduoase (detedeng).
no addilhonal
seaiu hm Vextital
nitvopisgrammned
tastuv
tovhol unil
Mlltopaogawmvntd
Veri cal

a0as
haxl mitoimdulion tondiuon
Jumb
Funtluom Codus
bena

al spuitëel
m U emocod
he
The eomhol Augnals
ma
bië aru Auised
-For Ntovluel Auals Lon,N
t Auppo khole Atiol weds.
ogenvali
(decooders)
Aquiuts am addilionalharduwas
Conol suals,
Hhan hDri zonlal mit>oprogammod
slowea

un wu 64 Mal tonhel Alualsin Hu


LLASupbese.
Aystiw
aml nhe ID24 wod tonuel mumouy
herizoniad
h md oul As dtgeamityoinstuut0ns

and vetoal bch

64 bi Jou bu eovluol sugnals


Horizontl-
to because wnds to2=2°
Addus bii
Az mitoins luden riolApal bb Addsesbel

veicak Lool Ainal = 64 26

Nunmber o bib trcomnal Augnals=6


Addsos bi > l0: betause lo2420
mieo insfuton
size ovelical
bils Aeldsesbe
Combal MGnal
6

16 biK
UA Cgnsi du a Mülropeoa nad CU,
CU Aas
wlunt u24 to6id
to supbent
ADwinol mwnu jaused Tua

So tovhol &tmals amd 16


flaa oonditou

U)Hoo may bub equwat i tonkal ond


(t) Lohat i he Atze eomhol mmp
oricoinstudion
PrAl oryma o Coduol ioerd

Addsns

6
Cowal Anals |Conduliin lans
bitb
bu
Hpaizonlul micorvrami
Aigu e cel toord biv mirdinulen >|So 410
Augnal 9So (bit pes
teothel Aigaal
obis tosmhal
Nwnbese
eCause 1621
Nuwbea bf bih for fthgs
buls to becae loay2
Numbe o addsps

64 bit
sige e
The eachv vnnel oeRd
9 lo2y
has wBold
Comläol mmuuy
o Aoniol mey= lo024 X 64 bit
Sixe
KB 3B
3kB
Mitoprosamung so

)
Vestical Contnol sugnalk)
buls
6 becaus
conhdd sugral
4 [o
bis
Addus
tnmholwrd
20bii l6t4tlo)
Aige o mumbh 72 20x l02y
Aie otnrhol
3k8
iCro pro9am Sequunci
alled a micob
miaopam
The nIt addueu qresato ds Aomuelimuts HhatAs

seqMt, as t desminu he addaus sequwnw


Arad pom Aowhel mm
o a microprosm Aequemte, Cne
ypico untbons
adds sugsuv by Ovl
dnemwdirg ie covko
Aondnol agisbi an adouess hom
Koading nto
omhel mmp
andein an exuna!addus
koaduing a to
inidial acduss stant ts coviol

opeAdibns

AddstS Sequoneg
al stoud m cotuol mumou
n 9houps,
wth
Muoo instaudins
eaou a Apuilme
specifumg
Aoune
Eash Compuitiu unututuon has ii own micofaogaamn
M Aoel mumouy gnuatt
e
microoherduou
thar

exeude imstsuction
uust ndago duig to exeuleing
stebs at tu covntel
asvMge ompules wnstiuctón1
is Loadud into
h Aonual kR as

Am initial addus
ehow
s linned on
in dia Compute

Tu
addess Rgusta
addkess s uAually
ee
pouwer,

addue otoDsost micro


tat achivatis inbtudioetuh
unstaudiom
ROulime
ue Lmttol umt must gohrough te aoilme
**2
HRar detvmines he eltechive
addus of

opexama

T next stap is oqenuae the microoperatioms


om*e
#at exeuti ha imtudon ethad
mo
wfor mauon kom to Msucuon
Cocle. bitso
locadA
om addness

RilRed to
he inuln is
pvikol emou veheje.

im a lilal mume
heaiued
AddRLS Aapabiuüet
AqMOvnlng

ntemenling
he CAR biam,olabenderg
o condlilönal
nondlhmalbii
On slais
bromth
omnduluin
tho bil of
Ha nshuctim iam
rosommumot
Matping
addes o Aovhol
call
eAOun
Aubroiuino
A faililh

cokal
The mitro-imituchon nonlauns

a set of bil
omiial micvoopeauwns
a ou
to metkd by ohic
ethe biiaddussheufr
i obtuned
AEX
Extesnd
(MAP)

inpu
S MUXI SBR
Load

|IntsemIn

MUX2
S selut
dlokCAR

Cowna!

evoopedin
mimo
CD S
Coduel uYnD
Aiuwntea tor
uicoroRam

The t
Explanauon

multipexe selods

Extuna, kom
Ko
am addn
miso instuciom
0
onw
SBR)
om
amd
ousAQUIE
apul unto CAR
slalus
mndal

bif and
t
(

ists He valuL efa selectud

-Te seLnd mubopkxea

o sauut tet
u oppLed to dnput
Raste
lehic.

SBK SubReudii
CD eld omierotnstuiluomAtlech one fho Atadtus bii im

teseomd multplkxea

CD Londiuov Symbot
umconolbnay branl
alusams=
Tndeiechem bit
S Sinbit
Ac
Kuo vahue in

BR Bronmch tpe
TMP
o CALL
RET
MAP

Tpu lose dumn SSo T, + T


L TIo T
Reduted Tnsautbm Set Comput (RISc)

The cpnot oRiscC cuedatedure invol ves ann attempt


Ldute
exeuiüon tinmi by amblityin he nstuudion Aut

Chanaitoistics e RisC Mocesaor

Reladtely ew nstudons
Relatively w addwssing modes
Aoaol annd ie Msaucions
muod
wtthim Ha egrtu e
acces
Mevnoy CPU
Al dome
ohexatuoms

Hxed eaiy detoded insnudion foomat


ongth,
exeulton
Singe ouele mbtbuthon
am miczopoemad
HaadwIsed satho
Simple load
omd A otperuons omey acca8

Set Combutau (CISC)


Trnstaduim
Complex a simal
is To rovide
Ta esseial goal ecAGC anehi tectwe

eatlh ahtomusi
Hat is toittew in ish
Mathins mstiudon1o
lv

o
Jovel

chanaluistics
8CiSC aselitecdine oo b2SD tyeically)

-A bugp
umber onk bauitnens
tasks a
hat pedaem speilializad
SOnme instautions
ase uad nresnty cally
fom 5to o
meelaltype
A D1 Vave oodokAny
detnt modus
tormats
Vaui oble unntv umsmuuion
in memey,.
Tnstudions
tad maniipulalo eheromas
e lunng

pelun4
mstaualuons
a imolomunttion ihnique vehurby
aie oealapped m
exeulton.
Hhe uutpla

pe prdusig
|uhepeions
i onm
D phas a
imelmetatiem ihriqL
ef computu tuudions ehue 4NhmeuC

im do exeuuen
Oreop

Telne
dwided o Atagrs gl Aepnes
o om a fihe
pue
omd hese Atages

hike

a Aonrated with
Suuuun
ome amathe

Tnstuttons eviliy
om me ema amd
exit frem

anothua end
umstuilion Tougp
inuasu th
oveall
relin oaM Mpul
ne syllw,
ollowed by
a
eau asmaemt Aomsk

Combimatönal
druit
hw
iruitelowns
u
As eealons

ld
A

Ow The
data amd ombnalional
autput ol
ihe adagaAaa)
mbualouel

clock

put
SI R S S3 R3
S
Four petun
peseein
Aitmtic Ptpelina

Trutuition Piheline

Avithmetic ibelint

ound in vey usn abad tompus


Prnthynetic Aubepealons aloppig
eint operaduon,mult
pucalen
uAad to Lmplmuut oalng
nsk ef
xed fontmuwmbet

Instutuoy ipelune
-Sv huAtan, mstution ambe ereulud by DweUlappun

onnd
exeulihaAuA o omstulom yke
4etcw,dlecode

ACRDAL inkseasushroughput *ho AusTa

Aclvanlaas pelngrousos
-Tha Aye ue e ARduted

šeliabe
makes Aysln

o ipeuurg Aomplex
amd
Aisodvantaes
TLR oa Pplmod
desm
froCKer

Mamufatkue
Coslyo
dalenuyAAmoe
Tuatnuton
EXomple
Xon ppedineorgauzob
add opealuons
nulfi ply aud
- Exemple performing combiud

with aAtron eumbek


fiL2,3- Loth
Loith
a
n a Seqment
SegmenF
obe mmplumented
Eash Aubepesaion Ci

pitelme A

Subeteatons
R LR32
RIAi R2<Bi
Ru-Ci Mutibies
R3Ai* Bi

R54 R3+R4
Addk
an loadd with no
dala

TheveReqisos
Kb
eey alotkfpulbe
Segmet2 Segmont3

vckpul R R2
Segmmt|

A B
B3 Ru R5
A2 2 A1 C
A2x2 C2
ABtC
3
a C3 Ark Bt2
Ay B4 AX
Aut By y
AS B5
5
enua Cowideaions

mekwith
utplicalhoms

depsud
nied

of
i KepLaia Bmuo
data
Kask, mamy lunes

he an a ixed seaoa
Te ebexamdsaAS Through
all

a
sesnenlo
Aombinduonal reuit s; at
Baiy umit Asisis
eve Hho dali Shiam louoina
eAlovm's a AubesenATusn

veugh t pihe
hat hotd le
Te Aamnt as
imlermeduale esulti
separatol by
beween
zilos
tiu ag
Ki

wnda he
ws
Inlomaion
Aommm
belwecn
lock pdue
adjacen stages
epplied
to all egisless

Antol ta
smultamepusly
qeng throug
Task a
all
tak
a
as tha

sepnenti
Aelal

in a ohehoneovmed
eline

pipe luue sbges)


Spao-timt duagam For fou

gmmt asa muon e tine


hous ths ululization

dockcuele

Syant1T
S egmet2 Ts T
Segmont3 T T
T4 T T
T
Seont44

AsSumed
Nwbe etask=6
Tnstsuetion Prpeline

Tha phases oa compuln umazuelion uele owerlas um Fho

exeutiom

Tnsuction pyele s phases

FI- Fetc instauukion


DI DeLbcla instaudion
FO Peth opemds

Suppese
EO
WR
Exeuso
Waio Rasult
otaalun

hue am three nbueliins To


exeuut iTi+l ,Tit2

iM n0npipelmt anthiteMe
exeuluÝn
stsuho
2 5 6 7 31 D 1I 12 3 14 1Sclock
cles

HFDzFOEO WRFEDE FO EOW


Til FDEFolEO WR
Lit

Nunmba

Time
e ypks to complit

o exeuite 3 naks 3Xtw


3 inks
5
3x Aypl to
3X5

3X time to exeule
ompli itask

esLomblelë
one Tas
Tstutm exeulon in pseltne rchitectwu

2 3 4 5 6
dock.ayces

FIDIFIDI
FI
FOEO WRT
DI FOEO WR
FL DI FO
to
|
EO WR

h asks im k-stiop
Number o ycle geaused onplole
pipaluma kt
h= 3 (3insbudo)
Aucl)
K5 5 staes oinsluchon
cke 3t 5- tp
L
Ckock

R s
HEH-F9FHe
tp
by Algmt
0 phaA
Agmrut
PP tmeaken ireutto
by Aorubmaion
mtime laken
deay aALquliy
o Propagatibn
tp
axtimetaukuw
tp=max(t¢) +to oll

5-S fphelne
Foxmulas $
orphases)
Awicos k-segmut pielm meams Numbe enl K

Number e Jashs to be exewiled = hw

alock, Auele tune


= tp in
buy ask 1 o omblile k.Tp
Tme-Yakon

The hemantng n-1)-tasks,


me equal o Cn-p
uime
The fime-takm by
w 0ak Lng k-seqnent pipe

ktp+ n-)tp
= (k+n-) J+p
htabks using k-Aqpatnt ribeline
Nubet yele. by
K+n-1)

and
lask and
tu sama
smmeJask
kne mit
at
erlowmnshu
perlomns
Task
Covnsidu ahoike 7o ty to Amplie each ask
takes a ume eaual
o empléte
n TuB hth
hen timi Aeaused

takun b non-bipelene
temne
Aatio
S=. taken by ipelineAustem
Speedup time

becomis
mut MP, Am
Ps The mba etasks neanes qa vaul
approRts
K-l, amb kth-I
wnde
k-1
tiis Aonduluom
to Lbeedu
abecd u SS= tn
wesumefhat
e
h Tomi
ama
Taks To rAR a Lask, is
iri we
e
will
JAme im pelume non-pupLde

tn=Ktp
As apsdub kduu o
Taudung aumsion
S ktp= K
maximum pedup ttat a puselin
inplina)
Ahos Htat haguiical
Tuis
K (numbe of saaemt
Dm previde

Roaenty

Threugnput
nf
Hk. Rtn-1)
(kth-1)tp

wh
sexlomed pe
limt
nurmbeu oTauka
ouhpurThi
SR
Efficienty K
tev
The numba el tima unii (eloch yee)
batuween
Klamuy
is Ha Lateney baiweentun
nitiations fa
fitelns

by mse ometme initatioa


o use the some
a Aollson
CoUlisuon Ay atempt will Aause
ho samme
ulm ng al

Loill
Aause ADlland
kalunues !-thal
For biddam
nat aauADllanon

Peumisible Latincies
tat eill

table
table. is
a us8-olomens4onal
A hLvaton
Kiseswaluon Table;
Atp
orouusingelvrmw
Ko hlna
Ceumn lphLmlu
oyels
in
agAspondung
t
ha exeuluon datask

in to entuies
AX As placed

diitmu beineen
wMex (Ahekmarka)
AlAwaiou
Yable

For biddm atnúes


in e same owe{

1,6 6 5

XX 2,4 y-22
S X
3,S 5-3 2

2,S
Forbiddon Jalentigs={
Kalimuu 1,3,4
Penni uible
Rowallon toabla.
has n AOunru,Ha nmaximum
is ms n-1)
odelin ttny
pemisible, atimuy P oill salaf IP m-i

coluauim vectov Aollision


ectov an m-bt vecto

m= maximum torbildun latiny

C Cm m- --CaC
Ci= 4 Rolenui isarbiddon lalnug
Ci=0 ohawise

Porevioul Forlei dd
lalenctes 2,5
Exomupe
C Cs Cy Cs C
o oIo
gti Aaspam
om Aolbion veito, we
lam Aovau
pecifyuing
e
AucceEie iteadtiou
BRe Atu toamaitionu omong
ermi sea

olliom veiter rm
t initual Aali

hy Shutung
a
e he next stale
stato
p-bib
at tuim t+p is obtaimod
a gbl amd OKig
presud
intial Collinon ecto
otth
st
Ool0 Moretm 5

lol L0o
Katonuy Sequne A Jateny seqjunu is a seguenca o Perasbe
on forbicdden Jaluntu e buseer Auussi ve

task imiliaivms

Lshudw
is a ldtenuy seqBnde
alunyele
A lateny oyel
epeat w
samne subsequente (cle)
bndakinn tely

C0nslamt y- A cgleu ejle


a laleny yele ohun
value
AOntauns omly oma Laeny

un wlitw
A simpe ayel is
a latinuy Aylk,
.
Sumpla eulu only
onte
EAth tat apbe
les.
oe endy
Ae
*he
Gpeedy el Senu etio Limple Ycls all made wih
made wih
edaesant Aaks,
(mL ohose Ataine RalvntiA
A Reeduywhrse esbechveoltv mintmum oismugA Lo1tv múndnmium
edgas
Jalineiesagmtuj utgcints
minimum
0urmadbNllywsur (pevmusabl-1
GTreedyuelus Kelang

Ulol
o muninum
Susese
tao Jaaty
2
ToTBmin
lo Maxa
U maukad eith t
No
Pd urm JaTlny
Qupacr
Aesbeilure

all amtions
mtl 0 qrral,
hun umbe oabatk to Ahe1nikal stati

ane Redould
flouo
dha uh duagtum
atat
lb0lo forms imitial
Loiuon veetos
Aas peminsable Jaluny ,3,4
O do Auik I,3,
014-F

indial stato 100l0 Cy


10ol0 eDK iny voilh
Ishitt Right

100o oRing
hoxt ta
Case 3
oo CV
1ODlo
3 sutR
0010
DoI - D
shikt Rght
CV
Loki
oOl O- naxt sii

CasR H-ShiltRaan
0000
-nst sale

H has
Thiadtali Ldenues
TOI Too17 emuasibl.
3,4

is
Ths stala
haA 3eo(pemuBAblk)
also
cLnt 3
s 11o1

Casl sho
0001 Sto3
ool0 CV Prezeut Sale
0ol DRu naxtstai(ateaady

datinuy 3,4
stub1ooll aip Pesmusible

CRse 3 shi3 3 shita Kaanr


tooll7
000 1o

oolo

Cabe4 skilt o+
oR
Oo
m
Coneplelt stuli dua

hmunumim
Pemustbe
4 /3*
5+ mun pemusibe
aly3
Somaikacd 3
ble
"hnpenmussi 3
Jalany=
Swmp cyela
on
3), G
so
5) omd
(3),5), 5),@aD,3,5)4,

Comutom Ayee

(3),5)
cuyeles- Exauples U5),(314)
S7aeedy

MAL Mumunumn AveAGR atamuy

lalony
Siomble tes Aveaage

So MAL =3
U.5)
+3t 3
,3,5)
t3) 35
413

-16:6+ mlluon epeauo persecond


Teroustu put
=
MAL
ud
covslamt cyele
Thzoughpua
miniwn
Lontam Aydke
=3
mini num
Throgpu MOPS
forPuneioni X
Keseswoliom Tale S

For beddam

SSa TXX X X LaloncLe


24,St
Table,for
unuen Y
Kegecvaluon

s Foxbiddedaloniu
es

P2 Y

Ytable has
Y
24

n columnsa he omayimun
zesauon
rbioldum Liony
im n-1)
loteny p
ol BausrIPs m-
penusible
Cow

ollol0
3
3/ /s*

possibl Cpelas

MAL=3.
(,8)
(3)
C)
Averelaleny

3
6 MAL3
)3
3
.
3.0
3:0
Ot-y Cfat-1)
Meme Hierar chy
he moma hCYYch Sysem
ConJuls

a alA uan
lAo
deuices emp1

auxilin
to e
haCompuiev Sysem -fo Ha
-fast (but SAura

SpRa Regrer
Shon Capar
high to Slo) Cache oto igh)
Mema

CRAM,Rom)
Auxill Men
ZCmashetabes, dhsk)

(Mem Herave
U Ao str
Rense are fatet mamaoítR
amd mostxpenive:
Cach Me Slote4an re<ns, but fasev ttay main
2 mm &ha more trage4an Teistea
hain Mem SToraR moretan Cacha Mtm At
than Cacha
Au iila Mem
y mo but

9t ha maximm Capardt t
b4t Ssloest qmng aR daicus

Cheabet m alldeuiu

CPU Can direet Comma* t msin kmat Qnd


Cache mm cru Cay hot diYecHy CominsS ate

Auxi lia mmo

CPU
Cache

Memg
Main Me

Con plttv
CewmaR SHoa&
Yga qnd dd9 duha a
peratio

Da SeiCductay Re@utaehdi*qnt*
oh a
1yes of Má Mem.
Ma Mem
RAM only Mem
CRardom ACress Mema) Rom (Read

EEPRoM flarh
SRAM ORAM PRo EfRom mem

RAm Randim Accerr Mem)1( S4 a ualatlehen


|
C Bot rend and hTandam
wht A
Cr') Read Coess is

oersthoy Can be prfan


R AM ha too tybes
(a) S RAM (Staic RAm),44 makes
tStva líha
Called stahe RAN eca data once ifavmaho st
Sam doer net chanae) uni poer Stored oi Temáy
on The
denhh (mom cell/ Rrea)
iwe tahe
elatvely ass.
Teadwnk opersoy
So us acer
So 34isfartev,due
C for SragR
elechic Char n Te presen
rren aff
(apicitY ce
ce
Char 4n hdicats ustu1 Te
Stred
Stoved apseit d tes olt
al 1 macha Callea 7K
o9felecha charu 6 So

cel)
dhan c RAM Te mt
denn (mem a»
h a Crejs Hmt but
mae
S
manl

)RoM (,Rerd Only Mem): 34» .


te of mn mtn. X-
data]pn*- bot ar
ead ol. No ontt o reraiun Cen be reru
*CBat
RetttCeALsRom
verjtns of Rem ho perfuns wnA oPE ahna
aso andom atcess
ot)
t
hon-Ualathle (No data lost 3f boaev

hatue er of RoMs qe
PRom C Programa)e Rom Tus RoM CP
t
Ca ot
C)EPRoM
C
O timR

As
be

m%
(
mtammable
erased
On

Easablt Progmable
time poqrammable.
pm

ammed
oamed
e
R

wn 01ra-vjo:Rat
)
onte
rayS
mndod

This Ko

tAy H
CGn
eYaJe ohole
chan
erase

equire,
cp
hole Chip
&ttn pr *
Eafasle
*99h
be erased
PRo) Tis RoncKp
(I) E EPReM CElectital ia .
pgamalle \h trca,
i also mhFle
c wedto erak data at bykr
elecrical
Sins ar e Cup Pnaa
rata han raihg
Lohol
loCH leueR
ste
an £PRoM
aqan
FlaSh Mems 34 tmm
A almost
EEPRaM
Siy f£PRom
fo FEPRM
Siiavto
hat hts,aui
da APPAble Lch hmae
ofevente
The mam of
Yewnh
emo
leuel evasny
ue st Dut tis, 9tis Caed flo
NumenC on EAM Rom C
Ho Are hseded
a
man 12g x8 RAM ChpS
pYouide a msm Cahacitg
ot 2*94bgits.
Se of ona RAM C 12X3
taa Mem Capant
2244GX%
No- of M Cp= T4aA Mema SE
Ona RAM Ch SLe

HoMo
regiedfoY
mah RoM
-
Tat Rom of uKeps
C
o 24
bH
1=
x8 SL
16

aYe

NooRom Cs= Tor Rom Si2


RoM cpsi
4-Kbyte
o-21X

4Kx8

4X yg
l

Rom ciar
:
AM Chps & RoM
cúþs Cenhg h
RAM Cap
Chi
Ch
Seleet

select

Read
2
s CSZ
RD RA
288
d ata b
WR
+bit addveus ADo-AD
RAM chi of sile 126X6
Pi Ca
C Si, CS Too ciP Selec4 Com

RD
R
ADAD6
Read
wmt Coo
7L1+ add
Conbol pu

pt
1htr
it data Lus
Cs

'
fov R AM
Funchoy+able

cS CS R WR Memo funeion
Fhe
O O X
K
XI
X
nhi bit
dada

Hiah Imdanre

Mut dstato RA)


outputdd trnAAM
Read Hiohiapedantef
mhibit

.. ait

.
Romc
Ci
Cp
Selet 1
Select 2 CS
CS S12x8
8b1+b
data
RoM
SLit addresr ADoe nly

Rom eip
Rom c

CS CS
Funco

R tale fY

mem
tuncho
inkibit

Read
High mptdaue
Hizh ipedana
dutput-dha
tim Re

lis of addess bus


mt be
Hoa many
(1) Hoo bter of
Numomak ) ed to access a04
AS6x8RAM
eXample-2
sile
Chpot
2Ho man
adder lius Qre Commy to
are eguíre Hod many
(3)
all Cmpr an lis mut dAcedd -fsr
mast Le derddf
4) Ho
m
Sperib
a hu of dead
are made

S
Chi
elert?
Sho

detahled
Con
hou
igaHm
ConnecH
e Noof addxss

oX
Noo
addt qddss
1
Nofdata
es
No-of cips= Tot hmm

AAs As A7 A Ar Av A A AiAo

D--- RAML
AM

RAM
AnA
be den
3addssIhe (AgiAg, Atu) must
C Select

Decadev Si2e- 33X8 deadev Shour


Detaled already
ConnecAh*h
On

A Compttv us RAM ChPs of lbz4K apadt


12.2

(
sholdaîy
()Ho Cre hadad,and ho
ldhe i be Conacted tpnude ammapaity
of oy byter

CnH ta
to Cts
man
o4 K byHer Hoo a cis aveto be

No0f cuks hacda Tb-fR Vme- =lMs


On PAmjLe 324X]

-A AuA
Men
CanchneKPnn a
APO
L RAM A
1024 24x
AR
6 Cpr
Tot memay =luux
herha
cips
() No 0f 1024

Ay Au Au Au Alo
As A l6xG=|4
rs C
1024X)
RA
Conmch S 164
RA RAMIOJ EAMLCJ

AnJ
lemery Address map
Memo address nap a ta bictorial Yepresetahoh

ih
+qSsi3hed add Tesr shace for each chip

Sstem
*Memory Addve sr Ma Consts of tree Columas

(a)Components
(6) Hexadecimal address
C)Addvess Bits (Addresr Bu)
Components speáies ohteaY a RAM,Rom oY o
deice
Hexadecima
0f
Addvers

hoxadeéim«0
Column Sperify

eqiualent address
e
foY each chi
ashghe Yange

Addrers Bits (Addrers Bus) Column shecify tea ho 0f


bits regured 1h te address bs tR
oalua of each
addresr ítr The haxq addres of each C
deómal

obtaihed fron tea Ihformation undar addresr te


bus aimm
Hexadecihnl Add ess Bits CAdders Bu
Compohents Addrers 1Slsi 13 121) fo 8765Y321/

0000 H-olFEH
RAMC 2Xu
RAMdecdar
1-4)
Rom ci 0ocH-03FFH O oo0 00 1 X Xxx X XXX
C R
SambleEXample 0t Memoy adder Ma far 4RAM
Chps hd 1 Rom Cips
C129X8 RAM)
G124X8 Ra
Ahto RAM 2 RAm
clup, for RAM Size X
12,2

a% RAM
Litr
addeus
7S3 7o)of cddvet

J
XXx 21
Lits- X
Bits (-7) xxX Yepresefed a
h Start X hny he o Or 1
vale
O 000oo
ahd ihal
Valut

DitC8-) d
ued
tu represert
2X deCordoy
y RAm Cips as
fur ahhg uhgk
sy8tem has
4 RAm
chihs

Vaus tu FAM claps


8 CAddvertLi1s

AM
RAM3
RAM4

B4(10)-
Wed f daffe vewtiqte
Lefweey RAM qdRoM

o RAM
1- Rom
are Set t Zev(o) a3 tEay are net used

Bit C11-1C) hr wble Rom


of
Of Si2e SIx3
Ch
Fo RomChp a Rom

addey
bids C-9)
9 addHIs bit e reprerered

Fil 1111 11
Considavsidav
d Ro
a syan tst R.
M of
RAM Šize
many
12VXB
RAM
Rom Cps ŠÅLe S|2x How

t6 YAr and yo3 Les af RaN


Mem addss map
Noef RAM eir = 4-096bu 4a4434

No 0+ RaMckH -4036g- Jlex


S12X

SX3
RAM

ORAMg

RoM
ADg

CS
Shx
RoM
Addres Ma 19
Mem

MemaHddres A AAAAAA, As A,AcAA A A


Compoheht
RAM 00-0FFFH 000o y xxx **X
y

RoM
o
10ooH-1Ftho00
ooH-1 FFFH 1KR XXXYX X X XX

of l6-YX3 bits h ou
1 ARoM ch
Sclecth}ts
an Opemts t SV povev

JP Ho
IC backaq Dr sloCK agnm
and a bel aA, Mut ttJen--Jp
Arom outt Po erMPRMp Select

RoM cprClo24xs)

loddouy Wpts dda owtpt


To
No: of addts 1hs. = |o24X6
9 data
addes
N of dat 1fU2
Power 1ht-+S
- ND 224 Fhs
Totl iw 1o+9+11+1
A m
a R AM S12 12.0
A Comtty mplayd RAm cy G yXB
lo2

heCanlprtey Jyt he Kbku


k Lyter ofRoMm
ach wt-fouy Yehgevs mm mappd
',

Ltrof
fM
RA M)1
Conh gavam4hun

+s addxs
and
s
ut

lo
Theto igu
aTe shghad
fov nterfa ce Yen
foY

C
Ho man RAML RoM Cis are kaaleol

Dra amma addes ma tv T


Ciue addus age h hxade
RAM RM and erfaer

Sol4han Auai sde Youtube údtd


he addesr map tot example"
n LS A Cadeny fv eckic
fdvGa
CPU
Word Transfer

Cache
Block:Transfer

Main Memory

Cache and Main Memory


Principle of Locality (Temporal)
Programs access a small proportion of their address
space at any time (Locality in Time)
Temporal locality
Items accessed recently are be accessed again soon
likely to

Keep most recently accessed data items closer to the processor


e.g., instructions in a loop, induction variables

for Lower Level


(-0;i<1000; i++)
Leve Memory
= x[] + To Processor Upper
x[ S Memory
BIk X
From Processor BIk Y
Principle of Locality (Spatial)
Programs access a small proportion of their address
space at any time (Locality in Space)
Spatial locality
nearthose accessed recently likely to be accessed soon
Items

Move blocks consisting of contiguous words to the


upper levels
E.g. sequential instruction access, scanning an array data

for (i-0; i1000; i++)


= + Lower Level
x[il s; Level Memory
X[i
To Processor Upper
Memory
Blk X
From Processor_ BIkY

Terminology
Hit: data is in some block in the upper level (BIk X)
Hit Rate: fraction of memory accesses found in upper level
Hit Time: Time to access the upper level which consists of
SRAM access time +Time to determine hit/miss
Lower Level
To Processor |UpperLevel Memory
Memory
BIkX
From Processor BIR Y

D Miss: data is not in the upper level so needs to be retrieve from a


block in the lower level (BIk Y)

Miss Rate 1 (Hit Rate)


Miss Penalty: Time to
bring in a block from the lower level
and replace a block in the upper level with it

+Time to deliver theblock the processor


Hit Time<e Miss Penalty
Virtual Memory Mapping
Cache Mapping

Secondary
Storage
Registers Words Blocks Pages

Cache

Processor Main Memory

Cache Mapping Techniques

Direct Fully Associative K-way Set Associative


Mapping Mapping Mapping
Main
memor

Block 0

Direct Mapping Block 1

Blockj of main memory maps onto


blockj modulo 128 of the cache
Cache Block 127

Block0 Block 128

Block Block 129

1:
4: one of16 words. (each
block has 16-2 words) ta Block 127 Block 255

7: points to a particular block Block 25


in the cache (128-2)
Block 257

5: 5tag bits arecompared Figure 5.15. Direct-mapped


cache.

with the tag bits assooiated


with its location in the cache.
32 Block 4095
Identify which of the
blocks that are resident
the cache (4096/128).
in

57
Tag Block br
Main memory
address
Main

Associative Mapping memor

Block0

Block 1

Cache

Block0

Block1

Block

Block 127

4:oneof 16 words. (each


block has 16-2 words)
Block 4095

1212 tag bits ldentifywhich

of the 4096 blooks that are Tag Wor

resident in the cache 12 Main memoryy

address
4096-212

Figure 5.16. Associative-mapped cache,


Main
memor

Block 0

Block1
Set-Associative Mapping
Cache

Block
Block 63
0
Block

Block 64
Block 2
Set
Block 65
1
Block3

4: oneof 16 words. (each ta Block 126


Block: 127

Set
Block 128
block has 16-2 words) 3
Block 127
Block 129
6: points to a particular set in

the cache (128/2-64=2)

6:6tag bits is used to check

if the desired block is Block 4095

present (4096/64=2). Figure 5.17. Set-associative-mapped cache with two blocks per

Tag Set Wor

Main memory
address
Onte back gh me-teed
V twmtetrh
h Caehe memer

mte Throtugh Metewe nte Back me


meno
Itismated, Cack O+tas meted, Cache
mah
emo a ell as máih
Oly
win
updated
ater on
The

updated at
be uþdeted
mama
e Same time
1mplemetatity
diiat
mplementain å ensy
Ronc érnit Conflex oic Cirrt
SipleY
Redundancy of dan | No redymdanrg of detq

High Retiqility
Lo RetigLilítt

Data

(
lhanistene
Dat Conisteny
Less me bandujd-
More Memony banduida
wtd

Mre
wed
poer egirel | Lers þower Yepúved

On hext Page
EXample
Write Bak Vs Wrle
Throughin Cacdhe
Wemany

heloreWite After After


Bac Wrte Through

X100
CPU ek200 CPU Xek200

XE100
CacheMemory300 CacheMemory Xe300

X=100
Xe300
Main Memory Main Memory
Assocq hve Meno)

A me
meme"
" oY
Qt qccessed by
Contet
Conjeht

Addvessable Me no"-
Called'Asocatve

a cessed Sin}tquasus)y ahd


This tyke of mem
deta Condest vatkaY Kas by
pralel dh +ea
bans 6f
addvesr oY Loaht
Specißc mamo

wheh a rd witeh ha Capa Acja4hve


be
he"
of
ho addresr nven
tindshg
an ek hued loCch,
|h mems
%
SHore fea tond

When ordA to
be read
of tta
fom a
odrd d
aodiive
part f
meo Ram tRa Contet

+Ra wd Speciid
teat matehes
all word3
The memy Ro Cates fo
Yed aa
Yeadi
Cntet and naYksRem
Specified
ess tin to fid an ite
> 94bd takes TelaHvely
oh Contert Yattav tRa, by ah addser

locK daaqram C-f A Sso Ci4Tve Memat

Avgumert Registev(A

key Resiter (k) Match


Rester
Associhve
memo aay M
and oic

a
V
tpu-t
hgve1(a):
SuaTET VVTtUT Uaii1c
A Ay An ATGument
Rems tev CA)

k Key RegtterC)

821 B2 B29 By B2h (match


h B3 83Bnav--Ba»
B3
bitsBu
Each
yaB Bun
Loghc

B L/Sm m Bh MnJ
Fg1c) Detailed BlocK diagra» f Associative nem
A lo |11] oo
k= T| 0Doo oo
No
W= oo 11loo
2 ol oooeo|
C
C
match)
Match)

Key Reister prouidis amalkfor chooihga nriculay


ield ov Key ih tka
avu ent worH
only ttat pavt of Agmet Rehrter CA) A Compred
fox oich ey Yeist Cotsins 1 Litr.
gne 1O potioh 0f arumeht Reiter (A) Campared
o wo-d () and ood (u)
OF Argunent enstev (A) matdas ot
o þortíon r

OCannea wiirn uams


Cell SuturNe Of Asocia
X-
tive Memor wit.
X- -
ch srpe

Each Cell Cmemo Celn) Conistr of a flip-fl# Stormga

for vending, ovhhg and


and

a
element CFAJ) civcuit

Cel
matckihg tte
* he ihpt bit transfeYred
wmte okemšo
ikto torae

* Cell
The
duihr
bi+ Stared read out dunh9 Yed
a read

ofR
The ma+ch ie sÍtRR-ta
Compares-Ce
CoYYespondikg
Cohteyt of+ea
Cohtet
unnred
uhmasked
Cell whetesYes
toYge Rnd decidsr
bit of +es arument
hatchar
or not
bitr

ih AS

onte

Fp-lep
Fi Matchs toMi
Lgic
Read

V
dutpt
of Associahe Meme
Figwve 2(a),Cell Stctre
X

OTaTTET VVTLIT GaTTK


Match Lojc
Tadved
match
homs
ocfor each ward Cas bee

booles unchi

Xj AjFAt AE
1)9f tea bits are e2nl, XJ =F
CiDf +
mn
bítr aYe hot eghal, Xj=o

Each Wod (Wi) a Combih Of


hdiuidual mana Cells (iy Fir,fis in
wi = F Fa Fia----F-Eh
for qword to be egnl toHa arghent 1h A
we mut allhave X anasler eqhal to 1

9f4f
ky bi+CKj=o),theh
hey b+CK
Aj and F
=1), 4Ren Aj ahd Fas are Com
Xh=)|
hsds ho Cpasa

So M=+H')CK+Ka') CXat+K3 )--(xntw'h)


St Can be re-umHen S
Mi (X+KG)
Puti alut of Xj

M C Ai FA +AiFA+Ki

Soten
Lonc
as
Circit foY metchil
ohe wod

OuailIIEu vVILII Udiik


D
D 5

JuaImTTEU wTLITUaTTI
Auxiliav
X-
Memory (SeondaryStoreg)
X
Theve are
mihly two tyhes o-f auxilin doires
tat are Commh)y wed îh Comptev Sytte
(OMaghic disk
(Magntictape
O Magtic disk. Magic disk pnuidas a le amt
of SeConda Storaae ta modevh Comptevr
iSK Stmohur
ihdle)

(Eraclt

aSsemb

SetrS

Cylindev
C
PlateY U
rotaio aYm

h Dsk Shmeure

OTamTEU WTCTTUarTIC
P.loler A ound Surfare(dis) Cowim*7 m"*g htth c caa4ihg
TYack A Civcle on ta disk Juvfare Cohtivia daa

cylindor Set of trachs a CCessed nutaeolfm


eadon}e haad
SectuY A of track on tta disH Surfare Each|
Portio
Same ho of byter So a
densit
Centve
f
SectoY Stures
Lits

of dish
move hSectrs

Block TKa Sma)) est umt of dda ea+ Ca whtey| be

oY Yead tofnin ta dish


4techad to 4
arm
Yead ne haad A transducev
tofw ea durksyrco
foY
Am
eadihg| whh
Assembly A mecham
and aYms
deta

tal thaldi
al haadr

Dive The ve(D) matey atater He


Ceq 3
Motor

plaHers fixedre
at 60oph)
moti. Amechansm Yequved to mave
Read
hand aiembly out nk
Tmeta by ta Yead|
-6ne haad t Yeach a shecke tack
Seeh keh

Called SeeW Bme


Sect
Corect Secthv
Correct
Latency ime: Tme faken bytea A
to qrive under R/w head
Called RotaionalL Delay" or" Laten he
JUaiT&U VVIuUT UdTTIR
Avevag- Radehy*" Yotaitn& ShCed

Average ACess-ina

AVeraqR alceSs 5me =


averaR Seek ti +GverigR Ratehry Hne
+D«tq ranfvt5m +Corlev overhasd

Data
+ueue dalny
anseY hhe
Dt ras-fev tie = No of SectavrX TotaitnalSHRd

Data Toansfev Rate

Data transfev ate = Noro+


Sec
is Caat
x track X No-of ka«d

Isksttat ave permanewtiy atachad tyea


arm axiembly and Can hot be
"
renbYed y
ae
are Called hard diry
A dAve coit re houa ble disH AYe
dis
Ca lled flob}y disk/ Comact disHCD DVD ec

Magnetic dAsHS wed dîrect a Ctess heteods

DUaiTTEu vVTUT Udilo


Magic tabe
Magnetic tape meditm toY ma3tic elodg
mads of atih, m agnahzaSle Coah on
naTro Sti of
alng,
* is, only
plashc Alm
o
shde of rilbon ta
uedfor thha data
3+ WR Segential access matd Creadi-gjutig)D

memd lo ca tiy 1h Senal order


be Ca
Data Read wte oberatiy
a Ct es
Sotde
of Segusnti
Magntic tape has Stog Capacity A
loo MB t oo GB
AdVawtage s
O These ave ihexpenšve:
oY avch 0al Hage.
( 9+ miides backp
Can be d fav Coryi
dda fn havd

94
Ais reuab)e mtma
9+
Comact andeasy to ore
(S 94
*DisadVantagRS a Cress t: an4 Roc«H

O Can
9t p>uidas
be
Sequehti
a directHy wch. Creates

t daLay hot ccessed

a1so

( 9+ Yeures
e
Camhg foY Storag, hunidt,dust
fueh detaYelinliy
-to update or modf dta
9ficalt
OCaINT&U VWTUTUdiTk
virtua mem

H
Vitual memor a
Co rebt tkat ives an lesios
useyteat avge memo spare a4a)lable

pgan howe veY acta


Su ch mem Spae het auaile actunl@y
*VIYtMal mm are Sy3le pojdes a mechatisn
foY transJathhg progam- 2ehated addees 1to
Comect mah hma Lo Cadibh.
Address Space! AOY
addver uer by ta pnzmn
eneraHd CPU Called
Virtunl adders(oh al addus and of t
Such addeses Called Addesr Spare

An addr in mah
*memoShare
Phhcal addes| Mema add-err and a et
memo Called.

of

Such addrerer À Called memo Space

Co rom Vitul (Load) addes to Physial


hvers®h
addis A doh by whg a maph a
vitul addresr

adder
víhal Mem reiky mea
adds
mahi
table
Msh Mem

bvffer res)
Me able
buffeyestHY_

OaiTEuvviT Uainc
mple of vrfual memo

Te
hetatioy
X
Cohcept of irtual mm Can be plehere

wnh
OAddrr MaPhg uhg aer:
memop
*The Rogh ca addrers spare 2ogital Pa
s diu'jdad

ht e ues sive of bats Called ger


Phyial momo
e phia addres Share
ize of artr Called franar/lcg
íhto ezul
diuided
Page ie ezual to fama $le a 4 hot
Vo of aqs
}te ho
ih add ess Space
of blocks h hmemo Spare
egnal
addess sparez 8 K, neme spare = 4+K
Ex: sf
hd rreaf Pa e Šize = IktChen

=Page ÍiLe =Ikwods


Blockíle
sþace=6K
No of Pges = addssiLe
Pa
hemc Spae= 4K
No 0f blocs Ck Ik
Blo siLe

Pege. o
LPae 1 8lecK o
P Bleck 1
fage 3 Bloc
Page
fage Bloc 3
fage
Page* Memo SpaeYK
Adds Spare =3K OLaiiiIEu vvILII Uaiik
Vwal nddorar Logiat Ad4sen) Phyhol aAdvus(12)
Oo1ololqloolo
Pag 4ret olololoolo
e Block offse
wad ne f Jabl

No BlockV
No bH 00 Blocko
ooo_ O BlockW1
olo 10BlocH
Blo ck3

Ma
CPhhca
e
Memo Mapplhg onh Pagn
raging
X
ViYhal addtss CAage No, offset) ha
fa No = oo] 3 bits strt Valul2
Pager =(
offset=(6lololoolo) lo biHs

Otset Speify +Re add>ess of word ah sittih Ha


ools
page BloCk Sihce Page izea lk wnds = lo2q
So No of addaerr 5}s = (6ay

oit)
*sihce No-Cool) has blo ch
ih

PaqR
faqe
-able So
Valid bit Said
Na-(11)
to 1 fY +
a3 tis page h4ve phyi e mowmh
O-ffset val
A Sa bo-t uirhal
addtss and phghas addrers.

offse
faga1
olo loloolo
',
OLaiIIeu vVILIT Cdill
2dd erma wih Segmoced-Pagihg mek«d;
*h Segmented
4 Collechby
paha, each bgraun
af Segmerts with each Seg
ito Segrats ave of Vešable ize
ager
s e
Conthdove

he
furteav
Loncal
diuidad

S
Sement
addrs
P
fage
þartisnd íto 3 ield8:

No No Coffrt)

Physi addae Conhar of2Held3:


Block No- effet
lofset
Each Segment haß ts own page table

fad Blo cHO


age 1 Segmento
Blsck 4
Page
8loc 2
Pagey
Blo c3
Segu 2
Segdt Phyh a na
Pa faesnezbleew CMemo) Shae)
Logi al Memo
B
CAddaens
W Vta
Spare)

addsss
SegmentWo
fa o
Loe No
BW Block Mo
Cmem
Phyia
addss

S BRBaze
Addecp Blocko
Block
Blac
Blask
2

3 BlocH 4

Seg
able
S SrBA-2
CSth1
B
loo
fgeTaLie-for Segmet
SegmertVo
adder
sadae
Phynal
C mah

JCaiTTEU vVTLIT Uail


FIFO Fivst ih FiYst out) Page Replacemest elpit
X
this algsntm,E
mh mom
TKe paq wich Come
be Yemb Ved

fivt
example :9faddmmb sess sare =8k
Spare
= Ik
YK
iz2e
Page
=
of Llocks 9
No 8
No of
Fager=

9f tte Paqe re-4erence Stin Segoence

O 6T401o 357
Page toul ts
= lo
No of
LRU (Least Recently Used)
hteis algonkm {a Þaga ttat has hot beem

ed h Tecent 5ma i) be YepNaced -tirst

m Sezunoe
Page Paference

6 4o a3S 7
OOD No o Page ast
OLai iTTEUVWTLTT UaiTC
age Replacement
Befave hdtsdihg page falt, a +e Coh repts are

hceded under SHan

Paqe ult. Page fakt ocuns, When{ea desed


Page hot auilable 1h
maih mcm
Pure faq« frult Pure bsq frilt oCuTS at ta
strila
of pmar exerutíoy) Whey no
pa
Ä auailalble lh tta mgih memo
Pae Replacement fage replacement occurs aflev paq
fadt ih cokch tts Yegived bage b infom
es SeConda mom mah mema
and
moted
t a tt
Ot fm
s
maih
ho-t

mam
rezired have bee
t tta Secadg
Hoeve
Cdhen
and ih
tt page
ks
ovdsv
Yeplacement
maih

bhh
Onl
ma
ea daired
hoRdad

ae
omSeCaday me* t maih mema
ags aYe removed
not Uhhecess
SeCmdrg mamo*
msih

Page Replarehsc ARgsiem

Paae rlaremet
algm daidas Cich
ha-to be reu-ed ton jea maiy

mae
-
OUdiITTEU VVILITUaiilc
Addr -ihg usih Segmos-Hed fag
(NqmahCal) M.Maho (Prble: |223)
TR Rohal ddrers Sp4re a Coutev Canits
Sy&ten
of
Conhsts sf 128 Segmets.Each segnert
3 of 4Kwdsih each Phyha hemo
pages
Constr af 4h bocks
Logiad
f
4K
and ph
od
Jh eacA
addes
FoYmylatttha
fomatr
Pnge 'obrd
Segied

Loal addes
128 VNo of Segndr
No of
3
Segmsatr=

= No of Page
Vo 0f Page 1
heach sep

No 0f o No,of ond
.Ahea Ch Pag
uKEs bit

Bloc

No ofblockr4k VNoof Ioc

OLaiIIEu vVILITUaill
nloR
o f qdd*SS Sare Numl
No
No 12|9)
M-Maneroblem
24 bits
An address space sbecihied by
211 hn Spare
and tRa CoYYespondihg

htta addss space.


)Ho ma word3 qye ve
Shace
Cb)
(C)
Ho
9f
man
a page
word
Conásts
9Yeeave
0f 2k words ,koid
mem
may ags

7
)
cks aYe thave 14 tes Syttm
and blo

in address Space =
(a) No: o f wsds
a of
addes Space has each addtsr a1
b
16

of words h momeSpace2
No-
Spae ha each adderss of 16 HS
as hem
C Page me
So block

Pager=
sre= PageJne
wo of was'in sddes Space
No 0f
-a2-
onds \h mamd Space
No of
No- of blockr 0.f Co oll
îh each block
No

2x2l

OLdITTEU WTuTvaITN
phal An q Con pute8
disk ohcal olisH
ahd
dusH Rat wns opticak Stoae techwizer
ahd cote data. 9t Ra
to Yead

s
+echholo data
tres data
R#
CompyteY
du Gtl
stoge
ahd
dish
RageY besms
t Ye«d

ahd e datq
Non- Vo )atile
extrealy tast
AaseY terhnsl
+ica Caait=7ooMB
dis
durHof oFhaW
AdVantrges
Cheap
Mediq
Can. hold
otr
lotr af
of hadis
hadiq.
DVD
CD and

Esy to Ca
Cg
DsEa
Smal ih
advintages
Jle
f hal dsh

t SCrak
to breaH
Eay d amaged dme
Pen dne.
eh
Ca et dimagtd
Copared
Compared
to
to
Capsot
ShleY

JUaiIItU VVILTT dlilc


Numen(ak Oh Viv-tunl Mein
then

A Memo ha a aeire ot
Tk word eve ave pagef and y Llo ckr
Th asociatvememad page -able Cotns
enthes

Page Block
3

Make alist f a
CaueRa
O
uírtal
a9fadt f d
addsses(dun
tt )
by CPU
Addeu
O-l023
Pae o
(24-2o2Paze
Page
14 - Blo CKo
Black4IK
|K

Qo18-3
3072-uoas Pa4 3 Bleck K

u6-S19 Page y
S
lac3IK
Pazt
SI20-6Iy4
716
Pa6 BloCk
18-8190Pa2e2
Pages
/ange
Pg S12e =blo tk 9le TK= loy avy

SCanegwiLN GaTIC
-Rd
fages coi l| he-t e -fu 1nish
mmo Calues page frtt

fage No Vial
Add>esse
(dtánn)
2o48-307
3 372 Y09
S L7168- 81T SI20 6143

DCaITTTEU VVTLTT GdIli


Ifeyen ce betw een D RAM & 9.5 D RA
D RAM
D
*lh RAm orgaiz4th bn,
a RAM Conistr

of m
af2Xm
hemov
Consistin of oords bitr each

9t
1
a u has de CodeY of Size nxa" to select

out of memon words


each lihdiud
7Each dvu Cmema wovd) have m Columhr l
Columh fov

h
9t
D
ai+)
RAn, havdwave
Yegures moYe ho 0f Ronc
ixed
9es
* O RAM Oraa2ahoy more Colex elahvely

boobo bo bo3

SA Sx3
Gdd rels

bts As dococdeY

D3l

3x fnddroe lier
Ovqq 24thon 0f 3X D RAM

OuaiiIEu VVILII VaiNt


.sDRAM
25D
lis are
RAM ora2At5on
diuided ihto
faho
appximaelg
of
eul
address

p9rt,
One fo select deCodey and aneteY
tY Column Selectdicsdev:

*ha SDRAM, hard are AS a1ble


*9t reives |ess ho of Rotic gaks
SD RAM less CompleX +ean 2DRAM.

4L+

Ap
A 3X D
Du
Aa decodev
Da
}D3

Aa
Ar deode2Y

Org2aho 0f 5D RAM

Juaiiieu wiLii Caim1


Munaks h
COA Unut 5 Notes

exiphana Deuicas
o am Ho moeluile s etn RIRLd Da c
m extewnal
device Lonnected
o sumply a seu
device phura
beuplusa)
dunces-
3 atosies extesral
VDT
Humam Kuadable. duice loith o eompuiyus
(e
ete).
ercommunitalting
suútab
(vdeo lisplay
a Texminal),
hunlaa, Koybecnd,

Machine
Auitable
Readable.

o Aommunical
ewitwes
o eauipmonr
e magnticdusk

msor ett

3 Comnunitalnn
suüabe
Atvice

fo Aommiunicatin9
ssm be
Bemole devios.

ahumn Keadable.
doviee

another
Such as
lompul
emdk denie done oL
eadable
b-The
tesmu)
teimia a maluue

uws
Addses Buw

taBus
Covno Buu

Module
duwias
peupheal
Jinkst

Moduke
Temuic
Model q an T/o
T Irtuface

To ninfata
CPU amd
frovd a mthod
dwics
o annsesing mdeimm beluween

extesnal

Te zelowes tia deunes hat exist beliween


inps oulfud intestace
th CPU amd each extewnal duwite

Adduesslu
Qata Baus
Prowsor COriolBus

Intafate TAtacate Tatface

Paunt Magneic Disk


kybeaad

Bus and Moduda


To Iaterdace

Furnllon o TIo Mecule

- Majuntluordos
am ID Maduleall unloollpuoungcatigouie
- Aonin! amd mung
Bouser Aommuunicaliou
-Juie Communicaliow
nt Bulhrirg
Block, Diapom e Io Mclule
Dali
extexna
Dente -sau
Dat Tutac toviba
Loc
stalus tomluolkg-

Addsess
Extemo ata
Devce staius
|Loc Covtial
Contral Lo
koina

Block Dicgsam o To Module

acts as m fa
inlufHw e
bo the combeti
compu, '
A Comnedion fountalLike mouAt, koybeord, paula,
T|o fut dwices
amd extesnal
moeen eti
device ske
fosb vee e uwe pe h rliuna!
fort
t Amneitdaive,
mothorberd
enlunal
modem et
nal
Has duak o extemal
device

etc
themotwboahd
onud Keybeand
conneull
rod mouR, perler,
Exewnal ke,
Tntusaca
Examble

dat Bu Ilo dlata


Bus Pulbo
rt ARte
T[o daa

Chiselact-

Raga
Selaod
RSO
RSI
tod
Timun
Brt

Lowho K
BRayotu

- ConRe!

|RD staus
Read
WR Staius

ToT0 devite
4o CPUU

Seial Tabface
Sntuaws
rallu Taufau
Il0 module
md
ultpla Aonnetzdig
n mtifate, tHwre
au aimutamouy
bita an Ttambimittd
taallol
he euphual, omd multpla simultane0u
word tamsniltid
OUeA e data bus (all o bib el data

used to tumbmit data,

huL is pnly ome lune


n seial unluaface,
one at a Tome
and bis mut bettamsnilti

TDModuule
Tlo Mocuula
To
To To
To Sylm Peuplud
peuphua
Susn BuA

6)SeuialTl0
To Sygtens moaer
mloaei witT
otth Io dvices Al T|O
MAA
ve direty
orecly
Dsesroesams Aals
dh felpamed
wh hu help o Auslom
oesahons

heae ae 4tpes eT ommamd


Consol
Test Stalis

Road
Wti
Modes e lala Taamalot (TO Techriqt
-frogaormmid |D
-Lntooup Daiven T|o
-Auut Memoiy Accos

hozammcd 0 wnten M Lopularam


eonpulaoan
uRuuhon uw teprogam
Tnpul-autfui
instuciows
inialia by m
a Aonslamt
Each data dlum trans cohel Aquis
omseug olala
ndu gmm
cPV [onte iniuatid ehen totomsn
by
tesphnals
movilou
teinitoaksd Jeop
dil Tlo
*w CPU Atays maooKan
n tis muhocd, ik is
ww.t indicalis hat eadyo o data tsas
Tm cosumum
kes iny
ekseroeatansadied
Issu Kiad PUTo
Tssu Rad CPUT0 Commom to
Cemmand to
TO Medule Do Somatg
Tlo Modale
else

Read slatu TocU Rad stalu -- Tteut


To Modulo FModulde /bto CPU

ror
check Condliliom /hck
tais /Cornditem
Rend

fsom Tlo to
Read wond CPU Read word|T|0 to CPD
D Modu
LMDuO_

veerd tnlo
CPU. Memey lontte tword CPUMemey
leri

NO
Done
NOon1
Yes
hext umsbunon ext ivstuuion

Proamnd T0 TeuptDriven T[0


ntexupt Biven T[o

pecial Aommamds T intovn te unluface 75 ISsuR am inlmupf-


om H device
Raaued Aimal ehun
eam me ha CPU Am
data
o o
awailabb
cood exeute amohon n
device
The nlA fate. meam uehile keebs monitoung Hho

eun a
,t
anlinface datomines e dewiw is aady
an mloupt kequet
i daa
oto conp
30mD qunuatis

he naupt Anal See CPU monetouly


uom diucivg
7o aBWICe
stops fha ak oe
tegm. , bsamthe

was actually peoming


T4olatid T{0 vs. Memouy Mabped T/D

ohm Aue Maunweme ancl o hase a ABmnon bus,

so mols
proesos,

adds8n9
a possible

T[o
Mapped T[o).
Mevmory nFpd
0uipad
T/oTmput-
Tsolatd

ne
uns To
Ilo devia
Memoy Mappud

ThuAs Assa
T[0

snqle
addness hau
shace emLB
do mompuy
ocaium
lecalabru

acces beth e memer


"Thuss

owsser uses mvSead deites


umstutuons

amd Tnput outpul

No Aeufc
T[o- wnbtuuchons
ootte Agmals
and wae
Du sut eRAad
patu Bus
Adcbass Bus

Raad Line

CPU Module
2
Modulo
ww.o T/o
stauclise of memay Mapbd
Gyeaua
Tsolatid T|o Tnbut- ouutpeut zo Mabpacd TJo

Tuse as addsuss spacsov memoy D 1Jodwice


sepasati

CPU seuftes that addes on o un


0stint mpul Dutped com monds
Aimes.
amd wte

Data Buus

-AcduusBu

Meme
Fead
Memy
LOMte

Tlo Raa

CPU Podule 2
Maim Moduk
Meme Tjo
To Mapped
Stucun
beween MmAd Aud Intunupf douven T|o
oponison

Trlup Daiven O
Prbgmmad Io

be implonontud Addituinal
hardusau kugpurd
o
Lan homaluiny
wfthout amy odoutional tesupt
arouva
Awitehes
D amothea
tak.
CPU,
bad n busy wauling
ie without
oaitung

CPU keps hetkuug


Šaltiss eT|o dwie *am pogamrd
hughes efu emey

Leo euenq
actvil
eu be
AM be ple Tlo kute
Multi tarkion
Dnby be activily
handlled
in oenlapsed
hAmdled usimg pruRammed
CampasisSom
bauween
Tnbui- ouut6d Maphed (1soluld)
and
Memoy Maphed T[o

Peipheral Mapaed o
T]o Tntput-0udput Mabped To
Memey Mpped

- Some addsess dae for hoo (Bebai)addius spacess


mmesy omd rjo deices ommoy Omd I0 dwi

Uses Aom instutioms fr Peaal Aom manns doy meme


To amd mome dukeunt AOaNds
bot and
pemons
Bpexation

eite
Dme Ai ef aad md Aehanat RLad
ond wri sinals
Apralsoi memeey 0n

Mapbed T]0 Mou ekuent


Memey
es kiient
Itmmp Procssim
CPU s dona ey achvalimg a
Tue baic mithDed erlusing
Aomnec tu mlerupf sowrce
he CPU.
conisol line Hhat
he sreseMe maeu
CPU>* Aecogmizes
*ereutu a steufc nlisupt
homalng 0am
datmines he 30Ue umee t
addesu) fho ibnuup handara
ho addess brameh
*delminu
roremn

Sumpla unbupt Protuse Seftuone


Haacls anR

Device Coliolles
r Dthe
ale8
Save Remamlu
Susüm haduoaie
onm Atai
IŠSues inlsaust ProcoAR
omatub
Powssor finisu exeuillo
ProceR iniupt
ument instauuhon

Procassos sizsnals atknooledRmt Kosttre pmsAoi


nlomlpt yowmaon

frocessr pualas PSW amd PC old Psw


Ratere
Omto ti covltol staak
PC
ame
PC vaue
Procesor loods now
basd on insupt
Desuin issus
din isswi n implemnwAing
Tbuo
Tipt T/O a
OTo demin tohi dwite issused Yta intivuup fem mulki ple
dovces

Aave ocursad, how dous he


mubhple cdavias intinupt
to porvwssor detide wuith one to ros
JSSe eice Lduviuficaluon

4 Technuquus exisk
Jinas
Multple inonubt
Poll
Softuoae
HaxdooA foll, vecdored
Deisy ehain
Bus Avbehvatibm (Vecored

Mutiple Tanust knas-

Intusnpt keut bnetn-1)


CPU

ntmubt kgut dume

o fort n-

ALOGUi un duwice
imnmeeliat
Au
sepouat Tlonupt Jaaund
apprma.ch
imphathica)
muti ple flanupt lmt Ayp
1
CPU
Tpforti TJo fot n

Singl
uiue niupt ypam

Sokmsahe oll:

ohuv pocRer daluds Hhe inlunupt, t


branthes to om intiupt
eath T|o module do
ka Buica-Aeuoine tohose job
dumine ohiw moelul ARUALO
poll

imlisupt. a

Pioy Cam be implmoitid buy ding pelluna euenu

Poll)
VecdovesIbsuptudung Da ehainig (Hhduiaht

All Meelule Sharres Commen ininwpt sequO me


et lesupt aaknouualgemut liue s daisychainad houa
mooludes
bem aouser &eniea eo inluaupt,JtAumds oud om
dersus
meolule
0knaslodas srrobogaimg
umil t qu a
thTpugh
ksauong mooulo-
, a Uese Tfo

Áula
TLs Raaiung moeulaahends bu þlauing a oewd on
lunes Ts wevd i sajpesad adonidto as vector
Bus Abitsion

wih
Aohel
Techniipn,= (vectored

bus aubitraluon teshnitue,

o bu tan sak u
tnbuph
am Tio meeul
nitnust seakut
t
ne
gaim

raiee in ata im.


bulore

uws only One 9odule cam


pes t Tteu pts 6)
Posan intuaupz
so2 comdutin Hhat ocwhs as a Aaiul
These axemesated by
Om mstuilon exeuition Aueh
Aitmtie CuenMow
ivisuOn by
Execuion
e
el illngal mashime inskutten

siqmmamt umit violatin

Exeudtuon el priviagkcl nstrutuom

Time Trupa
hose ase uvuatl wihin Ho pkvesn This allous oheAT sejstir

D eom Autaum eperduons on 20qulatv


baus

Trput-output unlasupta

et quntsatd o niltatibn o Lompluin e I/0 eheaions

/0 aiue" o Io éso to am qenuali am inlbiusf

Haaduwasefailuws Ilsupa pi
as fonwer falluse
ihese asL qeneaTed by a failure Sush

memoy uyenot

AGA:,
Extestto5
supls Vs Md ut o
An inteu ganesalkal b Aaa

a
mau

at Ramdom
wme duninn exeuilion
at u
sowase, amd
potvokad
is gennaled om
An exteptwn
by the exeudon o nsbueion
Haaduselnl and Seltuwve untoAs
harduwase
Lce Agnals hsough pins[
shn mivo pmces these anu Knouen as Hasduse intinzupi
iniinusa

emco pAocahsoar.
n Ho belween fhe
ohih ane ineted
Softvase inimupi
cohuuh
aAe hose
meams te nl mnemonisa amcopAoAt7
Prom

Vectoyed Gud non ectorecd iiliupts


he
Sa vecrored tte soure(oxdouica) at imlinopts Autplies
ideupts,
brancw imlormaliordo
s Aompuiu o a xed
ritinupt, tobramthaddis anigned
a non-vecored

ocauwm um Je mmpuy

Maskable amd non-maskable$ ABm be disablod


o 19nond
ase tLoe otuth
askabla imaubla
by he miCropAocAso gnoed by
n
Nom- maskablo
, shuth saw nad be disabled

micropkoCABUr

ypesentiiupë
4 CoUngomes
Prorawn inlirue
Times intnups
Snput autput inoua
Hauduoa aie
Dwd muew Actts

Bott leupi dauven onwd proaommnnod Ilo a UM yolven

CP toame
CPU Aam
dalb

be betea udizd o pmexeuli


rll not Aae
I10 acivites aul alew amd involve memt o CPU

DMA
nLales
ts peed o Tlo aade by eliminalung

Mpad by cPU Ilooheathons


s aom CPU
dae Atoud tranuokd
when lauge amaun d
a DMA module. An be UARd

DMA epeats iu to solloing


ys DMA module
abeut

hem 0 A Aeuehd, t CPU Unstuuds


Ht

As eperatuon, b ovidirginyomatioy:

Seunce addsis

lagt addsiu

wrtt
Reacl
Raacd
aead o iteM
wntem
Numbes wordsTo be
' Addu Reopslea
CPD loads t DMA Reaili
beas
o be
Rata

tanslenud
coumt
amd
adoe
amd Aatug
efTe numbes ef
docation sepechvel
mumey
u DMA LOieller is LAdy tsamamu p ective
olun
t
xt
achva
achvalis

break
t DMA s
CPU new
to

unl tb CPU. CPU


leaves he Conal iystmm
oit so Hs
dala

tount.
bus amd activatis DMA acknolwleda

ou Dmain
DMA ovhollu tsams He data olisecty

ammlenad. Dala
hom
count (es
LwOrA

mou Afta,a word


Omd Adds aLaistü a updalad
count Agu)
21o but Au
data
CuvTs
Auwil
not keady
seqista

t Send o
das not sLaubed
Aeceive o dati,
tho DMA

elea o yalum
bus to CPu by doathvatn
Cokelle,
DMA eapust in
zo go, DMP
data Aoum Maistas is deczumoid bus
data ustm
conuolle sulinquishs
tecoi.el ka
Moroler 4inally bcPU incicali
Algmal
am intupt
may alse Aund

ena dat trane

DMA E0 --6Mentoug
Detachaol BM
Sunal Bus

DMA Memo
DMA

SunalSus,TAKalad
DMA-O
Prothso DMA Memnou

Block Dioaisom DMA


Addiesbus
Addiess apska
Data bus BUA BueA

Addsa Reqistey

Kuaiuei
DMA Select wocd Count

Roquses
Seluct RS
RD Cortol Raautau
Raad
wvt WR Covdte

8R
Bus

BAqut
Bus Grsant.

Tupe Mlupt
kagko

DMARuu to T/o devIC&


DMA
Acknewludge
Eus Reaunt (BR) input is ul to by DMA twvttuolles 0
Beque cPU t deame to tovdtuc e 4m bu

Ha
u nonm
Tue CPU achives Bus arantB) oitpeutto
DMA CoMtellu.

lehen DMA teuminalu u tramsJe. t duable hi bu kau Un.


and KLL
CPD dusabes bus qanty takis couel o buses

ts noimal sheraion

DMA Cta Taanue modes

DMA bleck -tram


modu
Cele stialing

Trampaswnt DMA

DMA Hock Tame a bleck dila


thniqe, an a Aungle
buust.
bleck -tronse
nDMA aam be toanseved iks
memDuies ike

Tus
hbetray
DMA mode
Tngth
s haeded o ALLOndahy
AlLondahy
mnDeies
Am nor be
bramumiuson
deak dsees, wle data oss ef drta.
Jocs data. e
ATGHped
o osedslowed wihoud
wrthoud
o
eyelh

k
Tran
stiaking

saluiry
on loond
Modle

moele,
ata me al
ta DMA

o
conhalla is allouved
ohich tmut AeN
he covrel oRe bus he CPU
dausnol

MA moolue
wed it, o it m
mu u,us bus
enu Ho pouser
omlyrehun
pe
Ho
to Aunlpeundopenalti
pAocahse

tewuboLa

word and ziuuns


Hhe tovituel doOsa PDcLe
0aule. tamesa ocaNSoR ADU
neF

Note hid n 1mubt: Xo


is" nol

a and
Aorlext do A0methonj ese Tt oveall ct
one bus Ayle,.
pauseso Nevete lehs,
Kaftay., procese
o to exeute
mou dlutty. Nevekteles,
Mmo
acient
AnuAL prussoe
mukiptesiootd

am uneunupt
T/o tame,
dsien a
DMA fa
proqsAmmod TJO

3Tsamspanand DMA Ayles


DMA s allevsed Ataal onyhose
in mmpauont DMA,
usi Aa Ayslu
beis
hun ha CPO snod ba ouwtrg
to ave Covihol eAyua
CPUcos
nof suu haAe
phae
inlutiom
D execuile nstuuhon
Deuoclo not taye
dou noi Lave
DMA olou
dath dusing tamsanent
DMA antassung
om CPU onmce
0my advese
ech
Tp Cutput shannts

viriuly Aiewes
dt-Outfud chamels
unpat-outpt o rouss
wonha! eve
1t tas tonmplele
selated achivihies
CPU som all Ilo
CPo
devica 4tH
tau qlso ommumitati wih
numbeo
0 Ja oosso üke LPV otk lini ttd
oexeue he A7
PolsOY

An To pwwsser has o
e
abiuly
AmweaAM
T[ô instUhous_

cay he o0k data


Malko
ha
ouct
dluwice
npul-output

Th au Zieo types o0aL Ahamnel


Seluto
ahamn
Multiplares

Soletor ahannnal

Adldyess dala to/trem


mam imoiy selcror
hamne

Coiol Apnals eelul mDeluka


CPU
bHrom Coniollu

sead
Inudupud
olwis
A suleckoy abomntl Cam multrple hugh sheed dwic.
Ony one dvi is selhelia
banelle.
at a ne doLommunicateou '.

o ds
A selector alannel uel in hagh pešd Lan

put mede

A multbplexei ahamnul

dala
Addiug amd
Tolfoem
maim
ww.et Multrplexe
ohamnel
-O
Contel mgmals
to/faom CP

nodule
Conol

wrh a nwnmbe odovices

. hamdle. T/o
llamne sau
multplexeg a Aken Au,
at e
some timu Ho dwite. slouo

is ustd
muktjpaxi
need to send
ustuih
Ahree devites
Examp lesc
bndiridua
aw
bylus
a data om ldwice
- B5
B,B2 som 2deice
X2,
X5 dada
X1,
Y5
- olala um sdevice
Y Y2
Ba hanel nay, bend
h GR
hnon a bijle nmuti blex

as BI XI YIB2 X2 y2 83X3 y3 64X4yy-


oufas
Duta Thano
Snthn nous
Asynuhpnos

Symthronous: Renutess in dto anluatAnau a Comm0M Aluk


unita
CPD MGiürs, tam belween Juse
Loft
Lot

Aaid to be AuMchron0Lus

nt
m h
uo inoupenaurt
Onous Te iming in eath
S intunal
eam usts -is ouon pReiale

Aars n
Hhat
he in
his case
Alock to mlounal do be usmthnous
Ahe wo wnus he Aaid

Asypmuhoonous
Alaa Tsomse
uigual
Aiguals
D ndicat
imdical
Aouuo
Aonkol
uils tanminat
Tioo ncepevrdent is beung taanmiied.
ohuew data
the tme at

lwo methods
Strobe
Handshakung
deviceupplie
(oneu0a)ou communicalins
Melhoc
al Hl aortuol Alsials
Strobed

acivatd by ettu A0Uto o destinalion


Stobe Aam be
Data Bu
SouTce Destinaha
Styrobe wrt
Unit
Source nialid Stobe Dagkom

vold daa

sobe
Timng agomm
dutimniuon wnit Lehn a
a Amgle tat inorms thu
he Aüobe ds line

id awaulabla dn
ha bus
vali data

Source
iooud

uit 48st placos todati


om s
a
dalabaa.

Atady
ADLa
olut, He
br D

enuu Hot ta data sifle


dala -

Aowce
autivals ha hobe pulse
acivaes
dutinatuin umit data
dada panadeu, lo
An dosti naton
niteatid
tu kpune i provide

s Boba pulse, mlemmimg

to AQuu Unut Hat imualisnalom


whehe HoXo duti
douti nallon
dn Ahobe mihre, ohithe.
S0QNU
has MD ea knousing
knowoirg ww
hLtived H
taamaken data
urit ha adualy
wa
a coniel s Ahat d
tdou noi
Handshakin Tioo
eifp
not veifr
Onvway Aucwsll
The dioduanage
hos been ADmplelkol Auwsuly
*had He data hamale

Data mauy be lost

based n tu uL hanmodlshake
euiju
eiiiut,
Covitol e dala sam
and he devite.Aelocled
{omput-
mput-
beluveen poouskos

Bleck Jeagom

Aata Bus Destination


Souree
ta Valid wwt
nt ata Acftd

Jelinaluon
Souate wut wwir

Plae olda
Enable
on bus

dal yalid | Accopt


faom
datä
bus

enable dataacepted

Disable datavaidl
Trvalidoo data onbusA
Disable daa actebted
to accopt dati
Raadu

Seuwnoeenens
Symuhocnous BuA:
inuud a oleck in Has aombol
Axed brolote!pr Aommunicaton
lins
ar u kelah th s cleck

Advaiage-
low Jogic aud
involves vesuy
A ÅU vey sast

sun af the smL Aloc


om Hu bus
Must
uadwamgu Eveu dice
atn

SYmehrmous muun

e GCcUrente el enenls
on tsbus s dilumimed bya
ad
1'sand
1s
os
0s
Aletk

A coek a 0gular &aguentu oaterllg


equal duation
.

T T 3
Cleck

Stalus Algmal
tius
ws adOKAS
stable
Addsus

Addsus
walid clata in
Enable

Data lim
Rand
Read
Alata
wlcd dada Out
AiLinA
CRiti
PowAoY $laces adduss on addsJnnts amd may ake
vaious ALalus liues

ta addrss Junes home STabiizd,


*oprouser issuQs
Dnie
addnus eable supa

For Reoad epeiatbn

1 owsor issuusa Read AoYmmanda


tuaddaus amd placs he data on i daa
T3 Plemon Recomnes
ims
Fo wit oberaluon
data Aumes
pui he
data on
T2 Pheeeso dhae stablezod.e
lmes
he data on data
Ome
Asues a aIae Aommand
rotses

mes
3 Mlemosy opies ha intmauon om data
(30

Asmehonous Bus

No Aleck
Omd oubends
ocwsante one event om a bus dollers

O ho ochenie trevio! enent

Seaene e even o Atad operation

stalus lin Stalus Agnals

Addos Lmes.
tobla Aedies

Raad

valid daa
Jnts

Acknouslaa

en he busA
addaus amd laius Anals
TLa Duxorplacu a RAad
the ocserJiSuAs
-AP Atpnals haue sabiized,
CommaMd, ho dotu on daloa inos
deLocuns ,mmeuy places to
Aa addes
A ized dta (nemo
stab?
,
akseaak acknolecaes

AstnehrorDus limug
Synehromous
limuna
- taud to mplemntonnd
tF
Smplk to imblumonf md
ter Morexibka
dessxibla
be on Same Combinaln oslow Mma
Devtes must
fastdwiek
Sequina oe s Wault eteatuom

stalus
Stalu smals
Kints

neldses
sable addes

at valid data

Acknouwledae-

addness wMa Stutus inals om he hus


-Tus poewsor
ns at Aa omeinu
plaues
xO dan
Tue mase plac

3ssonds
o e w1ti command

Memy da
mocule.
dal som
som
e
He dataAuies and
luines ana

bAopyi
asseng
e acknud me edge
d momoy
ha Ltni Agal
dsops
The mas hon Aigual
Ahe acknolo(Bdga
moduls dobs
Sesial Communi cauon
0
Seral Tami missionm

Serial dala tromsmiionm


oeuss by Toamsmiing
dat Sads Reuive

One bit ot a me in

ALquerilial
de era bus
Stopbuls
Toamd
kneo he
staut

endtoansision.
Sast bit_ata beh

arallel Tronsuvsion

dn oualll tvansnnusion Sende Receive


Beveal beld Aom be toankmil
Aamu
Tmme
at

Sesual Com-municauon panbe


Simbla
-Hal Duplax
Full Duplx

awels im ome diuchon only


hamsmisIO Siqnas
Simpax
Kaytoaud
Sendu PReeives
Ha ulax
m dhe diucum, but in Dmlur
Rapable o sondig
both
Atpnala

7 Ont dieuion at
e
a ne
hWalkie Talkie
Sends
DBvico

Receve K-
OR
Device

Koceie

SenduJ
Cll Aupux
Ths
(Bidiectional Tornsmisjen)

mhod allws Aunal daansmision


in boh s oinectións

simuttounoua
Telephona ? semite

You might also like