The extra single-cycle adders

Size: px
Start display at page:

Download "The extra single-cycle adders"

Transcription

1

2 lticycle Datapath As an added bons, we can eliminate some of the etra hardware from the single-cycle path. We will restrict orselves to sing each fnctional nit once per cycle, jst like before. Bt since instrctions reqire mltiple cycles, we cold rese some nits in a different cycle dring the eection of a single instrction. For eample, we cold se the same : to increment the PC (first clock cycle), and for arithmetic operations (third clock cycle). Proposed eection stages. Instrction fetch and PC increment 2. ing sorces from the file 3. Performing an comptation 4. ing or writing () memory 5. Storing back to the file 2

3 Two etra adders Or original single-cycle path had an and two adders. The arithmetic-logic nit had two responsibilities. Doing an operation on two s for arithmetic instrctions. Adding a to a sign-etended constant, to compte effective addresses for lw and sw instrctions. One of the etra adders incremented the PC by compting PC + 4. The other adder compted branch targets, by adding a sign-etended, shifted offset to (PC + 4). 3

4 The etra single-cycle adders PC 4 Add Reg Shift left 2 Add PCSrc Instrction address [3-] Instrction memory I [25-2] I [2-6] I [5 - ] 2 2 Registers Zero Reslt Op address address em Data memory emtoreg RegDst Src em I [5 - ] Sign etend 4

5 Or new adder setp We can eliminate both etra adders in a mlticycle path, and instead se jst one, with mltipleers to select the proper inpts. A 2-to- m SrcA sets the first inpt to be the PC or a. A 4-to- m SrcB selects the second inpt from among: the file (for arithmetic operations), a constant 4 (to increment the PC), a sign-etended constant (for effective addresses), and a sign-etended and shifted constant (for branch targets). This permits a single to perform all of the necessary fnctions. Arithmetic operations on two operands. Incrementing the PC. Compting effective addresses for lw and sw. Adding a sign-etended, shifted offset to (PC + 4) for branches. 5

6 The mlticycle adder setp highlighted PC PC IorD em SrcA Address emory em em Data RegDst 2 Reg 2 Registers Zero Reslt Op SrcB Sign etend Shift left 2 emtoreg 6

7 Eliminating a memory Similarly, we can get by with one nified memory, which will store both program instrctions and. (a Princeton architectre) This memory is sed in both the instrction fetch and access stages, and the address cold come from either: the PC (when we re fetching an instrction), or the otpt (for the effective address of a lw or sw). We add another 2-to- m, IorD, to decide whether the memory is being accessed for instrctions or for. Proposed eection stages. Instrction fetch and PC increment 2. ing sorces from the file 3. Performing an comptation 4. ing or writing () memory 5. Storing back to the file 7

8 The new memory setp highlighted PC PC IorD em SrcA Address emory em em Data RegDst 2 Reg 2 Registers Zero Reslt Op SrcB Sign etend Shift left 2 emtoreg 8

9 Intermediate s Sometimes we need the otpt of a fnctional nit in a later clock cycle dring the eection of one instrction. The instrction word fetched in stage determines the destination of the write in stage 5. The reslt for an address comptation in stage 3 is needed as the memory address for lw or sw in stage 4. These otpts will have to be stored in intermediate s for ftre se. Otherwise they wold probably be lost by the net clock cycle. The instrction read in stage is saved in Instrction. Register file otpts from stage 2 are saved in s A and B. The otpt will be stored in a Ot. Any fetched from memory in stage 4 is kept in the emory, also called DR. 9

10 The final mlticycle path Reslt Zero Op SrcA 2 3 SrcB 2 2 Registers Reg Address emory em Data Sign etend Shift left 2 PCSorce PC A 4 [3-26] [25-2] [2-6] [5-] [5-] Instrction emory IR RegDst emtoreg IorD em em PC Ot B

11 Register write control signals We have to add a few more control signals to the path. Since instrctions now take a variable nmber of cycles to eecte, we cannot pdate the PC on each cycle. Instead, a PC signal controls the loading of the PC. The instrction also has a write signal, IR. We need to keep the instrction word for the dration of its eection, and mst eplicitly re-load the instrction when needed. The other intermediate s, DR, A, B and Ot, will store for only one clock cycle at most, and do not need write control signals.

12 Smmary of lticycle Datapath A single-cycle CPU has two main disadvantages. The cycle time is limited by the worst case latency. It reqires more hardware than necessary. A mlticycle processor splits instrction eection into several stages. Instrctions only eecte as many stages as reqired. Each stage is relatively simple, so the clock cycle time is redced. Fnctional nits can be resed on different cycles. We made several modifications to the single-cycle path. The two etra adders and one memory were removed. ltipleers were inserted so the and memory can be sed for different prposes in different eection stages. New s are needed to store intermediate reslts. Net time, we ll look at controlling this path. 2

13 Controlling the mlticycle path Now we talk abot how to control this path. PC PC IorD SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] Instrction emory RegDst 2 Reg Sign etend 2 Registers Shift left 2 A B SrcB Zero Reslt Op Ot PCSorce emtoreg 3

14 lticycle control nit The control nit is responsible for prodcing all of the control signals. Each instrction reqires a seqence of control signals, generated over mltiple clock cycles. This implies that we need a state machine. The path control signals will be otpts of the state machine. Different instrctions reqire different seqences of steps. This implies the instrction word is an inpt to the state machine. The net state depends pon the eact instrction being eected. After we finish eecting one instrction, we ll have to repeat the entire process again to eecte the net instrction. 4

15 Finite-state machine for the control nit Op = R-type R-type eection R-type writeback Instrction fetch and PC increment Register fetch and branch comptation Op = BEQ Branch completion Effective address comptation Op = SW emory write Op = LW/SW emory read Register write Op = LW Each bbble is a state Holds the control signals for a single cycle Note: All instrctions do the same things dring the first two cycles 5

16 Stage : Instrction Fetch Stage incldes two actions which se two separate fnctional nits: the memory and the. Fetch the instrction from memory and store it in IR. IR = em[pc] Use the to increment the PC by 4. PC = PC + 4 6

17 7 Stage : Instrction Fetch Reslt Zero Op SrcA 2 3 SrcB 2 2 Registers Reg Address emory em Data Sign etend Shift left 2 PCSorce PC A B Ot 4 [3-26] [25-2] [2-6] [5-] [5-] Instrction emory IR RegDst emtoreg IorD em em PC

