The Processor: Datapath & Control

Size: px
Start display at page:

Download "The Processor: Datapath & Control"

Transcription

1 Orange Coast College Business Division Computer Science Department CS 116- Computer Architecture The Processor: Datapath & Control

2 Processor Design Step 3 Assemble Datapath Meeting Requirements Build the data path by adding up the components required to execute each instruction We need to consider: Register transfer requirements Instruction fetch operands and execute operation We are going to consider one instruction format at a time and then combine what we have after each step -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 2

3 Processor Design Step 3-a Instruction Fetch Unit Common to all instruction types Actions taken: Fetch the instruction from Memory: mem[pc] Update program counter: Sequential Code: PC <- PC + 4 Branch and Jump: PC <- branch address PC 4 Adder Address Instruction Memory -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 3

4 Consider R-Type instructions R-Format Instructions: Arithmetic instructions Logic instructions Main actions: 2 registers Perform an ALU operation Write result to destination op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits 0 -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 4

5 R-Type: What do we need? To read data from a register we need 2-inputs to register file specifying register to be read 2-outputs from register file will carry the values read Remember output is always available to whatever register# given, therefore no control signal is needed To write data to a register we need 1-input to register file with register# to write into 1-data input will carry the data to be written Write control signal that enables data to be written -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 5

6 Datapath for R-Format Instructions Main components: R ead register 1 R ead register 2 Write register Write data R ead data 1 Register file R ead data 2 R egwrite ALU Operation 3 ALU Z ero A L U result -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 6

7 R-Type Datapath Datapath for Add & Subtract Instructions R[rd] R[rs] ± R[rt] Example: add rd, rs, rt The register selection lines come from register fields Control signals are from the control logic after decoding the instruction Opcode + funct -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 7

8 Now, consider the I-Type Load & Store R[rt] Mem[R[rs] + SignExt[imm16]] R[rt] Mem[R[rs] + SignExt[imm16]] Main actions: Sign-extend offset Add to contents of base register to calculate address Load from or store into the calculated address We need a sign-extend unit for offset CS 21 op rs rt/rd? offset 6 bits 5 bits 5 bits 16 bits sign-extended 16-bits 16 bits 16 CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 8 11 offset 16 bits 0 0

9 Datapath for I-Format instructions: Immediate arithmetic operations R[rt] R[rs] op SignExt[imm16] Main actions: Sign extend immediate operand Perform operation Store result We need a sign-extend unit for immediate operand op rs rt/rd? offset 6 bits 5 bits 5 bits 16 bits sign-extended 16-bits 16 bits offset 16 bits 0 0 -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 9

10 Datapath for I-Format instructions: Immediate logical operations R[rt] R[rs] op ZeroExt[imm16] Main actions: Zero extend immediate operand Perform operation Store result We need a zero-extend unit for immediate operand op rs rt/rd? immediate 31 6 bits 5 bits 5 bits bits immediate 16 bits 16 bits CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 10

11 Load - The Details Use offset in 16 immediate operand bits Value read from memory must be written into register file R[rt] <- Mem[R[rs] + SignExt[imm16]] Example: lw rt, rs, imm16 lw $t1, offset($t2) #$t2 = Base register op rs rt immediate 6 bits 5 bits 5 bits 16 bit -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 11

12 Store- The Details Use offset in 16 immediate operand bits Value to be stored read from register file Mem[ R[rs] + SignExt[imm16] ] <- R[rt] Example: sw rt, rs, imm16 sw $t1, offset($t2) #$t2 = Base register op rs rt immediate 6 bits 5 bits 5 bits 16 bit -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 12

13 Load & Store- What do we need? Actions: Register access Memory address calculation /Write from memory Write into register (for load) What do we need? Sign-extend unit Data memory unit to read/ or write Both write & read control signals -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 13

14 Implementation of Load & Store Instruction register 1 register 2 Wrte register Wrte data RegWrite data 1 Register File data 2 3 Z ero ALU ALU resut ALU Operation Wr it e data MemW rite Address R ead Data data Memory 16 Sign 32 extend MemR ead -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 14

