1048: Computer Organization

Size: px
Start display at page:

Download "1048: Computer Organization"

Transcription

1 48: Compter Organization Lectre 5 Datapath and Control Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-

2 Introdction In this lectre, we will try to implement simplified IPS which contain emory reference instrctions: lw, sw Control flow instrctions: beg, j Arithmetic-logical instrctions: add, sb, and, or, slt Design principles ake the common case fast Simplicity favors reglarity Two types of circits/fnction nits Combinational: elements that operate on vales Seqential: elements that contain state Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-2

3 Otline Part A: Designing a Single-Cycle Processor Part B: Designing a lticycle Processor Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-3

4 Part A Otline Designing a processor Bilding the path A single-cycle implementation Control for the single-cycle CPU Control of CPU operations controller ain controller Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-4

5 How to Design a Processor?. Analyze instrction set (path reqirements) The meaning of each instrction is given by the register transfers Datapath mst inclde storage element Datapath mst spport each register transfer 2. Select set of path components and establish clocking methodology 3. Assemble path meeting the reqirements 4. Analyze implementation of each instrction to determine setting of control points effecting register transfer 5. Assemble the control logic Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-5

6 Step : Analyze Instrction Set All IPS instrctions are bits long with 3 formats: R-type: op rs rt rd shamt fnct I-type: 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits op rs rt immediate 6 bits 5 bits 5 bits 6 bits J-type: 3 26 op target address 6 bits 26 bits The different fields are: op: operation of the instrction rs, rt, rd: sorce and destination register shamt: shift amont fnct: selects variant of the op field address / immediate target address: target address of jmp 5A-6

7 Or Eample: A IPS Sbset R-Type: add rd, rs, rt sb rd, rs, rt and rd, rs, rt or rd, rs, rt slt rd, rs, rt Load/Store: lw rt,rs,imm6 sw rt,rs,imm6 Imm operand: 3 3 addi rt,rs,imm6 Branch: beq rs,rt,imm6 Jmp: j target op rs rt rd shamt fnct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits 26 2 op rs rt immediate 6 bits 5 bits 5 bits 6 bits 26 2 Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A op address 6 bits 26 bits 6

8 Logical Register Transfers RTL gives the meaning of the instrctions All start by fetching the instrction, read registers, then se => simplicity and reglarity help E[ PC ] = op rs rt rd shamt fnct or = op rs rt Imm6 or = op Imm26 (added at the end) Inst Register transfers ADD R[rd] <- R[rs] + R[rt]; PC <- PC + 4 SUB R[rd] <- R[rs] - R[rt]; PC <- PC + 4 LOAD R[rt] <- E[ R[rs] + sign_et(imm6)]; PC <- PC + 4 STORE E[ R[rs] + sign_et(imm6) ] <-R[rt]; PC <- PC + 4 ADDI R[rt] <- R[rs] + sign_et(imm6)]; PC <- PC + 4 BEQ if (R[rs] == R[rt]) then PC <- PC sign_et(imm6)] else PC <- PC + 4 Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-8

9 Reqirements of Instrction Set After checking the register transfers, we can see that path needs the followings: emory store instrctions and Registers ( ) read RS read RT RT or RD PC Etender for zero- or sign-etension Add and sb register or etended immediate () Add 4 or etended immediate to PC Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-9

10 Otline Designing a processor Bilding the path A single-cycle implementation Control for the single-cycle CPU Control of CPU operations controller ain controller Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-

11 Step 2a: Datapath Components Basic bilding blocks of combinational logic elements : A B Adder Adder CarryIn A B Sm Carry control 4 Select A Y B Reslt UX UX 5A-

12 Conclding Remarks ake sre yo nderstand the abstractions!! Sometimes it is easy to think yo do, when yo don t Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-2

13 Step 2b: Datapath Components Storage elements: Register: Similar to the D Flip Flop, ecept N-bit inpt and otpt Enable inpt negated (): Data Ot will not change asserted (): Data Ot will become Data In Enable Data In N Data Ot N Clk 5A-3

14 Storage Element: Register File Consists of registers: Appendi B.8 Two -bit otpt bsses: bsa and bsb One -bit inpt bs: bsw Register is selected by: RA selects the register to pt on bsa () RB selects the register to pt on bsb () RW selects the register to be written via bsw () when Enable is Clock inpt (CLK) The CLK inpt is a factor ONLY dring write operation Dring read, behaves as a combinational circit Enable bsw Clk RW RA RB bit Registers bsa bsb Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-4

15 Storage Element: emory emory (idealized) Appendi B.8 One inpt bs: Data In One otpt bs: Data Ot Word is selected by: Address selects the word to pt on Data Ot Enable Address Data In DataOt Clk Enable = : address selects the memory word to be written via the Data In bs Clock inpt (CLK) The CLK inpt is a factor ONLY dring write operation Dring read operation, behaves as a combinational logic block: Address valid => Data Ot valid after access time No need for read control Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-5