18 Stage : Instrction fetch and PC increment PC PC IorD IR = em[pc] SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB PC = PC + 4 emtoreg 8

19 Stage control signals Instrction fetch: IR = em[pc] Signal em IorD IR Vale Description from memory Use PC as the memory read address Save memory contents to instrction Increment the PC: PC = PC + 4 Signal SrcA SrcB Op PC PCSorce Vale ADD Description Use PC as the first operand Use constant 4 as the second operand Perform addition Change PC Update PC from the otpt We ll assme that all control signals not listed are implicitly set to. 9

20 Stage 2: s Stage 2 is mch simpler. the contents of sorce s rs and rt, and store them in the intermediate s A and B. (Remember the rs and rt fields come from the instrction IR.) A = Reg[IR[25-2]] B = Reg[IR[2-6]] 2

21 Stage 2: Register File PC PC IorD SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB emtoreg 2

22 Stage 2 control signals No control signals need to be set for the reading operations A = Reg[IR[25-2]] and B = Reg[IR[2-6]]. IR[25-2] and IR[2-6] are already applied to the file. Registers A and B are already written on every clock cycle. 22

23 Eecting Arithmetic Instrctions: Stages 3 & 4 We ll start with R-type instrctions like add $t, $t, $t2. Stage 3 for an arithmetic instrction is simply comptation. Ot = A op B A and B are the intermediate s holding the sorce operands. The operation is determined by the instrction s fnc field and cold be one of add, sb, and, or, slt. Stage 4, the final R-type stage, is to store the reslt generated in the previos cycle into the destination rd. Reg[IR[5-]] = Ot 23

24 Stage 3 (R-Type): operation PC PC IorD SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB emtoreg 24

25 Stage 4 (R-Type): Register back PC PC IorD SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB emtoreg 25

26 Stage 3 (R-type): instrction eection PC PC IorD SrcA Save the reslt in Ot em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB Do some comptation on two sorce s emtoreg 26

27 Stage 4 (R-type): write back PC PC IorD...and store it to rd SrcA Take the reslt from the last cycle... em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB emtoreg 27

28 Stages 3-4 (R-type) control signals Stage 3 (eection): Ot = A op B Signal SrcA SrcB Op Vale fnc Description Use A as the first operand Use B as the second operand Do the operation specified in the fnc field Stage 4 (writeback): Reg[IR[5-]] = Ot Signal Reg RegDst emtoreg Vale Description to the file Use field rd as the destination Ot contains the to write 28

29 Eecting a beq instrction We can eecte a branch instrction in three stages or clock cycles. Bt it reqires a little cleverness Stage involves instrction fetch and PC increment. IR = em[pc] PC = PC + 4 Stage 2 is fetch and branch target comptation. A = Reg[IR[25-2]] B = Reg[IR[2-6]] Stage 3 is the final cycle needed for eecting a branch instrction. Assming we have the branch target available if (A == B) then PC = branch_target 29

30 When shold we compte the branch target? We need the to do the comptation. When is the not bsy? Cycle 2 3 3

31 When shold we compte the branch target? We need the to do the comptation. When is the not bsy? Cycle 2 3 PC = PC + 4 Here Comparing A & B 3

32 Optimistic eection Bt, we don t know whether or not the branch is taken in cycle 2!! That s okay. we can still go ahead and compte the branch target first. The book calls this optimistic eection. The is otherwise free dring this clock cycle. Nothing is harmed by doing the comptation early. If the branch is not taken, we can jst ignore the reslt. This idea is also sed in more advanced CPU design techniqes. odern CPUs perform branch prediction, which we ll discss in a few lectres in the contet of pipelining. 32

33 Stage 2 Revisited: Compte the branch target To Stage 2, we ll add the comptation of the branch target. Compte the branch target address by adding the new PC (the original PC + 4) to the sign-etended, shifted constant from IR. Ot = PC + (sign-etend(ir[5-]) << 2) We save the target address in Ot for now, since we don t know yet if the branch shold be taken. What abot R-type instrctions that always go to PC+4? 33

34 Stage 2 (Revisited): Branch Target Comptation PC PC IorD SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB emtoreg 34

35 Stage 2: Register fetch & branch target comptation PC PC IorD sorce s SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB Compte branch target address emtoreg 35

36 Stage 2 control signals No control signals need to be set for the reading operations A = Reg[IR[25-2]] and B = Reg[IR[2-6]]. IR[25-2] and IR[2-6] are already applied to the file. Registers A and B are already written on every clock cycle. Branch target comptation: Ot = PC + (sign-etend(ir[5-]) << 2) Signal SrcA SrcB Op Vale ADD Description Use PC as the first operand Use (sign-etend(ir[5-]) << 2) as second operand Add and save the reslt in Ot Ot is also written atomatically on each clock cycle. 36

37 Branch completion Stage 3 is the final cycle needed for eecting a branch instrction. if (A == B) then PC = Ot Remember that A and B are compared by sbtracting and testing for a reslt of, so we mst se the again in this stage. 37

38 Stage 3 (BEQ): Branch Completion PC PC IorD SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB emtoreg 38

39 Stage 3 (beq): Branch completion PC PC IorD em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B 4 SrcA 2 3 Use the target address compted in stage 2 Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB Check for eqality of contents emtoreg 39

40 Comparison: if (A == B)... Stage 3 (beq) control signals Signal SrcA SrcB Op Vale SUB Description Use A as the first operand Use B as the second operand Sbtract, so Zero will be set if A = B Branch:...then PC = Ot Signal PC PCSorce Vale Zero Description Change PC only if Zero is tre (i.e., A = B) Update PC from the Ot Ot contains the reslt from the previos cycle, which wold be the branch target. We can write that to the PC, even thogh the is doing something different (comparing A and B) dring the crrent cycle. 4

41 Eecting a sw instrction A store instrction, like sw $a, 6($sp), also shares the same first two stages as the other instrctions. Stage : instrction fetch and PC increment. Stage 2: fetch and branch target comptation. Stage 3 comptes the effective memory address sing the. Ot = A + sign-etend(ir[5-]) A contains the base (like $sp), and IR[5-] is the 6-bit constant offset from the instrction word, which is not shifted. Stage 4 saves the contents (here, $a) into memory. em[ot] = B Remember that the second sorce rt was already read in Stage 2 (and again in Stage 3), and its contents are in intermediate B. 4

42 Stage 3 (SW): Effective Address Comptation PC PC IorD SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB emtoreg 42