15 Combining Datapath components A single datapath can be assembled From previous datapaths by adding multiplexors One MUX at ALU input to read Either data bus Or sign extended word One at the data input to the register file that Takes the data from ALU Or from data memory -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 15

16 Putting it all Together Instruction register 1 data 1 register 2 Registers Write data 2 register Write data RegWrite Sign extend ALUSrc M ux 3 ALU operation Zero ALU ALU result Address Write data MemWrite MemtoReg Data memory data Mem M ux -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 16

17 Combining Datapath components Add in the instruction fetch Add 4 PC address Instruction Instruction memory register 1 register 2 Write register Write data RegWrite Registers data 1 data 2 16 Sign 32 extend ALUSrc M ux 3 ALU operation Zero ALU ALU result Address Write data Mem MemWrite MemtoReg data Data memory M ux -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 17

18 Datapath for Branching (I-Format) Datapath For Branch Instructions (I-Format) beq $t1, $t2, offset Steps: Compute branch target address Compare register contents Determine next instruction based on comparison In MIPS, branches are delayed Instruction following the branch is always executed Independent of the branch condition If branch condition is true, backtrack Helps in speeding up (See pipelining) -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 18

19 Branching- The details Step1: Compute branch target address Branch target address = PC + sign-extended offset field HW needed: sign-extension unit Adder Notes: Offset could be positive or negative Offset field is Word offset Shift offset left 2 bits (multiply by 4) to get byte offset Branch offset based on instruction following branch i.e from PC +4 -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 19

20 Branching- The details Step2: Compare register contents Hardware needed: Register file to get register contents ALU to perform comparison By subtraction -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 20

21 Branching- The details Step3: Determine next instruction Depends on the result of comparison If condition is true: Branch is taken If condition is false Branch is not taken Hardware needed: ALU: Zero signal from ALU if the result is zero indicating the condition is true -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 21

22 Branching- The details Step 4: Modify instruction fetch datapath If branch is taken PC Branch target address If branch not taken PC PC +4 Hardware needed Adder -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 22

23 The Branching Datapath PC +4 from instruction datapath Instruction 5 5 Reg1 Reg2 Write Reg Write data Register File Data1 Data2 Shift left 2 3 ALU Add Sum ALU Control Zero Branch target To branch control logic RegWrite Sign 16 extend 32 -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 23

24 Finally, the J-type j target Unconditional jump 2 target Requires no comparison Target is Word target 6 bits 26 bits Target needs shifting 2 bits to the left Original target 26 bits Target after shifting 28 bits Target need to be loaded into PC The lower 28 bits of PC are replaced with target Hardware needed: Concatenating 00 unit -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 24

25 The Combined Datapath 1 clock cycle for each operation Load/store, ALU operations, Branches PC Src PC 4 address Add Instruction Instruction memory register 1 register 2 Write register Write data R egwrite 16 Registers data 1 data 2 Sign extend 32 Shift left 2 ALUSrc M ux Add ALU result 3 ALU operation Z ero ALU ALU result M u x A ddress Write data Mem M em W rite MemtoReg data Data memory M ux -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 25

26 Critical Path for Load Total time needed = PC s change time + Instruction Memory s Access Time + Register File s Access Time + ALU to Perform a 32-bit Add + Data Memory Access Time + Setup Time for Register File Write + Clock Skew -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 26

27 Assemble Control Logic Control Unit Analyze implementation of each instruction to determine setting of control points Inst Memory Address Instruction<31:0> <21:25> Op Fun Rt <21:25> Rs <16:20> Rd <0:15> <11:15> Imm16 Control npc_sel RegWr RegDst ExtOp ALUSrc ALUctr MemWr MemtoReg Equal DATA PATH -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 27

28 What control signals do we need? Register selection: Rs, Rt, Rd and Imed16 hardwired into datapath Operation selection: npc_sel: 0 => PC < PC + 4; 1 => PC < PC SignExt(Im16) 00 Extension 16-bit control ExtOp: zero, sign ALU data source Register or immediate address ALUsrc: 0 => regb; 1 => immed -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 28