16 Step 3a: Datapath Assembly Instrction fetch nit: common operations Fetch the instrction: mem[pc] Update the program conter: Seqential code: PC <- PC + 4 Branch and Jmp: PC <- Something else Add 4 PC address Instrction memory Instrction Fig A-6

17 Step 3b: Add and Sbtract R[rd] <- R[rs] op R[rt] 3 Two read ports and one write port op rs rt rd shamt fnct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits rs rt rd E: add rd, rs, rt Ra, Rb, Rw come from inst. s rs, rt, and rd fields and Reg: control logic after decode Instrction register register 2 Registers register 2 Reg 4 6 Zero reslt operation(fnct) Fig A-7

18 Step 3c: Store/Load Operations R[rt]<-em[R[rs]+SignEt[imm6]] E: lw rt,rs,imm op rs rt immediate 6 bits 5 bits 5 bits rd 6 bits 6 Instrction rs rt rt register register 2 Registers register Reg 2 43 operation Zero reslt Address em Data memory 6 Sign etend em Fig A-8

19 Datapath for emory and R-type (b+c), also for addi Instrction register register 2 Registers register Reg 2 Src 4 operation Zero reslt Address em Data memory emtoreg 6 Sign etend em Fig. 5. Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-9

20 Step 3d: Branch Operations beq rs, rt, imm6 mem[pc] Fetch inst. from memory Eqal <- R[rs] == R[rt] Calclate branch condition if (COND == ) Calclate net inst. address PC <- PC ( SignEt(imm6) 4 ) else PC <- PC op rs rt immediate 6 bits 5 bits 5 bits 6 bits Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-2

21 Datapath for Branch Operations beq rs, rt, imm6 PC + 4 from instrction path Only roting Shift left 2 Add Sm Branch target Instrction register register 2 Registers register Reg operation Zero To branch control logic 6 Sign etend Fig A-2

22 Otline Designing a processor Bilding the path A single-cycle implementation Control for the single-cycle CPU Control of CPU operations controller ain controller Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-22

23 A Single Cycle Datapath PCSrc 4 Add Reg Shift left 2 Add reslt PC address Instrction [3 ] Instrction memory Instrction [25 2] Instrction [2 6] Instrction [5 ] RegDst Instrction [5 ] register register 2 register 2 Registers 6 Sign etend Src control Zero reslt em Address Data memory em emtoreg Fig. 5.5 Instrction [5 ] Op Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-23

24 Data Flow dring addfig. 5. PCSrc 4 Add Shift left 2 Add reslt.. PC address Clocking Instrction Instrction memory register register 2 register Registers 2 Reg 6 Sign etend Src 4 3 operation Zero reslt Address em em Data memory emtoreg Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-24

25 Clocking ethodology Define when signals are read and written Assme edge-triggered (synchronos design): Vales in storage (state) elements pdated only on a clock edge => clock edge shold arrive only after inpt signals stable Any combinational circit mst have inpts from and otpts to storage elements Clock cycle: time for signals to propagate from one storage element, throgh combinational circit, to reach the second storage element A register can be read, its vale propagated throgh some combinational circit, new vale is written back to the same register, all in same cycle => no feedback within a single cycle Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-25

26 Register-Register Timing Clk PC Rs, Rt, Rd, Op, Fnc ctr Old Vale Clk-to-Q New Vale Old Vale Old Vale Instrction emory Access Time New Vale Delay throgh Control Logic New Vale RegWr Old Vale New Vale bsa, B bsw Old Vale Old Vale Register File Access Time New Vale Delay New Vale Clk PC Ideal Instrction emory RegWr bsw Clk Rd Rs Rt Rw Ra Rb -bit Registers bsa bsb ctr Register Occrs Here Reslt

27 The Critical Path Register file and ideal memory: Dring read, behave as combinational logic: Address valid => Otpt valid after access time Net Address Instrction Address Clk Ideal Instrction emory PC Rd 5 Clk Instrction Rs 5 Rt 5 Rw Ra Rb -bit Registers Imm 6 A B Critical Path (Load Operation) = PC s Clk-to-Q + Instrction memory s Access Time + Register file s Access Time + to Perform a -bit Add + Data emory Access Time + Setp Time for Register File + Clock Skew Data Address Data In Clk Ideal Data emory

28 Clk PC Rs, Rt, Rd, Op, Fnc ctr Old Vale Worst Case Timing (Load) Clk-to-Q New Vale Instrction emoey Access Time Old Vale New Vale Delay throgh Control Logic Old Vale New Vale EtOp Old Vale New Vale Src Old Vale New Vale emtoreg Old Vale New Vale RegWr Old Vale New Vale bsa bsb Old Vale Delay throgh Etender & Old Vale Register Occrs Register File Access Time New Vale New Vale Delay Address Old Vale New Vale Data emory Access Time bsw Old Vale New