43 Stage 4 (SW): emory PC PC IorD SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB emtoreg 43

44 Stage 3 (sw): effective address comptation PC PC IorD SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB Compte an effective address and store it in Ot emtoreg 44

45 Stage 4 (sw): memory write PC PC IorD...into memory. SrcA Use the effective address from stage 3... em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB...to store from one of the s... emtoreg 45

46 Stages 3-4 (sw) control signals Stage 3 (address comptation): Ot = A + sign-etend(ir[5-]) Signal SrcA SrcB Op Vale Description Use A as the first operand Use sign-etend(ir[5-]) as the second operand Add and store the reslting address in Ot Stage 4 (memory write): em[ot] = B Signal em IorD Vale Description to the memory Use Ot as the memory address The memory s inpt always comes from the B intermediate, so no selection is needed. 46

47 Eecting a lw instrction Finally, lw is the most comple instrction, reqiring five stages. The first two are like all the other instrctions. Stage : instrction fetch and PC increment. Stage 2: fetch and branch target comptation. The third stage is the same as for sw, since we have to compte an effective memory address in both cases. Stage 3: compte the effective memory address. 47

48 Stages 4-5 (lw): memory read and write Stage 4 is to read from the effective memory address, and to store the vale in the intermediate DR (memory ). DR = em[ot] Stage 5 stores the contents of DR into the destination. Reg[IR[2-6]] = DR Remember that the destination for lw is field rt (bits 2-6) and not field rd (bits 5-). 48

49 Stage 4 (LW): emory PC PC IorD SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB emtoreg 49

50 Stage 4 (lw): memory read PC PC IorD...to read from memory... em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B 4 SrcA 2 3 Use the effective address from stage 3... Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB...into DR. emtoreg 5

51 Stage 5 (LW): Register back PC PC IorD SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB emtoreg 5

52 Stage 5 (lw): write PC PC IorD...and store it in rt. SrcA em Address emory em em Data IR [3-26] [25-2] [2-6] [5-] [5-] RegDst 2 Reg 2 Registers A B Zero Reslt Op Ot PCSorce Instrction emory Sign etend Shift left 2 SrcB Take DR... emtoreg 52

53 Stages 4-5 (lw) control signals Stage 4 (memory read): DR = em[ot] Signal em IorD Vale Description from memory Use Ot as the memory address The memory contents will be atomatically written to DR. Stage 5 (writeback): Reg[IR[2-6]] = DR Signal Reg RegDst emtoreg Vale Description Store new in the file Use field rt as the destination from DR (from memory) 53

54 Finite-state machine for the control nit Op = R-type SrcA = SrcB = Op = fnc R-type eection Reg = RegDst = emtoreg = R-type writeback Instrction fetch and PC increment IorD = em = IR = SrcA = SrcB = Op = PCSorce = PC = Register fetch and branch comptation SrcA = SrcB = Op = Op = BEQ SrcA = SrcB = Op = PC = Zero PCSorce = Effective address comptation Branch completion Op = SW em = IorD = emory write Op = LW/SW SrcA = SrcB = Op = emory read Register write Op = LW em = IorD = Reg = RegDst = emtoreg = 54

55 Implementing the FS This can be translated into a state table; here are the first two states. Crrent State Inpt (Op) Net State PC IorD em em IR Otpt (Control signals) Reg Dst emto Reg Reg SrcA SrcB Op PC Sorce Instr Fetch X Reg Fetch X X Reg Fetch BEQ Branch compl X X X X Reg Fetch R-type R-type eecte X X X X Reg Fetch LW/S W Compte eff addr X X X X Yo can implement this the hard way. Represent the crrent state sing flip-flops or a. Find eqations for the net state and (control signal) otpts in terms of the crrent state and inpt (instrction word). Or yo can se the easy way. Stick the whole state table into a memory, like a RO. This wold be mch easier, since yo don t have to derive eqations. 55

