Professional Documents
Culture Documents
COA
COA
, ge (343) =2 Bbits SbiES Gwen’ ine of 'Fegiskess |= 8 Thus nosot biES im Add = 2°28 4 ns3 bes pe add+ess * we steh a, Za rv x2 ede Nn We tla N F = 4S (Ne-ef Zeve Addyves$ instr) + a5¢ = ae ase Q08has lg bes instsuelion Hak Suppext Zeno ad dsess 5 bits instucho ns « (@): A Sys ter addsess . ane addness and we field site 8 of bor ik as designed Assume each address pddvess, Hoo ane addres fox Suppesting o number ot zero addsess - | The man numbers | j—_——_¢ bibs. —— i [oie [ atin [aus | I-12 Chis 7, SbIES Sbiks « a = fox anos + too xa +N atc ken 2S atone AE 2 oe . 7 rts ous [tex 32 x4eo } ene) Qou8 is, 16% 3a, v ia : we ab [acre] = NFL Zere addy instr with 25 bits (B+ A Aigikel computes hos a memegy ant FE 7 1 pes word The “inshguckien Set Congasts of 285 Aiffesent | opesations + AML inshyuctians ‘have an(-apewation Cede pave ach instwuctfon 78 (op coke) and an addsess pesky > Sore in one Wed» memes y., me Je, ‘id CG) How many bits | aver Keserved foro persation code. th). Bab de acthe— me Hel mary Bis ase left fer the * x addsess part of the — inshyuchon, , 1i) Wht ie The | maximus SI 7C tog the memody. gel Tastruclion length = <1 wesd = 28 bits \——— > bits. ———___> * Pe [mos | ! Bhsts 2b-8 = 20 biks- % dee n= no-of bits in. opcode - ) Then cheese m, Sich that 2” 2235 : 1 ¢ neh bits. i). No-ef BES in opeode = 8 ii) wos ot BiES fon odduess poxt = de bits- (i)- max Size cf — memosy. 28 dabelines 1 | consider a BE machine hove on nshuetion Faro Rake) iS Stosed oF memory “Tacotie nm 200 4K {in Rexa) Wheat wilt be value of TR al pe | while dhe instr is fached Ond —execoted. Considers indrurdual instsuction i$ | 3Q-BiE . a)- Tr = ADD R Ry , PC = LOOkKH by); DR = LOO4HH 4 PC = ADDR VRE €). TR = ADD RB Rey PC = woo A)- TR = d008 Hy PC = ADD Ri eh| re pes ret © Loon b aoe) ie ce). TR? ADD Risky PC = 2008), @- Mee exeeatig He euvehian ABO RE Ris HR) find Ry Value Gen Rr = ETRL = 108 i Solis ADD Ry Ry RL) Ry a— Rt (wR) | hey Rye —— Ft (aatee) Re 6+ (tex) be ct aber R, red -tt is the method of Specifying the operand in an instsuction + ' ofl operand eet (Adduess, 4) EHlective Addvess fea) 7 Dinem 7? Tastruction => p Trnmediale dele ? qe is the addeess of the operord Dees of — Addsessing i Medes pddsess, A (ererand) = Register cE peer Ra rs Made + Register Addsessing movT.R, 88 pp Alreas, Az Tronediate f ne Se value MVI Ry 2S % Tmmediate Addsessing Mode Disect Addvessing Mede adizect Addvessing Mede « Reg Tadvvect Addeesiing Made « 0 0 6 @ ® @- Auko Trerement Addeesstig Mode @- Auko Decrement Addvessing Mede- @- — Relakive Addsessing mode « @. Tadexed Addessing rode. ® Base Registes Addsessing mode - @> Tieprest (unplied) Addvessing mete f Q@ dweck Addvessing mode :- Trstuckion => forse | Addsess, A hese BA = Addvess 4nemety \ he ENENSO L. |_| | bese | i optede 4So i : and 4S6 opevand = (2A) he | @. Todiceck Addsessing mode. | va ofa ee ettectne Ad dees | Here Addy A gives ce adasess | of | ; | Fy | ofcede | «so | | Pore yes bee) Ceo and 7 | operand = (Coo) = 5 1 | LA oped iindivect Addse SSiNg G- Pagistex Addsess A Ceperan dD opted Register Assay Mede : Ry Memes Addsess A Specified a ¥egisker bes BAS (Q) = Fee Nalue of Re operand = (Foe) = 25- Bye Leb Riz 2004 Ry 2300 Ry > He * Mov R,@Re ~ > Reg: indisect Addr > R= mode (or) ® Mov R,, (Re) => R= tS B.A which Contains the ° toa |@ Aube Increment Addse ssing Mode = sep = Register Tadivect Addy inode» ket ge Re ecm Os tl () (sr) <——aA Gi). gr Coste) @. Ake decrement Addsessing Mode . W- pee decrement of Rey ie Rye RI W). Rey Tadiveck Addr Mode Be; Baa [R&e1) = Feo -F 6n OpesendelEA) = (649) = at Eg> pop * @- Relative Addsessing “Mode :- Computable cer) ¥ J C) Tndexed Addvessigg” Meee Dis placement byec base Reg Aaddvessing Mode Addr mode « @. Pc Relative Addis essing Mode !- Addgess A (operand) Trstruckion =} opcode EA = PC + Addsess.A6 * USed in Branching instsuctions « d Po —» Yoo > Ty ees Hot fo me } — replace absalute ite TP Marys Fat, Timp addvess, with TTP MOS fe Dy offset. lt EAs pe + Adduss,A of dump F = 434+: EA = Kio ; Fw called offset. X oftsee can be 4ve, or -Ve- ® Hewe pe = 403; Traget Addsess'= yid) then offsek = Thaget Aldsess = pe 2 nie 403) = Tadexed Addvessing Mode v! Thrshuckion =? Index”, Regiskes (| EA = XR + Addyess, A USed in Asvay processing « 4~ Avsoy of erage “p> Base Addness of Awtay ~ Ly Adilscs5 A 16) wo = 100 a Baas #1 wor = ha ef D offsel xR. We \4or = Yoo +2 | Wo = yoo +3 aoe ‘oo + 4 — 24 _|wes = yoo + § i fuss hoot $9 R Address A= 4EO> Tpitial value xR = 0 % xR <— MRA a 6) gr and OF Reg in Yo RE MP & Disadvantage of indexed Adds essing mode: - Tk is net Suitable fer ao pregeoeny Relocation” (-/ whenever 98 Changes dhe Address of the Av¥ay —P WE have be change Aldsess, A of Tastsuc tion according ly [hrs 18 undesiseble)} : (9 - Base Registers Adder essing Mode im Wantks be access morks for a pasticuley Trstsuckson “=> } opcode Addwess, A Student f (opesand EA = hoot 4 = 404 Bee ee t Address, A Register % Base Addr is in Base Regiskess fi 3and | & Alvorbage | 7 afluk is in Addr, A af the jastsuction- af Bese — Registes Addsessieg ee Addeess of the arrug, it tuhenever 05 Cheng’ the is enough te chonge He le ae Register he; Ths Adaessing mede jg suitable fer psoysory Relocetion - &y- 20%6 UP px Rey js baken 08 Bose Registers» /@- Limp tcit Addsessing Mode - oiler. (Implied Adds Sing Mede) - & opesands ase Implied i). EMA =p Compliment Accontnteres ji), (RAL, —p Retole Accumulator Ls otk. | (ii) ome Be Compliment — Covsay + \] Ey" Mov R, (Yoo) —p Diseck Addyessing mode. R,y@R_ —> Mov Ril Re) > Regiskes in doseck i Addy > Modee Mov Mov &,@4oo —p Tndiveck Addr Mode, Mov fi, 4k Yoo > Tnmediate Addr - Mode.| onal oO Censider a RISC Machine Where pradly 4 cach inSttuction FS and uncondibional b¥anch with offset the brsonch bytes lang Conds Fo nal instouction USE PC telative addressing mode be the beeggel location of gpecrficd in bytes wire k the oddress jpstnuction - Furthes the of fsek FS always of the newt Melauclan) pine thepe hoo ay Segmence - Add PLRy Ry Sub Psy Be Rr Corp Rasy 1 Re TH he bevggee of the bsanch nchyvelcen i iy hen the i ee (aye by ede ay BS. if ADD -RyaRasRy itd Sua Rs1Re, Ry jer > OMe Ry Ray Rae 143 beg Ris otfsek ope it : . | otter = Toagel Addwess 7" "PE 5 i - (4s) 2-4 Tastouction ss But given insteuction length = 1 Bykes- of fsck in Byte =AMS be 4 pt Given PO = ace Low Load AC R= yoo dot Sa wa # 180: * ded, Neat instivetien RO Se hoo 700 - Seo ees ” [Gee Goo Pol aus oO 300 or OT . Soly eC 4 ae : 1 ashen a PC = 200 S00 aio td psd >>>! L ext Tashvetien | 202 xR =— loo RS Xoo uUSo 34 es toe 5 Lead Ace, Soo Lead Act, Soo A \ als a ba}, Ace @ Register Addy made]; ty Leek ARTES ® Immediate "Ace = Hoo (8) Direct O mie | [Load Acc @ Sos f Seo) = S00 thr) = hoo ja ee :.% Mevt Ace, Soo Ace = Foo ACC = Gee) = 30 Accaf oo) = Foo ACC{Yeo) = Feenan ecren a puto Decrement | ERy-1) = 3ay ace = (399) = 480 io relative rey Addsess, A padsessing 2a ace = (702) 2 388 . 5 rae aa: og + oo = Qed ®: xR + Addr A Accs (ee) = 40 AMGES SOS Mode too +500 = 6e6 Bose segistes |= Bose Register + ace = (900) > S¥0 Addsessing Mode Addsess, A = Yoot Sm= 00 machine instsuc hon @: Corsides a theec wosd aoe A(R), GB with Re indexed addressing me de uses indisect addsess ¥Sding at The fivst opesand uses The Second opesand as index vregistes - memoty addsessirs mode A ard & the second & hid pecities the opCode sespeckvely. The faust wosd of Find the no- of memory uso ds insisucton — $| te execute the jasbsvetion 1S cyles veguived a) FF a) 3 b) 4 9 £6 0- cycle Time taken fos one — micto opet 1 2 3 ' ’ Ke Cycle Time 9 Tv crv pesfosmance — measuses time Ti alion « and clk Fey uency fie + tL @ cycles per jaskudtion (cPE) '- 1 2 3 om DOS ef \ '<— Time taken to execute on ——? instsuction : fe; CPI = 3 K Time taken be execute an = CPI X Cycle kime. instru chien = 3axu = 3t ©. Ereeskion Time 27) of 0 PRI Bs Tastrs , Cycles , Set ets Se Presi Tash Cycles “ET s See. whese crx = 5 (zc, * cP) Progfam wg a ; je Ee Fgi- Tastsuckon cP ee SuB RyRy ——> & Mu Ryko —— z Lead Ri(Ro —p 8ayer ‘on Tnsteuctrons pet second ) Nos of instr: Executed _ Nov of insir-f « O- mies (m Hen © Amdehis law = 5 a post Ere strane cetidur Mockievelia tyne ge) tell een of a Computes: 1 BS Ns sh es ey Fraction eahanced _Feseltan erences” f- Fraction \ 4 caked Speedlp «rod program . a | $0 86 up | when ie is impagved 4 Tk bkes . ® Let AFP Asthmetic mote times . has becme “to Limes faster «Y. 6. the overall overall Speed up = 16S @ * pregsam FS Punning on 4 machine with — the fallowing posamelers: Fad Total execution Lime. Aumber cf instructien executed = So, 000, 000 ANSE CPI es He preytam = © 27 cpu Clock gem 2 eee cice eT eT e fe agnz =) T= $ = OSNs- = Cx CPE ay x CT) ET = Soxio6 x 27 x 05416" . , 6Dy = (Sox oF xoS) x10 7 ET = 67-Sx10% = CFS ms. i Find CPlouy and mipS if clock yake iS 19-6 GHZ-) 4 P apees ot Teal SEND cr Gunk Oo 5 ck jnstwuctions oF cycles - Load] steve, S23 ho ALU u xo Branchiog ~ | 6 to othes $s 3o A a i| a ee fe Ie nz i ~ 4 crr S ’ ye Gers) a a = (oxs) + [toxn) t {rox e Yor tot 10 t 30 - Leo evo Co t1S0 loo = Me 2 yg 10. 4 ®- mes = f 2 1s ‘ CPT, *10% Hp Rter = 1 y oO 2 eat? myheoe milion Tastiechient See- ®): Progsary A on processor | Progam A on psocessey 2 CcT eins) (eT = 0.914 05) Te = leooo Tc =12000 Frockien Br i L]S 7ALV = 20:4o!tg) Frocten Br: Ls: ALY =2S* Soras| rares | CPr Brebis:ausStacns . cP) Brits: ALU = ‘ : i malls . gel Bxecueion Time (er), | Te RCE layy % cy; 3 . } hee | crt = BEG Crs | Ay. jer | Tez { ~ » {| (Rexs) + (Yox 2) 4 [¥oxrs) Qeryo + to 5 = wortorso gy laosloooo X 24K NXIO wets = eu xis = gy us keh * gxccubion Tre (ET) 2 LG CPT ayy ™ a, oe . : (en) 2 tReag X BIAS % OTK NT (en) = RCVIS xo = RE MS: pocessor 2 bakes mose time than — psocesser sabe etecute pregsom A on psccesSer 4. Tros ik is belken be (A executes a program wilh average” CPI a (with same TSA and betles © He Same peagyeam with 27. @ # Meshing gh 23 - An other Machine Compiley) That executes less instwctions and. with 4 ce) oof TF ak 2 QHZ ; was a clock wke of A Se that He two what shuld be te machines Haves! Same — peetormance -{: ct | 1 |! ET] = sel x CPlay Depends on Te Program used, Compilers Trstuckion Seb, Architecture (254) or pgm used, Compiler, TSA and Computer osganiZarien on (zt) VLST Technology used: @> ww and Datepath = | pasallel Binasy Adder she A= ABNER = ~ & = Bs 8.8.5: ; As Bs oe a A Be | “ - a 4 & 3. Fae |e—— FAI : FAn Ke i - Se 3 Se \ | .a SE OE ORS allel Binasy — subbmctes hy AL Be n, 8, . Su s A-B = AtL'SCemp of B- = At p's Complencat of & +! A+ BrtFonetion lagical Oo. 0 Ont i) r ' ° 0 o a crseuit op = A+B 4(C=0) > Add olp = At Bs (cer!) > Add with * Cassys Ofp= A+ B+ (cero) <> Sub with Batten mare a b-B)7! aw : 1 => AB olp = A+B a (Gt) = AtB+ > su —” } Avorn [7s pA > Decrement A- 10001) i A+ ttm!) = A¥0000FA € > branstes of A beansfer of A A+o00+t0 DAS Trcrement A A+ 0000 #4 9 Aryght ting Citeuik t f | hit #9 / shih left wv ! | Ta AS MA Ay Ay Ao Te | = ' Tr Aa Ay AY Ay Ao a ee ae ‘a Ye a ” G20 => Shift wight Be ee AW Aithmelic ciseusk A GABSelected civeusk Arithmelic Cixcuit logic civeutt Shite right shift Tete! S, Sy 8 3 ; > 2 SA fe output F 0000 °'0 * - A+B 06010 Cl | AtBr! o1o9 | LAW 8 ene * AWB ro xO Shatt -rght a “t e shitt left - ; b \ k 7 Dokapedh i TES the set of Functiona) units and ¢ ae i thei ines connections where all acompubotions ase Cossied out ee ' I , F Functional suniks Consists of L > @- aul br) mmulbip ees MOUS @: Registers « | @ Buses © / *® CPU = Dotopath + Conta) unit:a a - x cnlapath of Mulliphention hy the Rereabitive ) — f ger pee 43 —pb mulbipher molkiplicand pastiol produck p =o +8 3 —bB-172 st 1e-—pt a! +t P=2y —by-1=0 seep 2° Flow chaxt - Exit+ Lek A = Mulbiplicand, 8 = Mulkipliey > Addi—> | _, decd 8 3, eqz Data rm Step 4 — Contse) unit Ts ez? | @- Consides The following deka path of ac fu- the Bus and ah the segiskevs » in the data ase of Tre ALU jdentical size+ All apevatsons including incrementakion of tre PC and the GPRS one Cessied cut in the Aru. Too clock ytles awe needed fer Memory read apesatien. the tits) one far — leoding s addeess in the MAR and the ent ore fas loading data, fsom the memoty bus FeDT aa er ee Wee eee a). The insteuckon = ADD Rey Ry has the wegistes boon she interpretation fye— het Ry The min nes of Clck cycles needed fos executin Cycle af this inslsuction fs yee v)3 a) 4 w) S- yw. Tre instruction (call Ray Sub" is kwo instsuction « pssuning thet PE 1% incremented dusing the fetch cycle ch the tivst word gf the fashuction, tks registes transter Invespielolion YS Ree POAT roa Mpc} \ ; ARE mine nes of cou Chek Cycles needed dusing the execakion Cycle of TNs iastsuckon 1S - 0). Mem Read opctation LN Ty i MAR &—— PC Glock gycle ot, Toi oT <—R,