29 What control signals do we need? ALU Operation selection (control) ALUctr: add, sub, or Memory Write: MemWr MemtoReg: 1 => Mem RegDst: 0 => rt ; 1 => rd RegWr: write dest register -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 29

30 Control Signals for each instruction inst Register Transfer ADD R[rd] < R[rs] + R[rt]; PC < PC + 4 ALUsrc=RegB, ALUctrl= add, RegDst=rd, RegWr, npc_sel= +4 SUB R[rd] < R[rs] R[rt]; PC < PC + 4 ALUsrc=RegB, ALUctr= sub, RegDst=rd, RegWr, npc_sel= +4 ORi R[rt] < R[rs] + zero_ext(imm16); PC < PC + 4 ALUsrc=Im, Extop= Z, ALUctr= or, RegDst=rt, RegWr, npc_sel= +4 -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 30

31 Control Signals for each instruction inst Register Transfer LOAD R[rt] < MEM[ R[rs] + sign_ext(imm16)]; PC < PC + 4 ALUsrc = Im, Extop = Sn, ALUctr = add, MemtoReg, RegDst = rt, RegWr, npc_sel = +4 STORE MEM[ R[rs] + sign_ext(imm16)] < R[rs]; PC < PC + 4 ALUsrc=Im, Extop= Sn, ALUctr= add, MemWr, npc_sel= +4 BEQ if (R[rs]== R[rt]) then PC< PC+sign_ext(Imm16)] 00 else PC < PC + 4 npc_sel = EQUAL, ALUctr = sub -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 31

32 Assemble each signal npc_sel <= if (OP==BEQ) then EQUAL else 0 ALUsrc <= if (OP== ) then regb else immed ALUctr <= if (OP== ) then funct elseif (OP==ORi) then OR elseif (OP==BEQ) then SUB else ADD -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 32

33 Assemble each signal ExtOp <= if (OP == ORi) then zero else sign MemWr <= (OP == Store) MemtoReg <= (OP == Load) RegWr: <= if ((OP== Store) (OP==BEQ)) then 0 else 1 RegDst: <= if ((OP==Load) (OP==ORi)) then 0 else 1 -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 33

34 Datapath with Control Unit PCSrc Add M ux 1 PC 4 address Instruction (31-0) Instruction memory Instruction [25 21] Instruction [20 16] Instruction [15 11] M ux 1 0 RegDst Instruction [15 0] RegWrite reg1 reg2 Write reg Write data Register file data1 data2 16 Sign 32 extend Shift left 2 ALUSrc M ux 1 0 ALU Control Add ALU result ALU Zero ALU result 0 MemWrite Address Write data Data memory Mem data MemReg M ux 1 0 Instruction [5 0] ALUOp -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 34

35 Summary 5 steps to design a processor 1. Analyze instruction set => datapath requirements 2. Select set of datapath components & establish clock methodology 3. Assemble datapath meeting the requirements 4. Analyze implementation of each instruction to determine setting of control points that effects the register transfer. 5. Assemble the control logic -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 35

36 Summary MIPS makes it easier Instructions are all the same size Source registers are always in same place in the instruction Immediate operands are the same size & in the same location Operations are always on either register contents or immediate operands Single cycle datapath => CPI=1 -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 36

37 The Control Unit Functions: Instruction code Control Unit Control Signals Select operations to be performed (ALU, read/write, etc.) Control data flow (multiplexor inputs) Major components: ALU control Operation based on instruction type and function code Other controls Input: Information comes from the 32 bits of the instruction Output: Control signals -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 37

38 Quick review: MIPS Instruction Formats R-type op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits 0 I-type op rs rt immediate 6 bits 5 bits 5 bits 16 bits 0 J-type op target address 6 bits 26 bits 0 -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 38

39 ALU Control ALU has 3 control inputs Allows 8-combinations Only 5 combinations are used. The rest could be used as don t-care in minimization 000 AND 001 OR 010 add 110 subtract 111 set-on-less-than -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 39

