You are on page 1of 40
Umut § ratruction Cees = “rtnp of ie wwor ime nud Wa wnip 40 puyorrn Lompuktt ofgamtiahon Abo ‘epuaron enteanad Temingt st rages Cornero Tyutruchions rude. Rutation blw Computu jon & riero -0 puat'on :~ openabin ino post of iyutradion stored Tn Mt It Ly binany ode “Hinds HSS orbits wshox 4000. Control Umit pipes Hu ipatruchn pom Leds it. Teton Atnds unr Manis to iniade wltro spualtims. 9” na, operation arm Mado a at UrBUS nullr op aations Haus aloo coped. vats optrarin . : Stored_ Program Organusation 1 procemor nagar 3% Ingtruuion code format with & part + oa Te padre’ (+s tute He obuond ds in raurney ) | Optuand és Hod fom mamory {Und oa aass © paler asd optation- Speke ie, — haypothan ee iS pantie ee futturker nn ys ade tadet J ne poco? / watt adds Tb | bbe / ; \ Opuer hs ‘ youmer (aosa) a jnccumuar ee push out vetH-out ea abe a = Inger adclroning Mote Trounsor Bert O= Wa oddivairy m9 paypal: cam be UK A de 7! Bee an r \len Neumann Qdutetwne:- — ampules Fs. ppm Txee program Stor program = stonupt rntrodu (cooulator) (mpaun comg-) Mi eS ) Ven Naunanh. = Programm 2 aka stored in a Sparc storage, Luni calc meno 2 i fread SONML * Atwo called os IAS tomputtr — CPU = > Mo peut, : centol Unit! humds alt proumor omnbvol uignale , ire al Ol deowd, Jetchia Locus far fvutrucdion ; etc: ALU: Coleuloties Manor: Ragulers Mo derdan:- infu -output durtoy. Rusts: Databus, Aodren Rus, Umbro! Bus Hosdvastd. HO 3 > Inbhructin® clake doth Atore® im same 7 $0, cane buy yas fetch inatruction © data. Hunu, a cannot do byh, ing Tgthe « 4 = Harovardl Arduittture mtaus athareite Storaq% Jor inuhruthl data, alr _ hharote buh. : ; Io a Lecture Notes in Computer Architecture and Organization Chapter 5 Basic Computer Organization and Design Instruction Codes Program: a sequence of instructions to solve an information processing task. Instruction: a binary code specifying a sequence of microoperations for a computer. fe ( ); the part of the instruction code that specifies the operation to be Operation code (opcode| performed. — computing truchon he “au oO benauy was Ano ehupe o ton ‘Stored Program Organization Begum Of “ucro OPAGhors for tw f von Neumann architecture es edols each \yutuuren Harvard architecture Ley f plow 2a on ceonirol sgt * IAS architecture ai cnn Inkupres He bin ids 6 tw mutruchon -& prourde ap ex Common Registers the miro EBee on. cee Tor Mor Nono!s hypoPhabica) owe: ( TABLE 5-1 List of Registers for the Basle Computer Manory aut Register Number ‘symbol of bits Register name Function U4 words tach ‘ DR 16 Data register Holds memory operand ORCA \asbins AR 12 Address register___Holds address for memory : AC 16 Accumulator Processor register Commer R 16 Instruction register Holds instruction code Puls PC 12 Program counter Holds address of instruction TR Tempra reir Holts temporary data R 8 Input register Holds input character OUTR 8 Output register. Holds output character Anramgornal ef : mama k Instruction Format at - eA HAL Computers have their own instruction formats. o ips Wad (slore date Instruction codes may be written using binary or hexadecimal numbers. INR iwerenh petyeunen incre 4obe +71 YM 1D bit eyiatee 4p \b bie = e = = CEM Wan, ———_4 Uk toy ae Roate Com, Reeomeon es eae: LWewamt to froma dose munory tr ancumulatry, ie us ustthe canbe 9 55) SoM Piece - Loos Aada in DR oa ~ Ot) (Daxo. Regur. AulucHd) dala tronufemd fora BR to buy ALU > Accum lt'97 tecture Notes in Computer architecture and Organization R Figure 5.5 Basic computer instruction formats. j 0 Ista Ru 0 Or tt iy ud pom d (4) Memory - reference i opuand pdud 7 paxil ead { Is _ peer add c © ee hy tak, ta puyernatd 21 | Pe iiragaat eee > Hilde pet ny rode 13 nu ° nd ( ORE we} emma atom | Fired (6) tnpet—ourpatinsruction > CU UL epudron Instruction Set Completeness ~ NAS Hors | 7 Arithmetic, logic and shift instructions — Data transfer instructions Program control instructions ( tump/ Call) eed Input and output instruct cn Input and o % eco connel diy 30" oy Control vat =, from bole JSLILTL 1 em put The control unit ge aa nerates control signals. Hardwired control Microprogrammed control Implemented as a microprogram in the Control memory (ROM ) Implemented using gates, flip-flops, decoders and other electronic circuits | Slower ereaure softwar Easy to modify , oubay cit, ot g trim & wad Shenton one . Fetch instruction — toniool memory has & 2. Decode instruction i 4 é . apuial pograrn call (2A. Read operands)-jin cane ¢ jnasect adorning pr 3. Execute instruction oS opty et & Decod Execute Convert pg a 3 a ofp a tna eorTk J) atonal ons quake Feb & Deco 2 AR OP ert 1m IR — m[ar] ; PC ri) AR Duo > Executr Intructtons fetch fom mmr uth Hu hulp of Pc & ee 8, SSo & SC. Guck Fys-8 gor mpatatrowen ae tak PEAY "pp Inatruckin &T son Ubeing How Chows Vie: [ iReMpR] , PCH PCH h ped ofsantion Code mM 3R(0-4] AREIR(O-N) LT IR(15) Pa Zo CMumory “fence ) ICEACHDR SteO [ae] dR <20 ape He Pe4) 2) Tnterrupt ye 1. Wo operation occur whith CNA ice em heat re program intimate du gaat Mike a pulbroutine stored at OM Lec. = whl He computa Ja execustt 5h Hag: Whin 4 Hag By Aes patohon Bie ts intaaus Hed & (feted that hod been AL. - Th compute atops nonmal tsk 2 taku con Y champ « Lntouupt frp Hop R lu mid « Reo ivatuchon cycle Gaon : Red tener af Bei ae Twiurupt aye du houdwate tmplemintakien o abranch © gave putin golds (call pubrvub'ne ruc we use location 07 Brovt retwm = ado , Fal—- input (og. a oN ‘le YO Gs anctr uth ds exeusteot wt beh Y YA LALO? ‘ Fe Tey! (HEN) (FGI F Go). R =| (wee ’ RTo: ARO TR PC vetbul P Ratan: m[AR|<—tR PL<—O Rh: pc < Pct Mac eon SI Buen Ya base comput A base Compule conta ‘ ~m uadtt with 4096 words y 16 bite Cody ~ Nine “seqinters ARF, DR, AC, IR, Te UTR, NPE St © Stun Fue Hope 1,8, ER NEM Gl, £42 ~ TWD devours axe gperatin dicodu 4vib Hinting ae ocuh « ~16 bit MMO b Ue ~ Wnteo! fe joply, ~ Aad X Lome cixcuul Lonruattel t input NC Fg SIS Howchat centhtnahion Of Frutruch’on Cy chr & Intnl Yelp, Contre Logic Gok Flining & Control figun: win 9 oecocuns The (ypu) YOU Cirenit ou? & deco oulpud, 2 pupHop , >11 OF ae AC bia O10 IS to check Y ACEO & to eH sign & brew O10 1S tp duct 4o2=0 oun Hi p valutee . J TN outbult asi aCe senful y tah uaa § wu 14 n Seta compere JO di S115) Sp to HE be yet tmtrol AC ada & dean'e aust conn of tuples § Memory The stators shat chomp. the coments a aR ans Rit ARK PC RIT SARE IR(O11) ByiTg Ake MCHA) 219: ARO Dety ARTAR +] + 7m y ieyed by L0a. Fist S to ter tramsfa & cam he echieut l "entanle on bus & Thebting Load au of rept. LD(AR) = BITot RUT ae * CLR (AR)= Gee INE (APD=0s'Y | : z it 4 Thue tae Ya control impulu om ody vague TW 8 ico a imblinwwe d a ps ttabune (8) aUsore gor AR. Biv (only, Otre ragultes's contrat srgnats cam ala ve Implimmnttd , conte Of SO RE G:- TEN PPFD py site) pe DaTG Pop sieN F 2086 @ wit ~ 8008 > 8080 > 8085 > #6 &4~— 8086 > 8088 > 80186 > 80188 > 80286 > Lt - 80386 > 80486 > Pentium #ithecoolestprofessor Lecture Notes in Computer Architecture and Organization pe 1BM PC was the first technologically and commercially successfully migocone te Internet of Things = Microcontrollers + sensors + actuators, ee oe , chagiatpawied i Biybisins: enereeeOy 3 ing | abreast s72 oe Lecture Notes in Computer Architecture and Organization 16 Chapter 6 Pr i i 1 cluschiey ths Propane cam i oy stamens fo Anne) Be ful 1 pufeam a Maud dota proctrtiny Lost ¢ Hardware and Software of a Computer Computer = hardware + software Hardware: tangible components Software: programs, documents, data, etc, Notations for Writing Programs Binary code (Mm achiur fonguoge) Octal and hexadecimal code Symbolic code (assembly language) High-level programming languages Machine Language Compiler High-level Programming language Assembly Machine language language Assembly Language Mnemonic Instructions: Pseudo-instructions, e.g. ORG Assembly Program 1 8085 assembly program to find the sum of 1 to 5. Labels Mnemonics Comments MVIA, OOH ; Clear accumulator MVIC, OSH ; Initialize register C Labell: ADD jACASC DcRC 3C an, pat Ore Ol Zeman - MR (i= uvctrout aoldves - &F aynaoenahruiZeinn *- mot prathine lnahruchian bud rakes CH” fatrucboe ae about ferro Tee iw anklet prey ono OG ny '= Hanaeleetrnad mumnbas Ns Se ensruoy Locoxion, 4x1 ths Tetum o operon Pisteclin KH pons dive. END “- Dewoba wu Und of Mynaolc progeayn BEN. gamud dteriuak mambu VM > Tonvuttd te Binoy RERN te Hrxadieemal nurbu MV hd be tonvtita fo bo a ORG JOO ee ae pro From wi dat ak toc 100 Touimblr Popremn & pasa Tye pogroms © Lina ceole « Dopukiaoure a Ei ole 2 ae BE ime objet popram o oe 3 bo coh ? _ ny ith Rowan én aay te tatiow arth achara ctu ed aed with al), OpuusionE acldrun Mymnsle are (noted usttr a man % tr Cnot ines g. Pus, Lon SBT vis 4 p ravaged ty CR ode, Stored 04! L ry IS nc ay ics eins & Ste NG & S Puddle, OM t's tak in bwo Cea Fit Poss *- Fink fo te 0 Seon rapt Smt pwr pt pont, a wualu a Aerreeh bang, “chee OM abs § Hae OSMIUM « docotucn Comly LC: Mag Hey vabuh Y mienere f, oddsre woken am " OR wwinalias Le, aN y Ha BA rbeley 4 tabs), ut Atoregae Sn in wher & Weed Pena . (AKIO not dy mud \ 404 featu oven Tag my ONG un aaa corsain, Wade tg Ub, end toe itl be Ate im Yass & Nb will ane ures chittid 5 Heat pas wal nets eater tbl tev old ere tH) core Bk hth ures apres. ert in Computer Archit ur NON ae Architecture and Organization ay MVIA, 01H Ac], er a 1, number is odd sae is ore accumulator fi. i Unconditional jump pa MARE iA< 2, number is even sTA i Store accumulator E j Malt embler symbol table s assembler pass: Determine addresses |; Translate qwo-pas pass | ‘One-pass assembler pass I: Translate (use backpatching) ‘assembly Program 3 085 assembly program to add nine numbers. The numbers are stored in memory locations 2500H to 2508H. Store the sum at 2700H. Labels. Mnemonics Comments LXIH, 2500H HL <-2500H CALL Sbr_add ; Call Sbr_add STA 2600H ; Store accumulator at 2600H CALL Sbr_add all Sbr_add STA 2601H core accumulator at 2601H CALL Sbr_add all Sbr_add STA 2602H fore accumulator at 2602H LXI H, 2600H L<- 2600H CALL Sbr_add II Sbr_add STA 2700H + Store accumulator at 2700H : HUT Halt Sbr_add: MOVA,M INXH ADDM INXH ADD M INXH RET #thecoolestprofessor ie race eae ee ae ee ed Uy 342 *| oe Leciure Notes in Commuter Architecture and Greanization : we au tnt ' WE Vale y= YY Assembly Program 4 oa Sten 8085 assembly program to calculate the factorial of a number. ue aS og) We write a subroutine Mul that calculates A <-B * C. mix we ie a subroutine Fac that calculates E <- DI. Lt H, 00 SoH Is Mnemonics Comments Mul: MVIA, 00H SA<0 MOV By i eee loop: ADD jAcA4B mvt PB esta amet ocr j3C BUN SHY is § Crane TH poe ned blue Hae wade profroan ® toa. anbiuc adoring Auva ab 0 ra proud boruhsns €0 & Be coating usetining 0 Hee Yaad propre ea Seubutie Hokog : rg Bapakon, SKI .— cbuclea input ap AO cu H Ona te availabe \* J HOt input 0D Ckcuute neat nshuchon. ——_gthecoolestprofessor raput DPT On _ up: $8 Tenet f BUN CIF | F(a3=0 Bramth to daub INP UL Flog=] tute inp out U) petit Ua SANE (Stove Chow - ALT eae = Alp rore™ Upp CHR 1 ad Choe Cor = Sko Neha cle ofp (ag BUN COF (1 FLag=o branch te eouce afew Ovty "Fags! pave Chol, KU cut HEY ort srbtadl f waitrrs JX T]p, we tan we weunph Jou 47 saat inkuaupl Yu yap In con YH Jp or |p sotnot ap Cow, peforrn Oth proavam « Ti y uauhre ee Contwit J pyouraor rte. FUE ube |b ad hey the ie ie feo, 44 0 > Ruine Content prownor ete A Tua, on insooh Jaci eu ty Aunrany fee ~ CW a tha pat Of computu max Locture Notes in Computer Architecture and Organization peformma the bulk nf dose 49 | Prous of trahors Chapter 8 | "ORY a merle Ao 3 peut : Central Processing Unit MU Set 10rd vtamediate, dale und diving eveution a ras on 4 ne re bd mepulud vier o-oprabon or ertaudtng ths iyubruyon? Instruction set oT Gmhol ut aupavice the APU has an instruction set associated with it Tha train of Ye Instruction set: designed by CPU developer, used by mrogrammers 4 4 vinden radon camnnry fu Maule % inabeue ALY a4 to Memory Stack | rth of Ob pn, 19 pufom. uo Steck, | A part of the memory Is dedicated for a stack Combdk Oy ni Meta, as the ee The stack grows downward a | geet SHUUWL & behavipur % by Whe programmu. Yhat way macbire Stack Pointer (SP) #5 [pvogran |"? (anguage tratruihiore m—ooasa |2007 \ 1 tncludes inaction format , Push: 09 \ rood, inatruchion aur & saath add resting MISP] © DR rey, boat \ (odio af PU veg ters een ] |, | geraal orgenisabion W PY pul a Ure ti ) ee / Pop: . >| Raguate Set SP ©SP41 anaes uate | canerol, E tT | 0 OR € MSP] Ne provitinns Jot tale = | , ious due. —| ALU | Use of Memory Stack perro +s: Foluh ott ae) eZ Evaluating expressions [fy 18s, tevam Fata (Rt) oe iia y cu | ack, Implementing subroutine call and Ay ae 18 stack operations A ee : 9 te UF acu a agile lagen Sher = stny add rnin.) ——- Three Types of CPU Organizations wi sad ‘ata lace Organ ashen Single accumulator organization’ fatrudkon bey ba, Stack General register organization "PS 9 oy toby aug tack (ack org enization On Of ty sou. aquie’ ie a abl Gh F DUD OLE : - von ue Us reds ey ADD an fo \ far uth i Hock * ae i pee ial 4 i 4 pugaky d 1 a oP, a, = (A+B)*(C+D) dase taf too Ep tors Fou * ae RL, A,B RL<—M(A} + M(B} emy. ADD ke,C,D R2—M(C]) +M[D} "4% ead AD yori MOL =X, R,R2 = M[X] -Rb*R2 one dutty weblion Advantage: short programs NY Hb Hop =O Disadvantage: long instructions Example: Cyber 170 A wompute sigan uh ued in a ek OP convans dag to wrt on dlaik Push :~ SP Sp. the iit gp UTrUUND Thy 4 “ box ; ‘ Tot 9 Pett OM divided ind pala cobted| MIsPle pe fda ayy rnie tommon fields ue Y @P=0) tom (FULE)) | aoperaben war: aba "apropig teu opuahor tary eo nat dum lu stored al addrin 00000) = "bdr ie are caer 2 eee stored af oddrus 000000 = not fidd sat Ape pote Eolas eee cya oe ase adem b Af] | 9 0 Ase i. ce Ful _——S"———s | : ‘ ‘ Lecture Notes i Canmynurer Arctic reanntORBENESI Two Address Instructions MOV) = R1,A RL—MA] ADD Rb,B RUCRL + MLB] MOV R2,C Ree MC} ADD Re,D ReeRe+M[D] MUL RL,RE | RUCRL*RE MOV) X, RL MIX) —RL One Address Instructions wag tuplled accunusfate (AC) LOAD =A ACMA fer au aoe manips, ADD Bo ACeAC + MIB] Tox amporary rmumurry Lotah'yn STORE T M[T] tuted fo pulocate program ee eee Ack inabruchow ‘Flag Bits [Stat Rin i le not inculce am cary) aude geld in 1S four, veo TS 2 ab noe in Zero (2) ‘Overflow (V) Types of Interrupts Hardware Interrupt Oulu i 10 CISC and RISC Complex instruction Set Computer (CISC) Reduced Instruction Set Computer (RISC) Examples; Berkeley RISC (University of California, Berkeley, 1980) ~ Prof. David A. Patterson MIPS (Stanford University) ARM 1BM PowerPC Hthecoolestprofessor F Most ue mmituctons cam bt CRE ye Selly salen ~ Prograan conrrok ae “Hany — patamampulonio ocd Caine es Cramuja data pom Cpuferm artiouhc, provida dicaton -ma elated ro 0k) fi g We: Copaeilines ) opuratibns ) O vata Tram} ‘ padroneng cuode yet Joadk —smatruchon Name Mremore load > pit = — Lb ADR — AC esi : StOre st a “ A K : Induct — Lp @abe — ACH yee oer i ee ce mcr and | Exchange ¥CH Ala siie uo Sark — AC ve : Inpul IN Lmmvouak — Ly FNBR — aC<— , | guid = 07 Indie — Lp abecd AC MDa tah A ee ew = nent i 0} “pe Indes — LD Ce) — AC 1) Mp por ia P DCE mafery RISA huuto inert’ — LCEI)+ — © dota Mawnipukabror Acitywh'e Logica 0 Art Ei > Inuremusre ING Mosnipulaky on DeCTnUk BEC Ube ce col ahi Sue Naa AbD Compleat cor). mi Fog SHR Cubrou SUB AND AND : mace Multiply rave QR of Pritinnnnbe BIE oy Dive bi xoR “OR | eae Add ott — ADDe Cuan are want . Sk aug SETC Rotate ROL Sub wot suse ements borrow) Compl Com & wat ROR Negoly NEG antes Oa L "Neon? Enable’ E rotate Soro (asleep Siyaroukn PI cow gi ROLE ppp [Addl Binoy are nya ORC ADD ERAS dio PF aasieudtion codt foimat ADD Add dima - indude s Modds OP REG TYPE RL CUNT operation care Typcoe Tot Fir ey ag we (rigotor “pte (abi. tie atl Program control pire io eet = f ei = Conditions Bramde ram, BA sonh ve 2a) Webigad emp gral Uma 82 — Brom Yo 2=| nb iss gn2- Hes z=0 | BAL A>B [Bqt APB 4 = BHE AS@ ene ArB Sib SKP ac - 4 c ‘ ! tol CALL ENC ig m0 Chg 80 A Some compute Atore tHe pC yi ut TM Come COAL | Hite OL Ory Y prouans ust Hu'n comput ow fou Coch munde te) ae reed b? Saye regeatey Ontlak <0) py ged Mparaty Art of fagiates. YH of Ensonupt sexenal = come from Ho dun [nung Ausite | pow. cuppy Cheutt Jexteasal tow a L Lapa hi wut ged Hire ON “yn Ny a. > Paynchmouy Tintunalt = iUleged um inatrurrire altho called rape . S repiata oven : divicn by 0 ,rovatig tp 0d Sach Oru flns % Ge Egan 04 4 Syndrenosr, 4 | wales: dus promature tanunah'on o Iran, : | Alay beon 2 = Intakt d. “y healt ng am ingruenoo Sheol Coll” iruuchon that behav Lik, in te tuned fo initode Mkompt ad 0. mudulas poston . sud usitn WU Cor CAML WA UUN'on ~ susitetainy rom CPU Usa nnd fp huprviior nrodlt. Lecture Notes in Computer Architecture and Organization 23 — Tamlation yf 4 bovel lamauage 4s tow turk is dom by computer progtann. Oracle SPARC : HP PA-RISC ~ repelaon jy Aurapufied in voncplex intruct om CISC Characteristics 1. Alarge number of instructions, typically 100 to 250 # a igctab aquest Some instructions perform specialized tasks and are used rarely z . Alarge number of addressing modes, typically 5 to 20 Cop orahon VA Consul & . Variable length instruction formats Instructions to manipulate data in memory Jam $10 compuket - wun isc Characteristics —» secluce exceution Lene hy almplifiying srupructon 4b. 1. Relative few instructions . Relatively few addressing modes Memory access is limited to load and store instructions |. All arithmetic and logic operations are done in registers Fixed-length and easy to decode instruction formats . Single-cycle instruction execution salen coat AERA ae ae RC contol ._ Relatively large number of registers . Overlapped register windows to make subroutine call and return faster 10. Efficient instruction pipeline — yeast, oI tv fruthtn pt eee ye by 11. CPU-compiler co-design oralsp pery doch , decode Rexe ‘overlapped Register Windows —> For @ proaure Call, ruput valiys Gd saved, 138 registers pod pananuks am sane, Yum aU & made. 8 windows of 32 registers each on lun OU tue valu ext 2efored » © 10 global registers This a Mine usu Merg—pro uss. . = Some pees provicle sdakepte vei bante 4 Pern anewn © 10 local registers en Cauh proud iy allocaka. 4a ous Lomi © 12common registers tugiHtrs, This ebininall Ke wisok (4 Sawies ® Current Window Pointer (CWP) register +14 fotry HHL volun ory SHACK be dom AUG | ~ Ponung of poramutis com : ‘ Or atlappe pagar [Bh soratressters s¢rotow - Each proveduae [Bh toca resisters Oli Hisults in allocation eae te a AW Udindous ei | Sharedregisters Covsisting Ya MEF i high reaisters ofa teers toes Y reo 7. register windows pr 5 cxdults - / serve as low registers of register window (aya) fYOCeCu hawt aes tapi re thot We shod uu eaRaaREA pam parameters, tisha We TH veqstere 9 10 gforol ,10KN Local 4x6 common =14 m ont window Js active at 0 given Hwa Coch proadusa Was O64 7 a yugaters while atte (ogioratt ifocatt S46» Mb a= 6 Local=L common=< urindows = Then, straw pire = Ltac+g = 34 Clotrxotlo) regina p= (LEO > TY ( (HOHE I) Lecture Notes in Computer Architecture and ‘Organization Register Window 3, tae > 4 Register Window 2, Register \Window 5 Register eae Register \ Window 6 Register Window 0 (or Window 7 Berkeley RISC (Univesity of cauljounia, Aukey ) 32-bit processor E16, htt 32-bit address 3Linstructions addressing modes (register, immediate, relative) 138 registers bt gtruchon (UMeL a Hf th 10 qlobas | Burindauts of 32. tuguler! £2! > 10 gbbal fn Hoa previo 1510 Locat (age nate ‘19 vomnaon vie atch Witrdows Opeeeiae (a 14 Ib e+ bxS=BF 3) 22493 Ais YY BOD s4 ° w ‘ oe YW rs se S2 (eupinte made) Datindsin : Z a c 1 Regie eee Spey Kaguty Ss boy t * Sh Hs sa agit S 02 Sieaph ourea, ‘Ge VINO iz Sst Spueipies a Siem evtendlad og pte Orton RA Ae 9682 a et covalant aye 4 3 ro, opcode | ka} Re] 1 on 6 Sar anrat 13 . Regara— imoudi woos (S spapu prod). i silent SEE) FS a [es Bos ae sr a a ni Autadive : a resueion, pin on f Ib powibl borat Lond ‘thecoolestprofessor Le rea rae ae a=: ae R23 <— R221 Rr apn R22 ,R2!, 223 App R22, HIS0,223 RISE AAA NSE ADD RO, RII, FAY a2 —f! (mort) ot instru chovs am alo ve qenuatd, &:- coe (R22) HIS, RS RS — M22) +150 regal tlapla (£0) #0 FS rs <— m[e22) Regist induc 3 £S— M1500) dink Sa cou amd sakuan instructiow pu oe Oe sind pours) rage ts pervs (2 apnendy nagar window. roy Min, toa programm OU a new procitiy Cw 4 add by ont to poi fo tee wus Lou ryt winslow) - RYH pdliinn ins hurr CwR yw nueuet by ee oud wxvrolby) - 5 vol LDL (RO) #S00 ,kS poral proumens & ulthtuhd by dist Ab Udy the data ! multiple femaonat uM . Bo. anthmbd 3 pote afte. Hay cry dock bul qe op as data 4 pes forched im ore Maisto Gensal _consiclurahars'- eafficcent when came t0Ale chore may Vines ast lf cater tthecoolestprofessor Task: Total ofnaton cae) Cn | eee de befooms a POE Aen tyson: itbusrotu bohanour of % pipeline TNE Gecagiarn pecouss sos Atgmink ubile'zoben as X Pryn ap ty. Time talten fe prom a Lubopuarion in eat Marnont =tp= dons is = k= 4 seg nes N= loo tos. Pipetine system takes: (Kb 1-1) = (4199) X20= 2060% 19 ompeb Non peptone ty= klp= 4 x20= FOng Ok En te Ce CO S00 oe pete cae 2 B08 wy Yy (orn te ; es yah'o= 8000 pucks 20. =n. q Aegis . "Lecture Notes in Computer Architecture and Organization 4 TABLE 9-1 Contene of Registers in Pipeline Example Ook Segment! — Segment2_—_Segment3 Number Rl R23 RA RS Figure 9-3 Four-segment pipeline. Figure 9-4 Space-time diagram for pipeline. p= time taken by a segment to process a task ‘1 will complete after ktp time * . ter that, one task will complete in every tp time ime taken to complete n tasks = ktp + (N-1)tp = (k+n-1)tp Ina non-pipeline system — ea ntasks Hthecoolestprofessor Lecture Notes in Computer Architecture and Organization 28 ime taken by the system to process a task Time taken to complete n tasks = nta Speedup, S = Time taken by a non-pipeline system / Time taken by a pipeline system = nta/ (k#n-1)tp Ifn>>k, then S = ta/ ty If we assume tn=kt,, then S=k Tuomncolliy Apudup= K=no. dpe Arithmetic Pipelining ({Ound in igh dpud eonputtis) Letus Consider a floating-point adder-subtractor pipeline . . oly an aa slab wae pipeline uuutpla 2 adn Dpagatin x 9504* 10.51 we Apdot abated tp mini ed probag 1 ¥=0.8200 * 1 gem exponen marti. We use a 4-segment pipeline oe oe 1. Compare the exponents la-b) = ign WOnL4O 2. Align the mantissas X= 0,9504* 10°, Y= 0.0820* 107 $77) ipl 3. Add or subtract the mantissas Z=X+Y=1.0324 * 10? unlit: 4. Normalize the result Z= 0.10324 * 10 — — na a ' hot: — uppoH time astoy z i fou ou ty ; smal, bons, 12,102, go 4 3 nw . - 2 rund ‘ fan fa €,=l0ns i ot ve) He tne? dont \a > Clock oy he choosen nee : : Mar (ti) 4 y= Wom. At 8m pita ty Bt; + by = 220 08 Spudup= 320 _ 2.4 one Sapte Ito men pipeline Figs 9.6 Pepsin fr fomting poi ethan adborcaom, ads Eee ingtruchiond prom pees wrbale partons (mgnuln ort Ot: burg excuyfed 2 a ; i hen Implement a pipeline for the instruction cycle ave “trecwhwn steps in ingtruUin C7 uth jata dependency decode Reschedule instructions ~au yas add) Instruction Pipelining ~ Fetch operands pom mamney -t ivut. 1 fithecoolestprofessor ops plow nO awe ee Oe ine, Tak pas alee inet acespt 4 fp bate stoma afer 4 task at Tex same de « jnatruch’on Mubepte Deske. ongamutanon make SIMD 1H 3 , opel on ereete/pe dale in parole . m an ‘on = Ean pagrmns take ' eye coon chock eye 7 8% Spuuatiim thw, ae wait tim gf fra spoations WA4) fe next clock yee Ting) GL trstruchon pepluna Staph: | | 4 arshruch on 2 ie ciel tare ae 7 et} pal rol ex | ed | | | 2 Fl DA Fo/E | | | a Fl | ba] Fojex| | | u fei{ -|- FF val ro [| | 5 | ; -| [Fr fos fro | | | | | | It lies (eae et Fl TODA 0) es caer Twitrudydn Fos Fh op woe A? be wdle XS tyes - aah BPO een chin iy atrodedd antudion 3b bromde jsut OHA pro cums an haultd unbil bramch Cxculk . Coun the inetuntkion peplin #9 deviate florn Ls Pipeline, oa ; cp oimal Bastion. — Resource confi : aceon fo Monsdup by yO parent ab tur same Himes Reuolicd by wang atparaty irstruchon > alata ues Pee Iatruthin dipunds on He purenle of pire oud instuch on ~ Brom diff cube tratruchin, that peat vats of Pc. Qata Df emduney ’ d eer annotbe cabeulased vecaune tht info mended hap ing mode pp rot awartabele - Mappa induct adlduyniny rode . Gy My i hosdwouw inealocts :- Det tng reuchons WHOM AQULL whan art aunyaho qi ogsmunn farther Wf in su pepeline oyeta autayes poge popu try mucsen ss Oferamd fornascrg'- how dod ro duke Corfe’ ae Selayed S08 = sonupiles, dipendouk ' (nacht nt : Handling Patanch ayrution! - p inthuchon’ - Or. beth ths indtruchion . € TNZ 2000 , rete next jnaruchion iad ee Trompe ob tard 2b iin, © bs atin dined sea brands “BTR otores prontouty Cees brad inst AH 'C Wag itt ” “Hantaa, eh grote, Ur cbacks buffer It 4 pram, pafuuth unbvaats jem hw odds B18 a : = Almulan fo BYB fou stoop car be ex Ctubed cawetly asi Hous Daye'ry 00h owt ‘pale Updo bod wr f nel oes ram, runtnge aed. ct by inung bul inane secure Notesin COMPUT Architecture and Organization 2 appucause operrr pou. ranch difficulties = wath ah 3 granch prediction : aa HIS Dipeline —> Next rp Buhne dom ane vector Processing cmt vector operations arithmetic operations on arge arrays of numbers. 012,001 ee a align memory access techniques, and pipelining” Swab ky ra a Using vector processing ruth font ‘aada, 01% ay Truss Oo 8 pple ee degre cath: pki gay j iri Chay ¥-MP, YMP , Cray & : aan 4 eynselve a8 ue ye

You might also like