29 Otline Designing a processor Bilding the path A single-cycle implementation Control for the single-cycle CPU Control of CPU operations controller ain controller Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-29

30 Control To select the operations to perform, read/write, etc To control the flow of ltipleor inpts Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-3

31 Step 4: Control Points and Signals Inst. emory Addr Instrction<3:> <2:25> Op Fnct Rt <:5> <:5> <6:2> <2:25> Rs Rd Imm6 Control PCsrc RegDst RegWr Src emwr emrd ctr emtoreg Eqal Datapath Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-3

32 Designing ain Control Some observations: opcode (Op[5-]) is always in bits 3-26 two registers to be read are always in rs (bits 25-2) and rt (bits 2-6) (for R-type, beq, sw) base register for lw and sw is always in rs (25-2) 6-bit offset for beq, lw, sw is always in 5- destination register is in one of two positions: lw: in bits 2-6 (rt) R-type: in bits 5- (rd) => need a mltiple to select the address for written register Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-

33 Datapath with and Control PCSrc 4 Add Reg Shift left 2 Add reslt PC address Instrction [3 ] Instrction memory Instrction [25 2] Instrction [2 6] Instrction [5 ] RegDst Instrction [5 ] register register 2 register 2 Registers 6 Sign etend Src control Zero reslt em Address Data memory em emtoreg Control point Instrction [5 ] Op Fig. 5.5 Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-33

34 Datapath with Control Unit 4 Add Instrction [3 26] Control RegDst Branch em emtoreg Op em Src Reg Shift left 2 Add reslt PCSrc PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers 2 register Zero reslt Address Data memory Fig. 5.7 Instrction [5 ] Instrction [5 ] 6 Sign etend control Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-34

35 Operation of Datapath: add op rs rt rd shamt fnct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits add rd, rs, rt mem[pc]. Fetch the instrction PC+4 from memory R[rs], R[rt] R[rs] + R[rt] R[rd] <- PC <- PC+4 2. Instrction decode and read operands 3. Eecte the actal operation 4. back to target register Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-35

36 Instrction Fetch at Start of add. instrction <- mem[pc]; PC + 4 Fig Add Instrction [3 26] Control RegDst Branch em emtoreg Op em Src Reg Shift left 2 Add reslt PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers 2 register Zero reslt Address Data memory Instrction [5 ] 6 Sign etend control Instrction [5 ]

37 Instrction Decode of add 2. Fetch the two operands and decode instrction: Fig Add Instrction [3 26] Control RegDst Branch em emtoreg Op em Src Reg Shift left 2 Add reslt PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers 2 register Zero reslt Address Data memory Instrction [5 ] 6 Sign etend control Instrction [5 ]

38 Operation dring add 3. R[rs] + R[rt] Fig Add Instrction [3 26] Control RegDst Branch em emtoreg Op em Src Reg Shift left 2 Add reslt PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers 2 register Zero reslt Address Data memory Instrction [5 ] 6 Sign etend control Instrction [5 ]

39 Back at the End of add 4. R[rd] <- ; PC <- PC + 4 Fig Add Instrction [3 26] Control RegDst Branch em emtoreg Op em Src Reg Shift left 2 Add reslt PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers 2 register Zero reslt Address Data memory Instrction [5 ] 6 Sign etend control Instrction [5 ]

40 Datapath Operation for lw R[rt] <- emory {R[rs] + SignEt[imm6]} Fig Add Instrction [3 26] Control RegDst Branch em emtoreg Op em Src Reg Shift left 2 Add reslt PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers 2 register Zero reslt Address Data memory Instrction [5 ] 6 Sign etend control Instrction [5 ]

41 Datapath Operation for beq if (R[rs]-R[rt]==) then Zero<- else Zero<- Fig. 5.2 if (Zero==) then PC=PC+4+signEt[imm6]*4; else PC = PC Add Instrction [3 26] Control RegDst Branch em emtoreg Op em Src Reg Shift left 2 Add reslt PC address Instrction memory Instrction [3 ] Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers 2 register Zero reslt Address Data memory Instrction [5 ] 6 Sign etend control Instrction [5 ]

42 Conclding Remarks (/2) Control Signals (Fig. 5.6) inst Register Transfer ADD R[rd] <- R[rs] + R[rt]; PC <- PC + 4 src = RegB, ctr = add, RegDst = rd, RegWr, PCsrc = +4 SUB R[rd] <- R[rs] - R[rt]; PC <- PC + 4 src = RegB, ctr = sb, RegDst = rd, RegWr, PCsrc = +4 LOAD R[rt] <- E[ R[rs] + sign_et(imm6)]; PC <- PC + 4 src = Im, ctr = add, emtoreg, RegDst = rt, RegWr, PCsrc= +4 STORE E[ R[rs] + sign_et(imm6)] <- R[rs];PC <- PC + 4 src = Im, ctr = add, emwr, PCsrc = +4 BEQ if (R[rs]==R[rt]) then PC<-PC+sign_et(Imm6)] else PC<-PC+4 PCsrc = Branch address, ctr = sb Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-42