56 Smmary Now yo know how to bild a mlticycle controller! Each instrction takes several cycles to eecte. Different instrctions reqire different control signals and a different nmber of cycles. We have to provide the control signals in the right seqence. 56

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read.

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read. The final path PC 4 Add Reg Shift left 2 Add PCSrc Instrction [3-] Instrction I [25-2] I [2-6] I [5 - ] register register 2 register 2 Registers ALU Zero Reslt ALUOp em Data emtor RegDst ALUSrc em I [5

More information

The single-cycle design from last time

The single-cycle design from last time lticycle path Last time we saw a single-cycle path and control nit for or simple IPS-based instrction set. A mlticycle processor fies some shortcomings in the single-cycle CPU. Faster instrctions are not

More information

Review Multicycle: What is Happening. Controlling The Multicycle Design

Review Multicycle: What is Happening. Controlling The Multicycle Design Review lticycle: What is Happening Reslt Zero Op SrcA SrcB Registers Reg Address emory em Data Sign etend Shift left Sorce A B Ot [-6] [5-] [-6] [5-] [5-] Instrction emory IR RegDst emtoreg IorD em em

More information

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM Lectre (Wed /5/28) Lab # Hardware De Fri Oct 7 HW #2 IPS programming, de Wed Oct 22 idterm Fri Oct 2 IorD The mlticycle path SrcA Today s objectives: icroprogramming Etending the mlti-cycle path lti-cycle

More information

Review. A single-cycle MIPS processor

Review. A single-cycle MIPS processor Review If three instrctions have opcodes, 7 and 5 are they all of the same type? If we were to add an instrction to IPS of the form OD $t, $t2, $t3, which performs $t = $t2 OD $t3, what wold be its opcode?

More information

Computer Architecture Chapter 5. Fall 2005 Department of Computer Science Kent State University

Computer Architecture Chapter 5. Fall 2005 Department of Computer Science Kent State University Compter Architectre Chapter 5 Fall 25 Department of Compter Science Kent State University The Processor: Datapath & Control Or implementation of the MIPS is simplified memory-reference instrctions: lw,

More information

EEC 483 Computer Organization

EEC 483 Computer Organization EEC 483 Compter Organization Chapter 4.4 A Simple Implementation Scheme Chans Y The Big Pictre The Five Classic Components of a Compter Processor Control emory Inpt path Otpt path & Control 2 path and

More information

Exceptions and interrupts

Exceptions and interrupts Eceptions and interrpts An eception or interrpt is an nepected event that reqires the CPU to pase or stop the crrent program. Eception handling is the hardware analog of error handling in software. Classes

More information

PART I: Adding Instructions to the Datapath. (2 nd Edition):

PART I: Adding Instructions to the Datapath. (2 nd Edition): EE57 Instrctor: G. Pvvada ===================================================================== Homework #5b De: check on the blackboard =====================================================================

More information

Review: Computer Organization

Review: Computer Organization Review: Compter Organization Pipelining Chans Y Landry Eample Landry Eample Ann, Brian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 3 mintes A B C D Dryer takes 3 mintes

More information

1048: Computer Organization

1048: Computer Organization 48: Compter Organization Lectre 5 Datapath and Control Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A- Introdction In this lectre, we will try to implement simplified IPS which contain emory

More information

1048: Computer Organization

1048: Computer Organization 48: Compter Organization Lectre 5 Datapath and Control Lectre5B - mlticycle implementation (cwli@twins.ee.nct.ed.tw) 5B- Recap: A Single-Cycle Processor PCSrc 4 Add Shift left 2 Add ALU reslt PC address

More information

Comp 303 Computer Architecture A Pipelined Datapath Control. Lecture 13

Comp 303 Computer Architecture A Pipelined Datapath Control. Lecture 13 Comp 33 Compter Architectre A Pipelined path Lectre 3 Pipelined path with Signals PCSrc IF/ ID ID/ EX EX / E E / Add PC 4 Address Instrction emory RegWr ra rb rw Registers bsw [5-] [2-6] [5-] bsa bsb Sign

More information

Pipelining. Chapter 4

Pipelining. Chapter 4 Pipelining Chapter 4 ake processor rns faster Pipelining is an implementation techniqe in which mltiple instrctions are overlapped in eection Key of making processor fast Pipelining Single cycle path we

More information

Lecture 7. Building A Simple Processor

Lecture 7. Building A Simple Processor Lectre 7 Bilding A Simple Processor Christos Kozyrakis Stanford University http://eeclass.stanford.ed/ee8b C. Kozyrakis EE8b Lectre 7 Annoncements Upcoming deadlines Lab is de today Demo by 5pm, report

More information

CS 251, Winter 2019, Assignment % of course mark

CS 251, Winter 2019, Assignment % of course mark CS 25, Winter 29, Assignment.. 3% of corse mark De Wednesday, arch 3th, 5:3P Lates accepted ntil Thrsday arch th, pm with a 5% penalty. (7 points) In the diagram below, the mlticycle compter from the corse

More information

CSE Introduction to Computer Architecture Chapter 5 The Processor: Datapath & Control

CSE Introduction to Computer Architecture Chapter 5 The Processor: Datapath & Control CSE-45432 Introdction to Compter Architectre Chapter 5 The Processor: Datapath & Control Dr. Izadi Data Processor Register # PC Address Registers ALU memory Register # Register # Address Data memory Data

More information

Chapter 6 Enhancing Performance with. Pipelining. Pipelining. Pipelined vs. Single-Cycle Instruction Execution: the Plan. Pipelining: Keep in Mind

Chapter 6 Enhancing Performance with. Pipelining. Pipelining. Pipelined vs. Single-Cycle Instruction Execution: the Plan. Pipelining: Keep in Mind Pipelining hink of sing machines in landry services Chapter 6 nhancing Performance with Pipelining 6 P 7 8 9 A ime ask A B C ot pipelined Assme 3 min. each task wash, dry, fold, store and that separate

More information

What do we have so far? Multi-Cycle Datapath

What do we have so far? Multi-Cycle Datapath What do we have so far? lti-cycle Datapath CPI: R-Type = 4, Load = 5, Store 4, Branch = 3 Only one instrction being processed in datapath How to lower CPI frther? #1 Lec # 8 Spring2 4-11-2 Pipelining pipelining

More information

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction Review Friday the 2st of October Real world eamples of pipelining? How does pipelining pp inflence instrction latency? How does pipelining inflence instrction throghpt? What are the three types of hazard

More information

EEC 483 Computer Organization

EEC 483 Computer Organization EEC 83 Compter Organization Chapter.6 A Pipelined path Chans Y Pipelined Approach 2 - Cycle time, No. stages - Resorce conflict E E A B C D 3 E E 5 E 2 3 5 2 6 7 8 9 c.y9@csohio.ed Resorces sed in 5 Stages

More information

Prof. Kozyrakis. 1. (10 points) Consider the following fragment of Java code:

Prof. Kozyrakis. 1. (10 points) Consider the following fragment of Java code: EE8 Winter 25 Homework #2 Soltions De Thrsday, Feb 2, 5 P. ( points) Consider the following fragment of Java code: for (i=; i

More information

Instruction fetch. MemRead. IRWrite ALUSrcB = 01. ALUOp = 00. PCWrite. PCSource = 00. ALUSrcB = 00. R-type completion

Instruction fetch. MemRead. IRWrite ALUSrcB = 01. ALUOp = 00. PCWrite. PCSource = 00. ALUSrcB = 00. R-type completion . (Chapter 5) Fill in the vales for SrcA, SrcB, IorD, Dst and emto to complete the Finite State achine for the mlti-cycle datapath shown below. emory address comptation 2 SrcA = SrcB = Op = fetch em SrcA

More information

Hardware Design Tips. Outline

Hardware Design Tips. Outline Hardware Design Tips EE 36 University of Hawaii EE 36 Fall 23 University of Hawaii Otline Verilog: some sbleties Simlators Test Benching Implementing the IPS Actally a simplified 6 bit version EE 36 Fall

More information

CS 251, Winter 2018, Assignment % of course mark

CS 251, Winter 2018, Assignment % of course mark CS 25, Winter 28, Assignment 4.. 3% of corse mark De Wednesday, arch 7th, 4:3P Lates accepted ntil Thrsday arch 8th, am with a 5% penalty. (6 points) In the diagram below, the mlticycle compter from the

More information

PS Midterm 2. Pipelining

PS Midterm 2. Pipelining PS idterm 2 Pipelining Seqential Landry 6 P 7 8 9 idnight Time T a s k O r d e r A B C D 3 4 2 3 4 2 3 4 2 3 4 2 Seqential landry takes 6 hors for 4 loads If they learned pipelining, how long wold landry

More information

CS 251, Spring 2018, Assignment 3.0 3% of course mark

CS 251, Spring 2018, Assignment 3.0 3% of course mark CS 25, Spring 28, Assignment 3. 3% of corse mark De onday, Jne 25th, 5:3 P. (5 points) Consider the single-cycle compter shown on page 6 of this assignment. Sppose the circit elements take the following

More information

Quiz #1 EEC 483, Spring 2019

Quiz #1 EEC 483, Spring 2019 Qiz # EEC 483, Spring 29 Date: Jan 22 Name: Eercise #: Translate the following instrction in C into IPS code. Eercise #2: Translate the following instrction in C into IPS code. Hint: operand C is stored

More information

CS 251, Winter 2018, Assignment % of course mark

CS 251, Winter 2018, Assignment % of course mark CS 25, Winter 28, Assignment 3.. 3% of corse mark De onday, Febrary 26th, 4:3 P Lates accepted ntil : A, Febrary 27th with a 5% penalty. IEEE 754 Floating Point ( points): (a) (4 points) Complete the following

More information

Chapter 6: Pipelining

Chapter 6: Pipelining CSE 322 COPUTER ARCHITECTURE II Chapter 6: Pipelining Chapter 6: Pipelining Febrary 10, 2000 1 Clothes Washing CSE 322 COPUTER ARCHITECTURE II The Assembly Line Accmlate dirty clothes in hamper Place in

More information

1048: Computer Organization

1048: Computer Organization 8: Compter Organization Lectre 6 Pipelining Lectre6 - pipelining (cwli@twins.ee.nct.ed.tw) 6- Otline An overview of pipelining A pipelined path Pipelined control Data hazards and forwarding Data hazards

More information

Solutions for Chapter 6 Exercises

Solutions for Chapter 6 Exercises Soltions for Chapter 6 Eercises Soltions for Chapter 6 Eercises 6. 6.2 a. Shortening the ALU operation will not affect the speedp obtained from pipelining. It wold not affect the clock cycle. b. If the

More information

EXAMINATIONS 2010 END OF YEAR NWEN 242 COMPUTER ORGANIZATION

EXAMINATIONS 2010 END OF YEAR NWEN 242 COMPUTER ORGANIZATION EXAINATIONS 2010 END OF YEAR COPUTER ORGANIZATION Time Allowed: 3 Hors (180 mintes) Instrctions: Answer all qestions. ake sre yor answers are clear and to the point. Calclators and paper foreign langage

More information

4.13 Advanced Topic: An Introduction to Digital Design Using a Hardware Design Language 345.e1

4.13 Advanced Topic: An Introduction to Digital Design Using a Hardware Design Language 345.e1 .3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage 35.e.3 Advanced Topic: An Introdction to Digital Design Using a Hardware Design Langage to Describe and odel a Pipeline

More information

Enhanced Performance with Pipelining

Enhanced Performance with Pipelining Chapter 6 Enhanced Performance with Pipelining Note: The slides being presented represent a mi. Some are created by ark Franklin, Washington University in St. Lois, Dept. of CSE. any are taken from the

More information

Lab 8 (All Sections) Prelab: ALU and ALU Control

Lab 8 (All Sections) Prelab: ALU and ALU Control Lab 8 (All Sections) Prelab: and Control Name: Sign the following statement: On my honor, as an Aggie, I have neither given nor received nathorized aid on this academic work Objective In this lab yo will

More information

Computer Architecture

Computer Architecture Compter Architectre Lectre 4: Intro to icroarchitectre: Single- Cycle Dr. Ahmed Sallam Sez Canal University Based on original slides by Prof. Onr tl Review Compter Architectre Today and Basics (Lectres

More information

Computer Architecture

Computer Architecture Compter Architectre Lectre 4: Intro to icroarchitectre: Single- Cycle Dr. Ahmed Sallam Sez Canal University Spring 25 Based on original slides by Prof. Onr tl Review Compter Architectre Today and Basics

More information

Overview of Pipelining

Overview of Pipelining EEC 58 Compter Architectre Pipelining Department of Electrical Engineering and Compter Science Cleveland State University Fndamental Principles Overview of Pipelining Pipelined Design otivation: Increase

More information

Animating the Datapath. Animating the Datapath: R-type Instruction. Animating the Datapath: Load Instruction. MIPS Datapath I: Single-Cycle

Animating the Datapath. Animating the Datapath: R-type Instruction. Animating the Datapath: Load Instruction. MIPS Datapath I: Single-Cycle nimating the atapath PS atapath : Single-Cycle npt is either (-type) or sign-etended lower half of instrction (load/store) op offset/immediate W egister File 6 6 + from instrction path beq,, offset if

More information

Lecture 9: Microcontrolled Multi-Cycle Implementations

Lecture 9: Microcontrolled Multi-Cycle Implementations 8-447 Lectre 9: icroled lti-cycle Implementations James C. Hoe Dept of ECE, CU Febrary 8, 29 S 9 L9- Annoncements: P&H Appendi D Get started t on Lab Handots: Handot #8: Project (on Blackboard) Single-Cycle

More information

Chapter 6: Pipelining

Chapter 6: Pipelining Chapter 6: Pipelining Otline An overview of pipelining A pipelined path Pipelined control Data hazards and forwarding Data hazards and stalls Branch hazards Eceptions Sperscalar and dynamic pipelining

More information

Chapter 3 & Appendix C Pipelining Part A: Basic and Intermediate Concepts

Chapter 3 & Appendix C Pipelining Part A: Basic and Intermediate Concepts CS359: Compter Architectre Chapter 3 & Appendi C Pipelining Part A: Basic and Intermediate Concepts Yanyan Shen Department of Compter Science and Engineering Shanghai Jiao Tong University 1 Otline Introdction

More information

ECE232: Hardware Organization and Design

ECE232: Hardware Organization and Design ECE232: Harware Organization an Design ectre 11: Introction to IPs path apte from Compter Organization an Design, Patterson & Hennessy, CB IPS-lite processor Compter Want to bil a processor for a sbset

More information

Lecture 6: Microprogrammed Multi Cycle Implementation. James C. Hoe Department of ECE Carnegie Mellon University

Lecture 6: Microprogrammed Multi Cycle Implementation. James C. Hoe Department of ECE Carnegie Mellon University 8 447 Lectre 6: icroprogrammed lti Cycle Implementation James C. Hoe Department of ECE Carnegie ellon University 8 447 S8 L06 S, James C. Hoe, CU/ECE/CALC, 208 Yor goal today Hosekeeping nderstand why

More information

Review. How to represent real numbers

Review. How to represent real numbers PCWrite PC IorD Review ALUSrcA emread Address Write data emory emwrite em Data IRWrite [3-26] [25-2] [2-6] [5-] [5-] RegDst Read register Read register 2 Write register Write data RegWrite Read data Read

More information

EXAMINATIONS 2003 END-YEAR COMP 203. Computer Organisation

EXAMINATIONS 2003 END-YEAR COMP 203. Computer Organisation EXAINATIONS 2003 COP203 END-YEAR Compter Organisation Time Allowed: 3 Hors (180 mintes) Instrctions: Answer all qestions. There are 180 possible marks on the eam. Calclators and foreign langage dictionaries

More information

MIPS Architecture. Fibonacci (C) Fibonacci (Assembly) Another Example: MIPS. Example: subset of MIPS processor architecture

MIPS Architecture. Fibonacci (C) Fibonacci (Assembly) Another Example: MIPS. Example: subset of MIPS processor architecture Another Eample: IPS From the Harris/Weste book Based on the IPS-like processor from the Hennessy/Patterson book IPS Architectre Eample: sbset of IPS processor architectre Drawn from Patterson & Hennessy

More information

comp 180 Lecture 25 Outline of Lecture The ALU Control Operation & Design The Datapath Control Operation & Design HKUST 1 Computer Science

comp 180 Lecture 25 Outline of Lecture The ALU Control Operation & Design The Datapath Control Operation & Design HKUST 1 Computer Science Outline of Lecture The Control Operation & Design The Datapath Control Operation & Design HKST 1 Computer Science Control After the design of partial single IPS datapath, we need to add the control unit

More information

CSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W9-W

CSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W9-W CSE 22 Computer Organization Hugh Chesser, CSEB 2U Agenda Topics:. Single Cycle Review (Sample Exam/Quiz Q) 2. ultiple cycle implementation Patterson: Section 4.5 Reminder: Quiz #2 Next Wednesday (November

More information

Pipelined Datapath. One register file is enough

Pipelined Datapath. One register file is enough ipelined path The goal of pipelining is to allow multiple instructions execute at the same time We may need to perform several operations in a cycle Increment the and add s at the same time. Fetch one

More information

CSSE232 Computer Architecture I. Mul5cycle Datapath

CSSE232 Computer Architecture I. Mul5cycle Datapath CSSE232 Compter Architectre I Ml5cycle Datapath Class Stats Next 3 days : Ml5cycle datapath ing Ml5cycle datapath is not in the book! How long do instrc5ons take? ALU 2ns Mem 2ns Reg File 1ns Everything

More information

4.13. An Introduction to Digital Design Using a Hardware Design Language to Describe and Model a Pipeline and More Pipelining Illustrations

4.13. An Introduction to Digital Design Using a Hardware Design Language to Describe and Model a Pipeline and More Pipelining Illustrations .3 An Introdction to Digital Design Using a Hardware Design Langage to Describe and odel a Pipeline and ore Pipelining Illstrations This online section covers hardware description langages and then gives

More information

EEC 483 Computer Organization. Branch (Control) Hazards

EEC 483 Computer Organization. Branch (Control) Hazards EEC 483 Compter Organization Section 4.8 Branch Hazards Section 4.9 Exceptions Chans Y Branch (Control) Hazards While execting a previos branch, next instrction address might not yet be known. s n i o

More information

Processor (multi-cycle)

Processor (multi-cycle) CS359: Computer Architecture Processor (multi-cycle) Yanyan Shen Department of Computer Science and Engineering Five Instruction Steps ) Instruction Fetch ) Instruction Decode and Register Fetch 3) R-type