40 ALU Control Remember: ALU is needed for all instruction categories lw/sw(i-format): Compute memory address Arithmetic/logic(R-Format): Arithmetic / logic operation Branch(beq)(I-Format): Subtract registers We need to find ALU control signals from the information in the instruction Instruction AND OR ADD SUB SLL Op-field Functfield0x 0x24 0x25 0x20 0x22 0x2a Funct- Binary ALU Control CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 40

41 ALU Control ALU performs one of 5 instructions based on instruction class ALUOp: A 2-bit input control used with the funct field Determines 3-bit combination to control the ALU 6-bit funct feld 2-bit ALUOp input 00 Add(for load & store) 01 Subtract (for beq) ALUOp Control 10 Depends on code in funct field 3-bit ALU operation 000 and 001 or 010 add 110 sub 111 slt -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 41

42 How ALU control bits are set (ALUOp = 00 or 01 ) Depend on op field & not on funct field (ALUOp code = 10 ) Depend on funct field to set the ALU control input 1 2 Instruction Opcode Instruction operation Desired ALU action ALU control input ALUOp Funct field lw 00 load word XXXXXX add 010 sw 00 store word XXXXXX add 010 Branch equal 01 branch equal XXXXXX subtract 110 R-type 10 add add 010 R-type 10 subtract subtract 110 R-type 10 AND and 000 R-type 10 OR or 001 R-type 10 set on less than set on less than CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 42

43 ALU Control Multiple level of decoding is used 1. The main control unit generates the ALUOp bits 2. ALUOp bits are used as input to ALU control 3. ALU control generates the actual signal to ALU unit Why use multiple levels? Reduce size of main control unit Increase speed of control unit -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 43

44 ALU Control: Truth Table ALUOp Funct field Operation Instruction ALUOp1 ALUOp0 F5 F4 F3 F2 F1 F0 0 0 X X X X X X 010 lw/sw X 1 X X X X X X 110 beq 1 X X X add 1 X X X sub 1 X X X and 1 X X X or 1 X X X sll 8-input lines, 3 output lines Actual table size should be 2 8 = (256) Only relevant combinations are listed Details in (Appendix C2, p. C4) F5 & F4 are always don t cares F3-F0 only are considered -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 44

45 ALU Control: Logic Circuit Details in Appendix C2, p. C4 Based on funct code & ALUOp ALUOp 2 ALUOp0 ALU Control Circuit Diagram F3 ALUOp1 Operation2 ALU operation (Control signals) F (5 0) F2 Operation1 3 5 F1 Operation0 F0 -CS CS116-Ch00-Orientation 1998 Morgan Kaufmann Publishers (Augmented 1998 Morgan & Modified Kaufmann by M.Malaty Publishers ( and Augmented M. Beers) & Modified by M.Malaty) 45

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

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

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

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

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

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

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

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

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

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

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

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

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

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

CS 61C: Great Ideas in Computer Architecture Control and Pipelining

CS 61C: Great Ideas in Computer Architecture Control and Pipelining CS 6C: Great Ideas in Computer Architecture Control and Pipelining Instructors: Vladimir Stojanovic and Nicholas Weaver http://inst.eecs.berkeley.edu/~cs6c/sp6 Datapath Control Signals ExtOp: zero, sign

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

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

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

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

Working on the Pipeline

Working on the Pipeline Computer Science 6C Spring 27 Working on the Pipeline Datapath Control Signals Computer Science 6C Spring 27 MemWr: write memory MemtoReg: ALU; Mem RegDst: rt ; rd RegWr: write register 4 PC Ext Imm6 Adder

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

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

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

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

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

Single Cycle CPU Design. Mehran Rezaei

Single Cycle CPU Design. Mehran Rezaei Single Cycle CPU Design Mehran Rezaei What does it mean? Instruction Fetch Instruction Memory clk pc 32 32 address add $t,$t,$t2 instruction Next Logic to generate the address of next instruction The Branch

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

UC Berkeley CS61C : Machine Structures