43 Conclding Remarks (2/2) RegDst: =>rt; =>rd Reg: =>write dest. reg. src: =>regb; =>immed PCsrc: =>PC<-PC+4; =>PC<-branch addr. em: =>read memory em: =>write memory emtoreg: =>write reg. from ; =>write reg. from memory PC 4 address Instrction memory Add Instrction [3 ] Instrction [3 26] Instrction [25 2] Instrction [2 6] Instrction [5 ] Instrction [5 ] RegDst Branch em emtoreg Control Op em Src Reg register register 2 Registers 2 register Instrction [5 ] 6 Sign etend Shift left 2 control Add reslt Zero reslt Address PCSrc Data memory Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-43

44 Otline Designing a processor Bilding the path A single-cycle implementation Control for the single-cycle CPU Control of CPU operations controller ain controller Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-44

45 Or Plan for the Controller Op code 6 ain Control 7 fnc 6 op 2 Control (Local) ctr 3 R-type op rs rt rd shamt fnct 6 op is 2-bit wide to represent: I-type reqiring the to perform: () add for load/store and () sb for beq R-type (), need to reference fnc field R-type lw sw beq jmp op (Symbolic) R-type Add Add Sbtract op<:> Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-45

46 Step 5a: Implement Control Recall: design in Chapter 3 and fnc lw sw beq R R R R R ctr Operation AND OR add sb set-on-less-than fnct<5:> Instrction Operation add sbtract and or set-on-less-than op fnc ctr bit<> bit<> bit<5> bit<4> bit<3> bit<2>bit<> bit<> Operation bit<3> bit<2> bit<> bit<> Add Add Sbtract Add Sbtract And Or Set on < Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-46

47 Logic Eqation for ctr op fnc ctr bit<> bit<> bit<5>bit<4> bit<3> bit<2>bit<>bit<> bit<3> bit<2>bit<> bit<> Fig. 5.3 Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-47

48 Logic Eqation for ctr2 op fnc bit<> bit<> bit<5> bit<4> bit<3> bit<2> bit<> bit<> ctr<2> Fig. 5.3 This makes fnc<3> a don t care ctr2 = op + op fnc2 fnc fnc Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-48

49 Logic Eqation for ctr op fnc bit<> bit<> bit<5> bit<4> bit<3> bit<2> bit<> bit<> ctr<> Fig. 5.3 don t care ctr = op + op fnc2 fnc Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-49

50 Logic Eqation for ctr op fnc bit<> bit<> bit<5> bit<4> bit<3> bit<2> bit<> bit<> ctr<> Fig. 5.3 ctr = op fnc3 fnc2 fnc fnc + op fnc3 fnc2 fnc fnc See Fig. 5.3 for complete trth table Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-5

51 The Resltant Control Block Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-5

52 Otline Designing a processor Bilding the path A single-cycle implementation Control for the single-cycle CPU Control of CPU operations controller ain controller Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-52

53 Step 5b: Implement ain Control Logic eqation for each control signal: Branch: if (OP == BEQ) then else src : if (OP == (R-type)) then regb else immed op: if (OP == (R-type)) then fnct elseif (OP == BEQ) then sb else add emwr: (OP == SW) emtoreg: (OP == LW) RegWr: if ((OP == SW) (OP == BEQ)) then else RegDst: if (OP == LW) then else Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-53

54 Trth Table of Control Signals See fnc We Don t Care :-) Appendi A op add sb lw sw beq RegDst Src emtoreg Reg em em Branch op Op code 6 op ain Control RegDst Src : op 2 fnc 6 Control (Local) Fig ctr 4

55 Trth Table for Reg Op code R-type lw sw beq Reg Reg = R-type + lw = op5 op4 op3 op2 op op (R-type) + op5 op4 op3 op2 op op (lw) op<5>.. op<5>.. op<5>.. op<5>.. op<5>.. <> <> <> <> op<> R-type lw sw beq jmp Reg Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-55

56 PLA Implementing ain Control Inpts Op5 Op4 Op3 Op2 Op Op R-format Iw sw beq Otpts RegDst Src emtoreg Reg em em Branch Op Fig. C.2.5 OpO 5A-56

57 Ptting it Altogether (+ jmp instrction) Fig Instrction [25 ] Shift Jmp address [3 ] left Add PC+4 [3 28] Instrction [3 26] Control RegDst Jmp Branch em emtoreg Op em Src Reg Shift left 2 Add reslt PC address Instrction [3 ] Instrction memory Instrction [25 2] Instrction [2 6] Instrction [5 ] register register 2 Registers 2 register Zero reslt Address Data memory Instrction [5 ] 6 Sign etend control Instrction [5 ] Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-57