More information

Design of the MIPS Processor

Design of the MIPS Processor Design of the MIPS Processor We will study the design of a simple version of MIPS that can support the following instructions: I-type instructions LW, SW R-type instructions, like ADD, SUB Conditional

More information

Winter 2013 MIDTERM TEST #2 Wednesday, March 20 7:00pm to 8:15pm. Please do not write your U of C ID number on this cover page.

Winter 2013 MIDTERM TEST #2 Wednesday, March 20 7:00pm to 8:15pm. Please do not write your U of C ID number on this cover page. page of 7 University of Calgary Departent of Electrical and Copter Engineering ENCM 369: Copter Organization Lectre Instrctors: Steve Noran and Nor Bartley Winter 23 MIDTERM TEST #2 Wednesday, March 2

More information

CO Computer Architecture and Programming Languages CAPL. Lecture 18 & 19

CO Computer Architecture and Programming Languages CAPL. Lecture 18 & 19 CO2-3224 Computer Architecture and Programming Languages CAPL Lecture 8 & 9 Dr. Kinga Lipskoch Fall 27 Single Cycle Disadvantages & Advantages Uses the clock cycle inefficiently the clock cycle must be

More information

Computer Architecture. Lecture 6: Pipelining

Computer Architecture. Lecture 6: Pipelining Compter Architectre Lectre 6: Pipelining Dr. Ahmed Sallam Based on original slides by Prof. Onr tl Agenda for Today & Net Few Lectres Single-cycle icroarchitectres lti-cycle and icroprogrammed icroarchitectres