UC Berkeley CS61C : Machine Structures inst.eecs.berkeley.edu/~cs6c UC Berkeley CS6C : Machine Structures The Internet is broken?! The Clean Slate team at Stanford wants to revamp the Internet, making it safer (from viruses), more reliable

More information

Systems Architecture

Systems Architecture Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some or all figures from Computer Organization and Design: The Hardware/Software

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

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

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

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

Adding Support for jal to Single Cycle Datapath (For More Practice Exercise 5.20)

Adding Support for jal to Single Cycle Datapath (For More Practice Exercise 5.20) Adding Support for jal to Single Cycle Datapath (For More Practice Exercise 5.20) The MIPS jump and link instruction, jal is used to support procedure calls by jumping to jump address (similar to j ) and

More information

UC Berkeley CS61C : Machine Structures

UC Berkeley CS61C : Machine Structures inst.eecs.berkeley.edu/~cs6c UC Berkeley CS6C : Machine Structures Lecture 26 Single-cycle CPU Control 27-3-2 Exhausted TA Ben Sussman www.icanhascheezburger.com Qutrits Bring Quantum Computers Closer:

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

CS3350B Computer Architecture Quiz 3 March 15, 2018

CS3350B Computer Architecture Quiz 3 March 15, 2018 CS3350B Computer Architecture Quiz 3 March 15, 2018 Student ID number: Student Last Name: Question 1.1 1.2 1.3 2.1 2.2 2.3 Total Marks The quiz consists of two exercises. The expected duration is 30 minutes.

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

COMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H

COMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface Chapter 4 The Processor: A Based on P&H Introduction We will examine two MIPS implementations A simplified version A more realistic pipelined

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

University of California College of Engineering Computer Science Division -EECS. CS 152 Midterm I

University of California College of Engineering Computer Science Division -EECS. CS 152 Midterm I Name: University of California College of Engineering Computer Science Division -EECS Fall 996 D.E. Culler CS 52 Midterm I Your Name: ID Number: Discussion Section: You may bring one double-sided pages

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

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

LECTURE 5. Single-Cycle Datapath and Control

LECTURE 5. Single-Cycle Datapath and Control LECTURE 5 Single-Cycle Datapath and Control PROCESSORS In lecture 1, we reminded ourselves that the datapath and control are the two components that come together to be collectively known as the processor.

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

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

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

CSE 141 Computer Architecture Summer Session Lecture 3 ALU Part 2 Single Cycle CPU Part 1. Pramod V. Argade

CSE 141 Computer Architecture Summer Session Lecture 3 ALU Part 2 Single Cycle CPU Part 1. Pramod V. Argade CSE 141 Computer Architecture Summer Session 1 2004 Lecture 3 ALU Part 2 Single Cycle CPU Part 1 Pramod V. Argade Reading Assignment Announcements Chapter 5: The Processor: Datapath and Control, Sec. 5.3-5.4

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

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

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

Designing a Multicycle Processor

Designing a Multicycle Processor Designing a Multicycle Processor Arquitectura de Computadoras Arturo Díaz D PérezP Centro de Investigación n y de Estudios Avanzados del IPN adiaz@cinvestav.mx Arquitectura de Computadoras Multicycle-

More information

Midterm I March 3, 1999 CS152 Computer Architecture and Engineering

Midterm I March 3, 1999 CS152 Computer Architecture and Engineering University of California, Berkeley College of Engineering Computer Science Division EECS Spring 1999 John Kubiatowicz Midterm I March 3, 1999 CS152 Computer Architecture and Engineering Your Name: SID

More information

Chapter 5: The Processor: Datapath and Control

Chapter 5: The Processor: Datapath and Control Chapter 5: The Processor: Datapath and Control Overview Logic Design Conventions Building a Datapath and Control Unit Different Implementations of MIPS instruction set A simple implementation of a processor

More information

CS 61C: Great Ideas in Computer Architecture Lecture 12: Single- Cycle CPU, Datapath & Control Part 2