58 Clk PC Rs, Rt, Rd, Op, Fnc ctr Old Vale Worst Case Timing (Load) Clk-to-Q New Vale Instrction emoey Access Time Old Vale New Vale Delay throgh Control Logic Old Vale New Vale EtOp Old Vale New Vale Src Old Vale New Vale emtoreg Old Vale New Vale RegWr Old Vale New Vale bsa bsb Old Vale Delay throgh Etender & Old Vale Register Occrs Register File Access Time New Vale New Vale Delay Address Old Vale New Vale Data emory Access Time bsw Old Vale New

59 Drawback of Single-Cycle Design Long cycle time: Cycle time mst be long enogh for the load instrction: PC s Clock -to-q + Instrction emory Access Time + Register File Access Time + Delay (address calclation) + Data emory Access Time + Register File Setp Time + Clock Skew Fied clock cycle time Cycle time for load is mch longer than needed for all other instrctions (Significant penalty, Worst case design!!) Variable clock cycle time? Hard to implement Asynchronos design style? Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-59

60 Smmary Single cycle path => CPI=, Clock cycle time long 5 steps to design a processor:. Analyze ISA => path reqirements 2. Select set of path components 3. Assemble path meeting the reqirements 4. Analyze implementation of each instrction to determine setting of control points 5. Assemble the control logic IPS makes control easier Instrctions same size Sorce registers always in same place Immediates same size, location Operations always on registers/immediates Lectre5A - simple implementation (cwli@twins.ee.nct.ed.tw) 5A-6

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

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

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

EEM 486: Computer Architecture. Lecture 3. Designing Single Cycle Control

EEM 486: Computer Architecture. Lecture 3. Designing Single Cycle Control EEM 48: Computer Architecture Lecture 3 Designing Single Cycle The Big Picture: Where are We Now? Processor Input path Output Lec 3.2 An Abstract View of the Implementation Ideal Address Net Address PC

More information

The extra single-cycle adders

The extra single-cycle adders 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

More information

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

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

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

ECE170 Computer Architecture. Single Cycle Control. Review: 3b: Add & Subtract. Review: 3e: Store Operations. Review: 3d: Load Operations

ECE170 Computer Architecture. Single Cycle Control. Review: 3b: Add & Subtract. Review: 3e: Store Operations. Review: 3d: Load Operations ECE7 Computer Architecture Single Cycle Control Review: 3a: Overview of the Fetch Unit The common operations Fetch the : mem[] Update the program counter: Sequential Code: < + Branch and Jump: < something

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

The Big Picture: Where are We Now? EEM 486: Computer Architecture. Lecture 3. Designing a Single Cycle Datapath

The Big Picture: Where are We Now? EEM 486: Computer Architecture. Lecture 3. Designing a Single Cycle Datapath The Big Picture: Where are We Now? EEM 486: Computer Architecture Lecture 3 The Five Classic Components of a Computer Processor Input Control Memory Designing a Single Cycle path path Output Today s Topic:

More information

Outline. EEL-4713 Computer Architecture Designing a Single Cycle Datapath

Outline. EEL-4713 Computer Architecture Designing a Single Cycle Datapath Outline EEL-473 Computer Architecture Designing a Single Cycle path Introduction The steps of designing a processor path and timing for register-register operations path for logical operations with immediates

More information

COMP303 - Computer Architecture Lecture 8. Designing a Single Cycle Datapath

COMP303 - Computer Architecture Lecture 8. Designing a Single Cycle Datapath COMP33 - Computer Architecture Lecture 8 Designing a Single Cycle Datapath The Big Picture The Five Classic Components of a Computer Processor Input Control Memory Datapath Output The Big Picture: 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

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

361 control.1. EECS 361 Computer Architecture Lecture 9: Designing Single Cycle Control

361 control.1. EECS 361 Computer Architecture Lecture 9: Designing Single Cycle Control 36 control. EECS 36 Computer Architecture Lecture 9: Designing Single Cycle Control Recap: The MIPS Subset ADD and subtract add rd, rs, rt sub rd, rs, rt OR Imm: ori rt, rs, imm6 3 3 26 2 6 op rs rt rd

More information

How to design a controller to produce signals to control the datapath

How to design a controller to produce signals to control the datapath ECE48 Computer Organization and Architecture Designing Single Cycle How to design a controller to produce signals to control the datapath ECE48. 2--7 Recap: The MIPS Formats All MIPS instructions are bits

More information

Ch 5: Designing a Single Cycle Datapath

Ch 5: Designing a Single Cycle Datapath Ch 5: esigning a Single Cycle path Computer Systems Architecture CS 365 The Big Picture: Where are We Now? The Five Classic Components of a Computer Processor Control Memory path Input Output Today s Topic:

More information

Recap: The MIPS Subset ADD and subtract EEL Computer Architecture shamt funct add rd, rs, rt Single-Cycle Control Logic sub rd, rs, rt