More information

Processor Design CSCE Instructor: Saraju P. Mohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed

Processor Design CSCE Instructor: Saraju P. Mohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed Lecture 3: General Purpose Processor Design CSCE 665 Advanced VLSI Systems Instructor: Saraju P. ohanty, Ph. D. NOTE: The figures, tet etc included in slides are borrowed from various books, websites,

More information

Multiple Cycle Data Path

Multiple Cycle Data Path Multiple Cycle Data Path CS 365 Lecture 7 Prof. Yih Huang CS365 1 Multicycle Approach Break up the instructions into steps, each step takes a cycle balance the amount of work to be done restrict each cycle

More information

ECE473 Computer Architecture and Organization. Processor: Combined Datapath

ECE473 Computer Architecture and Organization. Processor: Combined Datapath Computer Architecture and Organization Processor: Combined path Lecturer: Prof. Yifeng Zhu Fall, 2014 Portions of these slides are derived from: Dave Patterson CB 1 Where are we? Want to build a processor

More information

MIPS Architecture. An Example: MIPS. From the Harris/Weste book Based on the MIPS-like processor from the Hennessy/Patterson book

MIPS Architecture. An Example: MIPS. From the Harris/Weste book Based on the MIPS-like processor from the Hennessy/Patterson book An Eample: IPS From the Harris/Weste book Based on the IPS-like processor from the Hennessy/Patterson book IPS Architectre w Eample: sbset of IPS processor architectre n Drawn from Patterson & Hennessy