CS 61C: Great Ideas in Computer Architecture Lecture 12: Single- Cycle CPU, Datapath & Control Part 2 CS 6C: Great Ideas in Computer Architecture Lecture 2: Single- Cycle CPU, Datapath & Control Part 2 Instructor: Sagar Karandikar sagark@eecs.berkeley.edu hbp://inst.eecs.berkeley.edu/~cs6c Midterm Results

More information

Laboratory 5 Processor Datapath

Laboratory 5 Processor Datapath Laboratory 5 Processor Datapath Description of HW Instruction Set Architecture 16 bit data bus 8 bit address bus Starting address of every program = 0 (PC initialized to 0 by a reset to begin execution)

More information

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle

More information

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition The Processor - Introduction

More information

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor. COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor The Processor - Introduction

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

The MIPS Processor Datapath

The MIPS Processor Datapath The MIPS Processor Datapath Module Outline MIPS datapath implementation Register File, Instruction memory, Data memory Instruction interpretation and execution. Combinational control Assignment: Datapath

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations A simplified

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

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

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware 4.1 Introduction We will examine two MIPS implementations

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

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

ECE232: Hardware Organization and Design

ECE232: Hardware Organization and Design ECE232: Hardware Organization and Design Lecture 14: One Cycle MIPs Datapath Adapted from Computer Organization and Design, Patterson & Hennessy, UCB R-Format Instructions Read two register operands Perform

More information

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University The Processor: Datapath and Control Jin-Soo Kim (jinsookim@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Introduction CPU performance factors Instruction count Determined

More information

Midterm I October 6, 1999 CS152 Computer Architecture and Engineering

Midterm I October 6, 1999 CS152 Computer Architecture and Engineering University of California, Berkeley College of Engineering Computer Science Division EECS Fall 1999 John Kubiatowicz Midterm I October 6, 1999 CS152 Computer Architecture and Engineering Your Name: SID

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

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations Chapter 4 The Processor Part I Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware We will examine two MIPS implementations

More information

Midterm I March 12, 2003 CS152 Computer Architecture and Engineering

Midterm I March 12, 2003 CS152 Computer Architecture and Engineering University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2003 John Kubiatowicz Midterm I March 2, 2003 CS52 Computer Architecture and Engineering Your Name: SID Number:

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

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

The overall datapath for RT, lw,sw beq instrucution

The overall datapath for RT, lw,sw beq instrucution Designing The Main Control Unit: Remember the three instruction classes {R-type, Memory, Branch}: a) R-type : Op rs rt rd shamt funct 1.src 2.src dest. 31-26 25-21 20-16 15-11 10-6 5-0 a) Memory : Op rs

More information

Systems Architecture I

Systems Architecture I Systems Architecture I Topics A Simple Implementation of MIPS * A Multicycle Implementation of MIPS ** *This lecture was derived from material in the text (sec. 5.1-5.3). **This lecture was derived from

More information

The Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

The Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University The Processor (1) Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu EEE3050: Theory on Computer Architectures, Spring 2017, Jinkyu Jeong (jinkyu@skku.edu)

More information

ECE260: Fundamentals of Computer Engineering

ECE260: Fundamentals of Computer Engineering Datapath for a Simplified Processor James Moscola Dept. of Engineering & Computer Science York College of Pennsylvania Based on Computer Organization and Design, 5th Edition by Patterson & Hennessy Introduction

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

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

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

CS 152 Computer Architecture and Engineering. Lecture 10: Designing a Multicycle Processor

CS 152 Computer Architecture and Engineering. Lecture 10: Designing a Multicycle Processor CS 152 Computer Architecture and Engineering Lecture 1: Designing a Multicycle Processor October 1, 1997 Dave Patterson (http.cs.berkeley.edu/~patterson) lecture slides: http://www-inst.eecs.berkeley.edu/~cs152/

More information

CS 351 Exam 2 Mon. 11/2/2015