Recap: The MIPS Subset ADD and subtract EEL Computer Architecture shamt funct add rd, rs, rt Single-Cycle Control Logic sub rd, rs, rt Recap: The MIPS Subset EEL-47 - Computer Architecture Single-Cycle Logic ADD and subtract add rd, rs, rt sub rd, rs, rt OR Imm: ori rt, rs, imm 2 rs rt rd shamt t bits 5 bits 5 bits 5 bits 5 bits bits

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

361 datapath.1. Computer Architecture EECS 361 Lecture 8: Designing a Single Cycle Datapath

361 datapath.1. Computer Architecture EECS 361 Lecture 8: Designing a Single Cycle Datapath 361 datapath.1 Computer Architecture EECS 361 Lecture 8: Designing a Single Cycle Datapath Outline of Today s Lecture Introduction Where are we with respect to the BIG picture? Questions and Administrative

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

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

MIPS-Lite Single-Cycle Control

MIPS-Lite Single-Cycle Control MIPS-Lite Single-Cycle Control COE68: Computer Organization and Architecture Dr. Gul N. Khan http://www.ee.ryerson.ca/~gnkhan Electrical and Computer Engineering Ryerson University Overview Single cycle

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

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

ECE468 Computer Organization and Architecture. Designing a Single Cycle Datapath

ECE468 Computer Organization and Architecture. Designing a Single Cycle Datapath ECE468 Computer Organization and Architecture Designing a Single Cycle Datapath ECE468 datapath1 The Big Picture: Where are We Now? The Five Classic Components of a Computer Processor Control Input Datapath

More information

CS359: Computer Architecture. The Processor (A) Yanyan Shen Department of Computer Science and Engineering

CS359: Computer Architecture. The Processor (A) Yanyan Shen Department of Computer Science and Engineering CS359: Computer Architecture The Processor (A) Yanyan Shen Department of Computer Science and Engineering Eecuting R-type Instructions 7 Instructions ADD and subtract add rd, rs, rt sub rd, rs, rt OR Immediate:

More information

Review. N-bit adder-subtractor done using N 1- bit adders with XOR gates on input. Lecture #19 Designing a Single-Cycle CPU

Review. N-bit adder-subtractor done using N 1- bit adders with XOR gates on input. Lecture #19 Designing a Single-Cycle CPU CS6C L9 CPU Design : Designing a Single-Cycle CPU () insteecsberkeleyedu/~cs6c CS6C : Machine Structures Lecture #9 Designing a Single-Cycle CPU 27-7-26 Scott Beamer Instructor AI Focuses on Poker Review

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

CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath

CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath CPE 442 single-cycle datapath.1 Outline of Today s Lecture Recap and Introduction Where are we with respect to the BIG picture?

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

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 61C: Great Ideas in Computer Architecture Datapath. Instructors: John Wawrzynek & Vladimir Stojanovic

CS 61C: Great Ideas in Computer Architecture Datapath. Instructors: John Wawrzynek & Vladimir Stojanovic CS 61C: Great Ideas in Computer Architecture Datapath Instructors: John Wawrzynek & Vladimir Stojanovic http://inst.eecs.berkeley.edu/~cs61c/fa15 1 Components of a Computer Processor Control Enable? Read/Write

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

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

UC Berkeley CS61C : Machine Structures

UC Berkeley CS61C : Machine Structures inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures Lecture 25 CPU Design: Designing a Single-cycle CPU Lecturer SOE Dan Garcia www.cs.berkeley.edu/~ddgarcia T-Mobile s Wi-Fi / Cell phone

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

COMP303 Computer Architecture Lecture 9. Single Cycle Control

COMP303 Computer Architecture Lecture 9. Single Cycle Control COMP33 Computer Architecture Lecture 9 Single Cycle Control A Single Cycle Datapath We have everything except control signals (underlined) RegDst busw Today s lecture will look at how to generate the control

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

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

CS61C : Machine Structures

CS61C : Machine Structures inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #19 Designing a Single-Cycle CPU 27-7-26 Scott Beamer Instructor AI Focuses on Poker CS61C L19 CPU Design : Designing a Single-Cycle CPU

More information

CS152 Computer Architecture and Engineering Lecture 10: Designing a Single Cycle Control. Recap: The MIPS Instruction Formats

CS152 Computer Architecture and Engineering Lecture 10: Designing a Single Cycle Control. Recap: The MIPS Instruction Formats CS52 Computer Architecture and Engineering Lecture : Designing a Single Cycle February 7, 995 Dave Patterson (patterson@cs) and Shing Kong (shing.kong@eng.sun.com) Slides available on http://http.cs.berkeley.edu/~patterson

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

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

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

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

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

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

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

CPU Organization (Design)