More information

Design of the MIPS Processor (contd)

Design of the MIPS Processor (contd) Design of the MIPS Processor (contd) First, revisit the datapath for add, sub, lw, sw. We will augment it to accommodate the beq and j instructions. Execution of branch instructions beq $at, $zero, L add

More information

Lecture 5: The Processor

Lecture 5: The Processor Lecture 5: The Processor CSCE 26 Computer Organization Instructor: Saraju P. ohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed from various books, websites, authors pages, and

More information

Multi-cycle Approach. Single cycle CPU. Multi-cycle CPU. Requires state elements to hold intermediate values. one clock cycle or instruction

Multi-cycle Approach. Single cycle CPU. Multi-cycle CPU. Requires state elements to hold intermediate values. one clock cycle or instruction Multi-cycle Approach Single cycle CPU State element Combinational logic State element clock one clock cycle or instruction Multi-cycle CPU Requires state elements to hold intermediate values State Element

More information

Computer Science 141 Computing Hardware

Computer Science 141 Computing Hardware Computer Science 4 Computing Hardware Fall 6 Harvard University Instructor: Prof. David Brooks dbrooks@eecs.harvard.edu Upcoming topics Mon, Nov th MIPS Basic Architecture (Part ) Wed, Nov th Basic Computer

More information

Computer and Information Sciences College / Computer Science Department The Processor: Datapath and Control

Computer and Information Sciences College / Computer Science Department The Processor: Datapath and Control Computer and Information Sciences College / Computer Science Department The Processor: Datapath and Control Chapter 5 The Processor: Datapath and Control Big Picture: Where are We Now? Performance of a

More information

CSE 141 Computer Architecture Summer Session I, Lectures 10 Advanced Topics, Memory Hierarchy and Cache. Pramod V. Argade

CSE 141 Computer Architecture Summer Session I, Lectures 10 Advanced Topics, Memory Hierarchy and Cache. Pramod V. Argade CSE 141 Compter Architectre Smmer Session I, 2004 Lectres 10 Advanced Topics, emory Hierarchy and Cache Pramod V. Argade CSE141: Introdction to Compter Architectre Instrctor: TA: Pramod V. Argade (p2argade@cs.csd.ed)

More information

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control EE 37 Unit Single-Cycle CPU path and Control CPU Organization Scope We will build a CPU to implement our subset of the MIPS ISA Memory Reference Instructions: Load Word (LW) Store Word (SW) Arithmetic

More information

Lecture 13: Exceptions and Interrupts

Lecture 13: Exceptions and Interrupts 18 447 Lectre 13: Eceptions and Interrpts S 10 L13 1 James C. Hoe Dept of ECE, CU arch 1, 2010 Annoncements: Handots: Spring break is almost here Check grades on Blackboard idterm 1 graded Handot #9: Lab

More information

ECE 313 Computer Organization EXAM 2 November 9, 2001

ECE 313 Computer Organization EXAM 2 November 9, 2001 ECE 33 Computer Organization EA 2 November 9, 2 This exam is open book and open notes. You have 5 minutes. Credit for problems requiring calculation will be given only if you show your work. Choose and

More information

Computer Architecture Lecture 6: Multi-cycle Microarchitectures. Prof. Onur Mutlu Carnegie Mellon University Spring 2012, 2/6/2012

Computer Architecture Lecture 6: Multi-cycle Microarchitectures. Prof. Onur Mutlu Carnegie Mellon University Spring 2012, 2/6/2012 8-447 Compter Architectre Lectre 6: lti-cycle icroarchitectres Prof. Onr tl Carnegie ellon University Spring 22, 2/6/22 Reminder: Homeworks Homework soltions Check and stdy the soltions! Learning now is

More information

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization CS/COE0447: Computer Organization and Assembly Language Datapath and Control Sangyeun Cho Dept. of Computer Science A simple MIPS We will design a simple MIPS processor that supports a small instruction

More information

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization A simple MIPS CS/COE447: Computer Organization and Assembly Language Datapath and Control Sangyeun Cho Dept. of Computer Science We will design a simple MIPS processor that supports a small instruction

More information

POWER-OF-2 BOUNDARIES

POWER-OF-2 BOUNDARIES Warren.3.fm Page 5 Monday, Jne 17, 5:6 PM CHAPTER 3 POWER-OF- BOUNDARIES 3 1 Ronding Up/Down to a Mltiple of a Known Power of Ronding an nsigned integer down to, for eample, the net smaller mltiple of

More information

Multicycle conclusion

Multicycle conclusion Multicycle conclusion The last few lectures covered a lot of material! We introduced a multicycle datapath, where different instructions take different numbers of cycles to execute. A multicycle unit is

More information

CPE 335 Computer Organization. Basic MIPS Architecture Part I

CPE 335 Computer Organization. Basic MIPS Architecture Part I CPE 335 Computer Organization Basic MIPS Architecture Part I Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides http://www.abandah.com/gheith/courses/cpe335_s8/index.html CPE232 Basic MIPS Architecture

More information

RISC Design: Multi-Cycle Implementation

RISC Design: Multi-Cycle Implementation RISC Design: Multi-Cycle Implementation Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab Department of Electrical Engineering Indian Institute of Technology Bombay http://www.ee.iitb.ac.in/~viren/

More information

Instruction Pipelining is the use of pipelining to allow more than one instruction to be in some stage of execution at the same time.

Instruction Pipelining is the use of pipelining to allow more than one instruction to be in some stage of execution at the same time. Pipelining Pipelining is the se of pipelining to allow more than one instrction to be in some stage of eection at the same time. Ferranti ATLAS (963): Pipelining redced the average time per instrction

More information

CENG 3420 Lecture 06: Datapath

CENG 3420 Lecture 06: Datapath CENG 342 Lecture 6: Datapath Bei Yu byu@cse.cuhk.edu.hk CENG342 L6. Spring 27 The Processor: Datapath & Control q We're ready to look at an implementation of the MIPS q Simplified to contain only: memory-reference

More information

CENG 3420 Computer Organization and Design. Lecture 06: MIPS Processor - I. Bei Yu

CENG 3420 Computer Organization and Design. Lecture 06: MIPS Processor - I. Bei Yu CENG 342 Computer Organization and Design Lecture 6: MIPS Processor - I Bei Yu CEG342 L6. Spring 26 The Processor: Datapath & Control q We're ready to look at an implementation of the MIPS q Simplified