CS 351 Exam 2 Mon. 11/2/2015 CS 351 Exam 2 Mon. 11/2/2015 Name: Rules and Hints The MIPS cheat sheet and datapath diagram are attached at the end of this exam for your reference. You may use one handwritten 8.5 11 cheat sheet (front

More information

Chapter 4 The Processor 1. Chapter 4A. The Processor

Chapter 4 The Processor 1. Chapter 4A. The Processor Chapter 4 The Processor 1 Chapter 4A The Processor Chapter 4 The Processor 2 Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware

More information

Chapter 4. The Processor Designing the datapath

Chapter 4. The Processor Designing the datapath Chapter 4 The Processor Designing the datapath Introduction CPU performance determined by Instruction Count Clock Cycles per Instruction (CPI) and Cycle time Determined by Instruction Set Architecure (ISA)

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

EECS 151/251A Fall 2017 Digital Design and Integrated Circuits. Instructor: John Wawrzynek and Nicholas Weaver. Lecture 13 EE141

EECS 151/251A Fall 2017 Digital Design and Integrated Circuits. Instructor: John Wawrzynek and Nicholas Weaver. Lecture 13 EE141 EECS 151/251A Fall 2017 Digital Design and Integrated Circuits Instructor: John Wawrzynek and Nicholas Weaver Lecture 13 Project Introduction You will design and optimize a RISC-V processor Phase 1: Design

More information

CSEN 601: Computer System Architecture Summer 2014

CSEN 601: Computer System Architecture Summer 2014 CSEN 601: Computer System Architecture Summer 2014 Practice Assignment 5 Solutions Exercise 5-1: (Midterm Spring 2013) a. What are the values of the control signals (except ALUOp) for each of the following

More information

Lecture 7 Pipelining. Peng Liu.

Lecture 7 Pipelining. Peng Liu. Lecture 7 Pipelining Peng Liu liupeng@zju.edu.cn 1 Review: The Single Cycle Processor 2 Review: Given Datapath,RTL -> Control Instruction Inst Memory Adr Op Fun Rt

More information

Inf2C - Computer Systems Lecture Processor Design Single Cycle

Inf2C - Computer Systems Lecture Processor Design Single Cycle Inf2C - Computer Systems Lecture 10-11 Processor Design Single Cycle Boris Grot School of Informatics University of Edinburgh Previous lectures Combinational circuits Combinations of gates (INV, AND, OR,

More information

CS Computer Architecture Spring Week 10: Chapter

CS Computer Architecture Spring Week 10: Chapter CS 35101 Computer Architecture Spring 2008 Week 10: Chapter 5.1-5.3 Materials adapated from Mary Jane Irwin (www.cse.psu.edu/~mji) and Kevin Schaffer [adapted from D. Patterson slides] CS 35101 Ch 5.1

More information

Pipeline design. Mehran Rezaei

Pipeline design. Mehran Rezaei Pipeline design Mehran Rezaei How Can We Improve the Performance? Exec Time = IC * CPI * CCT Optimization IC CPI CCT Source Level * Compiler * * ISA * * Organization * * Technology * With Pipelining We

More information

Lecture 12: Single-Cycle Control Unit. Spring 2018 Jason Tang

Lecture 12: Single-Cycle Control Unit. Spring 2018 Jason Tang Lecture 12: Single-Cycle Control Unit Spring 2018 Jason Tang 1 Topics Control unit design Single cycle processor Control unit circuit implementation 2 Computer Organization Computer Processor Memory Devices

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

Guerrilla Session 3: MIPS CPU

Guerrilla Session 3: MIPS CPU CS61C Summer 2015 Guerrilla Session 3: MIPS CPU Problem 1: swai (Sp04 Final): We want to implement a new I- type instruction swai (store word then auto- increment). The operation performs the regular sw

More information

Data paths for MIPS instructions

Data paths for MIPS instructions You are familiar with how MIPS programs step from one instruction to the next, and how branches can occur conditionally or unconditionally. We next examine the machine level representation of how MIPS

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

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

ECS 154B Computer Architecture II Spring 2009

ECS 154B Computer Architecture II Spring 2009 ECS 154B Computer Architecture II Spring 2009 Pipelining Datapath and Control 6.2-6.3 Partially adapted from slides by Mary Jane Irwin, Penn State And Kurtis Kredo, UCD Pipelined CPU Break execution into

More information