CPU Organization (Design) ISA Requirements CPU Organization (Design) Datapath Design: Capabilities & performance characteristics of principal Functional Units (FUs) needed by ISA instructions (e.g., Registers, ALU, Shifters, Logic

More information

CS61C : Machine Structures

CS61C : Machine Structures CS 61C L path (1) insteecsberkeleyedu/~cs61c/su6 CS61C : Machine Structures Lecture # path natomy: 5 components of any Computer Personal Computer -7-25 This week Computer Processor ( brain ) path ( brawn

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

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 18 CPU Design: The Single-Cycle I ! Nasty new windows vulnerability!

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 18 CPU Design: The Single-Cycle I ! Nasty new windows vulnerability! inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 18 CPU Design: The Single-Cycle I CS61C L18 CPU Design: The Single-Cycle I (1)! 2010-07-21!!!Instructor Paul Pearce! Nasty new windows vulnerability!

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

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

Full Datapath. CSCI 402: Computer Architectures. The Processor (2) 3/21/19. Fengguang Song Department of Computer & Information Science IUPUI

Full Datapath. CSCI 402: Computer Architectures. The Processor (2) 3/21/19. Fengguang Song Department of Computer & Information Science IUPUI CSCI 42: Computer Architectures The Processor (2) Fengguang Song Department of Computer & Information Science IUPUI Full Datapath Branch Target Instruction Fetch Immediate 4 Today s Contents We have looked

More information

CS 61C: Great Ideas in Computer Architecture. MIPS CPU Datapath, Control Introduction

CS 61C: Great Ideas in Computer Architecture. MIPS CPU Datapath, Control Introduction CS 61C: Great Ideas in Computer Architecture MIPS CPU Datapath, Control Introduction Instructor: Alan Christopher 7/28/214 Summer 214 -- Lecture #2 1 Review of Last Lecture Critical path constrains clock

More information

The Processor: Datapath & Control

The Processor: Datapath & Control Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture The Processor: Datapath & Control Processor Design Step 3 Assemble Datapath Meeting Requirements Build the

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

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

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

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

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

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

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

Recap: A Single Cycle Datapath. CS 152 Computer Architecture and Engineering Lecture 8. Single-Cycle (Con t) Designing a Multicycle Processor

Recap: A Single Cycle Datapath. CS 152 Computer Architecture and Engineering Lecture 8. Single-Cycle (Con t) Designing a Multicycle Processor CS 52 Computer Architecture and Engineering Lecture 8 Single-Cycle (Con t) Designing a Multicycle Processor February 23, 24 John Kubiatowicz (www.cs.berkeley.edu/~kubitron) lecture slides: http://inst.eecs.berkeley.edu/~cs52/

More information

CSCI 402: Computer Architectures. Fengguang Song Department of Computer & Information Science IUPUI. Today s Content

CSCI 402: Computer Architectures. Fengguang Song Department of Computer & Information Science IUPUI. Today s Content 3/6/8 CSCI 42: Computer Architectures The Processor (2) Fengguang Song Department of Computer & Information Science IUPUI Today s Content We have looked at how to design a Data Path. 4.4, 4.5 We will design

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

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

CS3350B Computer Architecture Winter Lecture 5.7: Single-Cycle CPU: Datapath Control (Part 2)

CS3350B Computer Architecture Winter Lecture 5.7: Single-Cycle CPU: Datapath Control (Part 2) CS335B Computer Architecture Winter 25 Lecture 5.7: Single-Cycle CPU: Datapath Control (Part 2) Marc Moreno Maza www.csd.uwo.ca/courses/cs335b [Adapted from lectures on Computer Organization and Design,

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

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 28: Single- Cycle CPU Datapath Control Part 1

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 28: Single- Cycle CPU Datapath Control Part 1 CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 28: Single- Cycle CPU Datapath Control Part 1 Guest Lecturer: Sagar Karandikar hfp://inst.eecs.berkeley.edu/~cs61c/ http://research.microsoft.com/apps/pubs/default.aspx?id=212001!

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

CS61C : Machine Structures

CS61C : Machine Structures inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #17 Single Cycle CPU Datapath CPS today! 2005-10-31 There is one handout today at the front and back of the room! Lecturer PSOE, new dad

More information

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Single- Cycle CPU Datapath & Control Part 2. Clk

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Single- Cycle CPU Datapath & Control Part 2. Clk 3/3/5 CS 6C: Great Ideas in Computer Architecture (Machine Structures) Single- Cycle CPU path & Control Part 2 ructors: Krste Asanovic & Vladimir Stojanovic hip://inst.eecs.berkeley.edu/~cs6c/ Review:

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

Chapter 4. The Processor. Computer Architecture and IC Design Lab

Chapter 4. The Processor. Computer Architecture and IC Design Lab Chapter 4 The Processor Introduction CPU performance factors CPI Clock Cycle Time Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS

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

EECS150 - Digital Design Lecture 10- CPU Microarchitecture. Processor Microarchitecture Introduction

EECS150 - Digital Design Lecture 10- CPU Microarchitecture. Processor Microarchitecture Introduction EECS150 - Digital Design Lecture 10- CPU Microarchitecture Feb 18, 2010 John Wawrzynek Spring 2010 EECS150 - Lec10-cpu Page 1 Processor Microarchitecture Introduction Microarchitecture: how to implement

More information

Lecture #17: CPU Design II Control

Lecture #17: CPU Design II Control Lecture #7: CPU Design II Control 25-7-9 Anatomy: 5 components of any Computer Personal Computer Computer Processor Control ( brain ) This week ( ) path ( brawn ) (where programs, data live when running)

More information

CS 110 Computer Architecture Single-Cycle CPU Datapath & Control

CS 110 Computer Architecture Single-Cycle CPU Datapath & Control CS Computer Architecture Single-Cycle CPU Datapath & Control Instructor: Sören Schwertfeger http://shtech.org/courses/ca/ School of Information Science and Technology SIST ShanghaiTech University Slides

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

Major CPU Design Steps

Major CPU Design Steps Datapath Major CPU Design Steps. Analyze instruction set operations using independent RTN ISA => RTN => datapath requirements. This provides the the required datapath components and how they are connected

More information

If you didn t do as well as you d hoped

If you didn t do as well as you d hoped 7/3/5 CS 6C: Great Ideas in Computer Architecture Midterm Results Lecture 2: Single- Cycle CPU, path & Control Part 2 ructor: Sagar Karandikar sagark@eecsberkeleyedu hfp://insteecsberkeleyedu/~cs6c You

More information

Lecture 6 Datapath and Controller

Lecture 6 Datapath and Controller Lecture 6 Datapath and Controller Peng Liu liupeng@zju.edu.cn Windows Editor and Word Processing UltraEdit, EditPlus Gvim Linux or Mac IOS Emacs vi or vim Word Processing(Windows, Linux, and Mac IOS) LaTex

More information

CS61C : Machine Structures

CS61C : Machine Structures inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 34 Single Cycle CPU Control I 24-4-16 Lecturer PSOE Dan Garcia www.cs.berkeley.edu/~ddgarcia 1.5 Quake?! NBC movie on May 3 rd. Truth stranger

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

Processor (I) - datapath & control. Hwansoo Han

Processor (I) - datapath & control. Hwansoo Han Processor (I) - datapath & control Hwansoo Han Introduction CPU performance factors Instruction count - Determined by ISA and compiler CPI and Cycle time - Determined by CPU hardware We will examine two

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

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 19 CPU Design: The Single-Cycle II & Control !

inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 19 CPU Design: The Single-Cycle II & Control ! inst.eecs.berkeley.edu/~cs6c CS6C : Machine Structures Lecture 9 CPU Design: The Single-Cycle II & Control 2-7-22!!!Instructor Paul Pearce! Dell may have shipped infected motherboards! Dell is warning

More information

Computer Science 61C Spring Friedland and Weaver. The MIPS Datapath

Computer Science 61C Spring Friedland and Weaver. The MIPS Datapath The MIPS Datapath 1 The Critical Path and Circuit Timing The critical path is the slowest path through the circuit For a synchronous circuit, the clock cycle must be longer than the critical path otherwise

More information

CPU Design Steps. EECC550 - Shaaban

CPU Design Steps. EECC550 - Shaaban CPU Design Steps 1. Analyze instruction set operations using independent RTN => datapath requirements. 2. Select set of datapath components & establish clock methodology. 3. Assemble datapath meeting the

More information

EECS150 - Digital Design Lecture 9- CPU Microarchitecture. Watson: Jeopardy-playing Computer

EECS150 - Digital Design Lecture 9- CPU Microarchitecture. Watson: Jeopardy-playing Computer EECS150 - Digital Design Lecture 9- CPU Microarchitecture Feb 15, 2011 John Wawrzynek Spring 2011 EECS150 - Lec09-cpu Page 1 Watson: Jeopardy-playing Computer Watson is made up of a cluster of ninety IBM

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

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Single Cycle MIPS CPU

CS 61C: Great Ideas in Computer Architecture (Machine Structures) Single Cycle MIPS CPU CS 6C: Great Ideas in Computer Architecture (Machine Structures) Single Cycle MIPS CPU ructors: Randy H Katz David A PaGerson hgp://insteecsberkeleyedu/~cs6c/sp Spring 2 - - Lecture #8 Parallel Requests

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

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

Instructor: Randy H. Katz hcp://inst.eecs.berkeley.edu/~cs61c/fa13. Fall Lecture #18. Warehouse Scale Computer

Instructor: Randy H. Katz hcp://inst.eecs.berkeley.edu/~cs61c/fa13. Fall Lecture #18. Warehouse Scale Computer /29/3 CS 6C: Great Ideas in Computer Architecture Building Blocks for Datapaths Instructor: Randy H. Katz hcp://inst.eecs.berkeley.edu/~cs6c/fa3 /27/3 Fall 23 - - Lecture #8 So5ware Parallel Requests Assigned

More information