More information

CPE 335. Basic MIPS Architecture Part II

CPE 335. Basic MIPS Architecture Part II CPE 335 Computer Organization Basic MIPS Architecture Part II Dr. Iyad Jafar Adapted from Dr. Gheith Abandah slides http://www.abandah.com/gheith/courses/cpe335_s08/index.html CPE232 Basic MIPS Architecture

More information

Topic #6. Processor Design

Topic #6. Processor Design Topic #6 Processor Design Major Goals! To present the single-cycle implementation and to develop the student's understanding of combinational and clocked sequential circuits and the relationship between

More information

Lecture 10: Pipelined Implementations

Lecture 10: Pipelined Implementations U 8-7 S 9 L- 8-7 Lectre : Pipelined Implementations James. Hoe ept of EE, U Febrary 23, 29 nnoncements: Project is de this week idterm graded, d reslts posted Handots: H9 Homework 3 (on lackboard) Graded

More information

Basics of Digital Logic Design

Basics of Digital Logic Design ignals, Logic Operations and Gates E 675.2: Introdction to ompter rchitectre asics of igital Logic esign Rather than referring to voltage levels of signals, we shall consider signals that are logically

More information

Single-Cycle Examples, Multi-Cycle Introduction

Single-Cycle Examples, Multi-Cycle Introduction Single-Cycle Examples, ulti-cycle Introduction 1 Today s enu Single cycle examples Single cycle machines vs. multi-cycle machines Why multi-cycle? Comparative performance Physical and Logical Design of

More information

Decoders. 3-Input Full Decoder

Decoders. 3-Input Full Decoder ecoders A fll decoder with n inpts has 2 n otpts. Let inpts be labeled In, In, In 2,..., In n, and let otpts be labeled Ot, Ot,..., Ot 2 n. A fll decoder fnctions as follows: Only one of otpts has vale

More information

Multiple-Choice Test Chapter Golden Section Search Method Optimization COMPLETE SOLUTION SET

Multiple-Choice Test Chapter Golden Section Search Method Optimization COMPLETE SOLUTION SET Mltiple-Choice Test Chapter 09.0 Golden Section Search Method Optimization COMPLETE SOLUTION SET. Which o the ollowing statements is incorrect regarding the Eqal Interval Search and Golden Section Search

More information

Lecture 5 and 6. ICS 152 Computer Systems Architecture. Prof. Juan Luis Aragón

Lecture 5 and 6. ICS 152 Computer Systems Architecture. Prof. Juan Luis Aragón ICS 152 Computer Systems Architecture Prof. Juan Luis Aragón Lecture 5 and 6 Multicycle Implementation Introduction to Microprogramming Readings: Sections 5.4 and 5.5 1 Review of Last Lecture We have seen

More information

The Processor. Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut. CSE3666: Introduction to Computer Architecture

The Processor. Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut. CSE3666: Introduction to Computer Architecture The Processor Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut CSE3666: Introduction to Computer Architecture Introduction CPU performance factors Instruction count

More information

Designing a Pipelined CPU

Designing a Pipelined CPU Designing a Pipelined CPU CSE 4, S2'6 Review -- Single Cycle CPU CSE 4, S2'6 Review -- ultiple Cycle CPU CSE 4, S2'6 Review -- Instruction Latencies Single-Cycle CPU Load Ifetch /Dec Exec em Wr ultiple

More information

Chapter Six. Dataı access. Reg. Instructionı. fetch. Dataı. Reg. access. Dataı. Reg. access. Dataı. Instructionı fetch. 2 ns 2 ns 2 ns 2 ns 2 ns

Chapter Six. Dataı access. Reg. Instructionı. fetch. Dataı. Reg. access. Dataı. Reg. access. Dataı. Instructionı fetch. 2 ns 2 ns 2 ns 2 ns 2 ns Chapter Si Pipelining Improve perfomance by increasing instruction throughput eecutionı Time lw $, ($) 2 6 8 2 6 8 access lw $2, 2($) 8 ns access lw $3, 3($) eecutionı Time lw $, ($) lw $2, 2($) 2 ns 8

More information

PIPELINING. Pipelining: Natural Phenomenon. Pipelining. Pipelining Lessons

PIPELINING. Pipelining: Natural Phenomenon. Pipelining. Pipelining Lessons Pipelining: Natral Phenomenon Landry Eample: nn, rian, Cathy, Dave each have one load of clothes to wash, dry, and fold Washer takes 30 mintes C D Dryer takes 0 mintes PIPELINING Folder takes 20 mintes

More information

Processor: Multi- Cycle Datapath & Control

Processor: Multi- Cycle Datapath & Control Processor: Multi- Cycle Datapath & Control (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann, 27) COURSE

More information

CC 311- Computer Architecture. The Processor - Control

CC 311- Computer Architecture. The Processor - Control CC 311- Computer Architecture The Processor - Control Control Unit Functions: Instruction code Control Unit Control Signals Select operations to be performed (ALU, read/write, etc.) Control data flow (multiplexor

More information

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control ELEC 52/62 Computer Architecture and Design Spring 217 Lecture 4: Datapath and Control Ujjwal Guin, Assistant Professor Department of Electrical and Computer Engineering Auburn University, Auburn, AL 36849

More information

Review: Abstract Implementation View

Review: Abstract Implementation View Review: Abstract Implementation View Split memory (Harvard) model - single cycle operation Simplified to contain only the instructions: memory-reference instructions: lw, sw arithmetic-logical instructions:

More information

ECE 313 Computer Organization Name SOLUTION EXAM 2 November 3, Floating Point 20 Points

ECE 313 Computer Organization Name SOLUTION EXAM 2 November 3, Floating Point 20 Points ECE Computer Organization Name SOLTION EA November, This exam is open book and open notes. Credit for problems requiring calculation will be given only if you show your work.. Floating Point Points Translate

More information

COMP303 - Computer Architecture Lecture 10. Multi-Cycle Design & Exceptions

COMP303 - Computer Architecture Lecture 10. Multi-Cycle Design & Exceptions COP33 - Computer Architecture Lecture ulti-cycle Design & Exceptions Single Cycle Datapath We designed a processor that requires one cycle per instruction RegDst busw 32 Clk RegWr Rd ux imm6 Rt 5 5 Rs

More information