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

Size: px
Start display at page:

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

Transcription

1 /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 Lecture #8 So5ware Parallel Requests Assigned to computer e.g., Search Katz Parallel Threads Assigned to core e.g., Lookup, Ads Parallel InstrucVons > one Vme e.g., 5 pipelined instrucvons Parallel Data > data one Vme e.g., Add of 4 pairs of words Hardware descripvons All one Vme Programming Languages You are Here! Harness Parallelism & Achieve High Performance Hardware Warehouse Scale Computer Core Memory Input/Output InstrucVon Unit(s) Cache Memory Core /27/3 Fall Lecture #8 2 Computer (Cache) Core FuncVonal Unit(s) A +B A +B A 2 +B 2 A 3 +B 3 Smart Phone Today Logic Gates

2 /29/3 Machine Interpreta4on Levels of RepresentaVon/ InterpretaVon High Level Language Program (e.g., C) Compiler Assembly Language Program (e.g., MIPS) Assembler Machine Language Program (MIPS) Hardware Architecture DescripCon (e.g., block diagrams) Architecture Implementa4on Logic Circuit DescripCon (Circuit SchemaCc Diagrams) temp = v[k]; v[k] = v[k+]; v[k+] = temp; lw $t, ($2) lw $t, 4($2) sw $t, ($2) sw $t, 4($2) Anything can be represented as a number, i.e., data or instrucvons! /27/3 Fall Lecture #8 3 Agenda Timing and State Machines Datapath Elements: Mux + MIPS- lite Datapath CPU Timing MIPS- lite Control And, in Conclusion, /29/3 Fall Lecture #8 4 2

3 /29/3 Agenda Timing and State Machines Datapath Elements: Mux + MIPS- lite Datapath CPU Timing MIPS- lite Control And, in Conclusion, /29/3 Fall Lecture #8 5 Last Time: SummaVon Circuit Register is used to hold up the transfer of data to adder Rough Vming High () Low () High () Low () High () Low () Time Square wave clock sets when things change Rounded Rectangle per clock means could be or Xi must be ready before clock edge due to adder delay /29/3 Fall Lecture #8 6 3

4 /29/3 Register Internals n instances of a Flip- Flop Flip- flop name because the output flips and flops between and D is data input, Q is data output Also called D- type Flip- Flop /29/3 Fall Lecture #8 7 Camera Analogy Timing Terms Want to take a portrait Vming right before and aper taking picture Set up?me don t move since about to take picture (open camera shucer) Hold?me need to hold svll aper shucer opens unvl camera shucer closes Time click to data Vme from open shucer unvl can see image on output (viewfinder) /29/3 Fall Lecture #8 8 4

5 /29/3 Hardware Timing Terms Setup Time: when the input must be stable before the edge of the CLK Hold Time: when the input must be stable a5er the edge of the CLK CLK- to- Q Delay: how long it takes the output to change, measured from the edge of the CLK /29/3 Fall Lecture #8 9 FSM Maximum Clock Frequency What is the maximum frequency of this circuit? Hint: Frequency = /Period Max Delay = Setup Time + CLK- to- Q Delay + CL Delay /29/3 Fall Lecture #8 5

6 /29/3 Another Great (Theory) Idea: Finite State Machines (FSM) You may have seen FSMs in other classes (e.g., CS7) Same basic idea FuncVon can be represented with a state transivon diagram With combinavonal logic and registers, any FSM can be implemented in hardware /29/3 Fall Lecture #8 Example: 3 Ones FSM FSM to detect the occurrence of 3 consecuvve s in the Input Draw the FSM Assume state transivons are controlled by the clock: On each clock cycle the machine checks the inputs and moves to a new state and produces a new output /29/3 Fall Lecture #8 2 6

7 /29/3 Hardware ImplementaVon of FSM Register needed to hold a representavon of the machine s state. Unique bit pacern for each state. CombinaVonal logic circuit is used to implement a funcvon maps from present state (PS) and input to next state (NS) and output. The register is used to break the feedback path between Next State (NS) and Prior State (PS), controlled by the clock +! =! /29/3 Fall Lecture #8 3 Hardware for FSM: CombinaVonal Logic Can look at its funcvonal specificavon, truth table form Truth table PS" Input" NS" Output" " " " " " " " " " " " " " " " " " " " " " " " " /29/3 Fall Lecture #8 4 7

8 /29/3 Hardware for FSM: CombinaVonal Logic Truth table PS" Input" NS" Output" " " " " " " " " " " " " " " " " " " " " " " " " /29/3 Fall Lecture #8 5 Hardware for FSM: CombinaVonal Logic AlternaVve Truth Table format: list only cases where value is a.then restate as logic equavons using PS, PS, Input Truth table PS" Input" NS" Output" " " " " " " " " " " " " " " " " " " " " " " " " /29/3 Fall Lecture #8 6 8

9 /29/3 Truth table PS" " " " " " " Input" " " " " " " NS" " " " " " " Hardware for FSM: CombinaVonal Logic AlternaVve Truth Table format: list only cases where value is a.then restate as logic equavons using PS, PS, Input Output" " " " " " " NS bit is PS" Input" " " NS bit is PS" Input" " " Output is PS" Input" " " /29/3 Fall Lecture #8 7 Truth table PS" " " " " " " Input" " " " " " " NS" " " " " " " Hardware for FSM: CombinaVonal Logic AlternaVve Truth Table format: list only cases where value is a.then restate as logic equavons using PS, PS, Input Output" " " " " " " NS = PS PS Input NS = ~PS ~PS Input NS = PS PS Input NS = ~PS PS Input Output= PS PS Input Output= PS ~PS Input NS bit is PS" Input" " " NS bit is PS" Input" " " Output is PS" Input" " " /29/3 Fall Lecture #8 8 9

10 /29/3 Administrivia /29/3 Fall Lecture #8 9 Agenda Timing and State Machines Datapath Elements: Mux + MIPS- lite Datapath CPU Timing MIPS- lite Control And, in Conclusion, /29/3 Fall Lecture #8 2

11 /29/3 Design Hierarchy system datapath control code registers multiplexer comparator state registers combinational logic register logic switching networks /27/3 Fall Lecture #8 2 Conceptual MIPS Datapath /27/3 Fall Lecture #8 22

12 /29/3 Data MulVplexer (e.g., 2- to- x n- bit- wide) mux /27/3 Fall Lecture #8 23 N Instances of - bit- Wide Mux /27/3 Fall Lecture #8 24 2

13 /29/3 How Do We Build a - bit- Wide Mux (in Logisim)? s /27/3 Fall Lecture # to- MulVplexer How many rows in TT? /27/3 Fall Lecture #8 3

14 /29/3 AlternaVve Hierarchical Approach (in Logisim) /27/3 Fall Lecture #8 27 Logisim /27/3 Fall Lecture #8 28 4

15 /29/3 Subcircuits Subcircuit: Logisim equivalent of procedure or method Every project is a hierarchy of subcircuits /27/3 Fall Lecture #8 29 N- bit- wide Data MulVplexer (in Logisim + tunnel) mux /27/3 Fall Lecture #8 3 5

16 /29/3 ArithmeVc and Logic Unit Most processors contain a special logic block called ArithmeVc and Logic Unit () We ll show you an easy one that does ADD, SUB, bitwise AND, bitwise OR /27/3 Fall Lecture #8 3 Simple /27/3 Fall Lecture #8 6

17 /29/3 Adder/Subtractor: One- bit adder Least Significant Bit /27/3 Fall Lecture #8 33 Adder/Subtractor: One- bit adder (/2) /27/3 Fall Lecture #8 34 7

18 /29/3 Adder/Subtractor: One- bit Adder (2/2) /27/3 Fall Lecture #8 35 N x - bit Adders N- bit Adder Connect Carry Out i- to Carry in i: b /27/3 Fall Lecture #8 36 8

19 /29/3 Twos Complement Adder/Subtractor /27/3 Fall Lecture #8 37 CriVcal Path When sewng clock period in synchronous systems, must allow for worst case Path through combinavonal logic that is worst case called crivcal path Can be esvmated by number of gate delays : Number of gates must go through in worst case Idea: Doesn t macer if speedup other paths if don t improve the crivcal path What might crivcal path of? /27/3 Fall Lecture #8 38 9

20 /29/3 MulVplexer Design MIPS- lite Datapath CPU Timing MIPS- lite Control And, in Conclusion, Agenda /27/3 Fall Lecture #8 39 Agenda Timing and State Machines Datapath Elements: Mux + MIPS- lite Datapath CPU Timing MIPS- lite Control And, in Conclusion, /29/3 Fall Lecture #8 4 2

21 /29/3 Processor Design Process Five steps to design a processor:. Analyze instrucvon set à Processor datapath requirements Control 2. Select set of datapath Memory components & establish Datapath clock methodology 3. Assemble datapath meevng the requirements 4. Analyze implementavon of each instrucvon to determine sewng of control points that effects the register transfer. 5. Assemble the control logic Formulate Logic EquaVons Design Circuits /27/3 Fall Lecture #8 4 Input Output ADDU and SUBU addu rd,rs,rt subu rd,rs,rt OR Immediate: ori rt,rs,imm6 LOAD and STORE Word lw rt,rs,imm6 sw rt,rs,imm6 3 BRANCH: beq rs,rt,imm6 The MIPS- lite Subset op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits 2 op rs rt immediate 6 bits 5 bits 5 bits 6 bits 2 op rs rt immediate 6 bits 5 bits 5 bits 6 bits 2 op rs rt immediate 6 bits 5 bits 5 bits 6 bits /27/3 Fall Lecture #

22 /29/3 Register Transfer Language (RTL) RTL gives the meaning of the instrucvons {op, rs, rt, rd, shamt, funct} MEM[ PC ]! {op, rs, rt, Imm6} MEM[ PC ]! All start by fetching the instrucvon Inst Register Transfers! ADDU R[rd] R[rs] + R[rt]; PC PC + 4! SUBU R[rd] R[rs] R[rt]; PC PC + 4! ORI R[rt] R[rs] zero_ext(imm6); PC PC + 4! LOAD R[rt] MEM[ R[rs] + sign_ext(imm6)]; PC PC + 4! STORE MEM[ R[rs] + sign_ext(imm6) ] R[rt]; PC PC + 4! BEQ if ( R[rs] == R[rt] ) then PC PC (sign_ext(imm6) ) else PC PC + 4! /27/3 Fall Lecture #8 43 Step : Requirements of the InstrucVon Set Memory (MEM) InstrucVons & data (will use one for each: really caches) Registers (R: x ) Read rs Read rt Write rt or rd PC Extender (sign/zero extend) Add/Sub/OR unit for operavon on register(s) or extended immediate Add 4 (+ maybe extended immediate) to PC Compare if registers equal? /27/3 Fall Lecture #

23 /29/3 Generic Steps of Datapath PC instrucvon memory rd rs rt registers Data memory mux +4 imm. InstrucVon Fetch 2. Decode/ Register Read 5. Register 3. Execute 4. Memory Write /27/3 Fall Lecture #8 45 Step 2: Components of the Datapath CombinaVonal Elements State Elements + Clocking Methodology A B Building Blocks Adder Adder CarryIn Sum CarryOut A B Select MUX MulVplexer Y A B OP Result /27/3 Fall Lecture #

24 /29/3 Needs for MIPS- lite + Rest of MIPS AddiVon, subtracvon, logical OR, ==: ADDU R[rd] = R[rs] + R[rt];... SUBU R[rd] = R[rs] R[rt];... ORI R[rt] = R[rs] zero_ext(imm6)... BEQ if ( R[rs] == R[rt] )... Test to see if output == for any operavon gives == test. How? P&H also adds AND, Set Less Than ( if A < B, otherwise) from Appendix C, secvon C.5 /27/3 Fall Lecture #8 47 Storage Element: Idealized Memory Write Enable Address Memory (idealized) Data In One input bus: Data In One output bus: Data Out Clk Memory word is found by: Address selects the word to put on Data Out Write Enable = : address selects the memory word to be wricen via the Data In bus Clock input (CLK) CLK input is a factor ONLY during write operavon During read operavon, behaves as a combinavonal logic block: Address valid Data Out valid aper access Vme DataOut /27/3 Fall Lecture #

25 /29/3 Storage Element: Register (Building Block) Similar to D Flip Flop except N- bit input and output Write Enable input Write Enable: Data In Write Enable Negated (or deasserted) (): Data Out will not change Asserted (): Data Out will become Data In on rising edge of clock N Data Out N /27/3 Fall Lecture #8 49 Storage Element: Register File Register File consists of registers: Two - bit output busses: busa and busb One - bit input bus: busw Register is selected by: RW RA RB Write Enable busw RA (number) selects the register to put on busa (data) RB (number) selects the register to put on busb (data) RW (number) selects the register to be wricen via busw (data) when Write Enable is Clock input () Clk input is a factor ONLY during write operavon During read operavon, behaves as a combinavonal logic block: RA or RB valid busa or busb valid aper access Vme. Clk x - bit Registers busa busb /27/3 Fall Lecture #8 5 25

26 /29/3 Step 3: Assemble DataPath MeeVng Requirements Register Transfer Requirements Datapath Assembly InstrucVon Fetch Read Operands and Execute OperaVon Common RTL operavons Fetch the InstrucVon: mem[pc] Update the program counter: SequenVal Code: PC PC + 4 Branch and Jump: PC something else Address InstrucVon Memory InstrucVon Word /27/3 Fall Lecture #8 5 PC Next Address Logic Step 3: Add & Subtract R[rd] = R[rs] op R[rt] (addu rd,rs,rt) Ra, Rb, and Rw come from instrucvon s Rs, Rt, and Rd fields op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits ctr and RegWr: control logic aper decoding the instrucvon rd rs rt RegWr ctr busa Rw Ra Rb busw Result x - bit Registers busb Already defined the register file & /27/3 Fall Lecture #8 52

27 /29/3 Agenda Timing and State Machines Datapath Elements: Mux + MIPS- lite Datapath CPU Timing MIPS- lite Control And, in Conclusion, /29/3 Fall Lecture #8 53 Clk Clocking Methodology Storage elements clocked by same edge CriVcal path (longest path through logic) determines length of clock period Have to allow for Clock- to- Q and Setup Times too This lecture (and P&H secvons) do whole instrucvon in clock cycle for pedagogic reasons Project 4 will do it in 2 clock cycles via simple pipelining Soon explain pipelining and use 5 clock cycles per instrucvon /27/3 Fall Lecture #

28 /29/3 Clk PC Old Value Rs, Rt, Rd, Op, Func ctr Register- Register Timing: One Complete Cycle Clk- to- Q New Value InstrucVon Memory Access Time Old Value New Value Delay through Control Logic Old Value New Value RegWr Old Value New Value Register File Access Time busa, B Old Value New Value Delay busw Old Value New Value RegWr Rd Rs Rt ctr Setup Time Register Write Rw Ra Rb busa busw Occurs Here RegFile busb /27/3 Fall Lecture #8 55 Agenda Timing and State Machines Datapath Elements: Mux + MIPS- lite Datapath CPU Timing MIPS- lite Control And, in Conclusion, /29/3 Fall Lecture #

29 /29/3 Clk PC Old Value Rs, Rt, Rd, Op, Func ctr Register- Register Timing: One Complete Cycle Clk- to- Q New Value InstrucVon Memory Access Time Old Value New Value Delay through Control Logic Old Value New Value RegWr Old Value New Value Register File Access Time busa, B Old Value New Value Delay busw Old Value New Value RegWr Rd Rs Rt ctr Setup Time Register Write Rw Ra Rb busa busw Occurs Here RegFile busb /27/3 Fall Lecture #8 57 Logical OperaVons with Immediate R[rt] = R[rs] op ZeroExt[imm6] op rs rt immediate 3 6 bits 5 bits 5 bits bits immediate 6 bits 6 bits But we re wri4ng to Rt register?? And immediate input?? RegWr Rd Rs Rt ctr busw Rw Ra Rb busa RegFile busb /27/3 Fall Lecture #

30 /29/3 Logical OperaVons with Immediate R[rt] = R[rs] op ZeroExt[imm6] RegDst RegWr rd rs 5 5 Rw imm6 rt Ra Rb RegFile 6 rt 5 3 op rs rt immediate /27/3 Fall Lecture # bits 5 bits 5 bits bits ZeroExt 6 bits 2: mul?plexor ctr busa busb Src 6 immediate 6 bits Already defined - bit MUX; Zero Ext? Load OperaVons R[rt] = Mem[R[rs] + SignExt[imm6]] Example: lw rt,rs,imm6 3 What sign extending?? And where is Mem?? 2 6 op rs rt immediate 6 bits 5 bits 5 bits 6 bits RegDst rd rt RegWr rs 5 5 Rw imm6 Ra Rb RegFile 6 rt 5 ZeroExt busa busb ctr /27/3 Fall Lecture #8 6 Src 3

31 /29/3 Load OperaVons R[rt] = Mem[R[rs] + SignExt[imm6]] Example: lw rt,rs,imm op rs rt immediate 6 bits 5 bits 5 bits 6 bits RegDst rd rt ctr MemtoReg MemWr RegWr rs rt Rw Ra Rb busa busw RegFile busb? WrEn Adr imm6 Data In Data 6 Memory Src /27/3 ExtOp Fall Lecture #8 6 Extender 3 RTL: The Add InstrucVon 2 op rs rt rd shamt funct add rd, rs, rt MEM[PC] Fetch the instrucvon from memory R[rd] = R[rs] + R[rt] The actual operavon 6 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits PC = PC + 4 Calculate the next instrucvon s address 6 /27/3 Fall Lecture #8 62 3

32 /29/3 InstrucVon Fetch Unit at Beginning of Add Fetch the instrucvon from InstrucVon memory: InstrucVon = MEM[PC] Inst same for all instrucvons Memory InstrucVon<3:> 4 PC Ext Adder Adder npc_sel PC Mux Inst Address imm6 /27/3 Fall Lecture #8 63 Single Cycle Datapath during Add 3 R[rd] = R[rs] + R[rt] 2 6 op rs rt rd shamt funct RegDst= rd RegWr= rs 5 5 busw npc_sel=+4 Rw imm6 rt Ra Rb RegFile 6 rt 5 ExtOp=x Extender busa busb instr fetch unit Src= 6 Rs Rt Rd Imm6 zero ctr=add MemtoReg= = Data In InstrucVon<3:> <2:25> <6:2> <:5> MemWr= WrEn Adr <:5> Data Memory /27/3 Fall Lecture #8 64

33 /29/3 InstrucVon Fetch Unit at End of Add PC = PC + 4 Same for all instrucvons except: Branch and Jump Inst Memory 4 PC Ext npc_sel=+4 Adder Adder PC Mux Inst Address imm6 /27/3 Fall Lecture #8 65 Single Cycle Datapath during OR Immediate 3 2 op rs rt immediate R[rt] = R[rs] OR ZeroExt[Imm6] RegDst= Rd RegWr= busw npc_sel= Rs 5 5 Rw imm6 Rt Ra Rb RegFile 6 Rt 5 ExtOp= Extender busa busb 6 instr fetch unit Rs Rt Rd Imm6 zero ctr= MemtoReg= Src= InstrucVon<3:> <2:25> = Data In <6:2> MemWr= <:5> WrEn Adr <:5> Data Memory /27/3 Fall Lecture #

34 /29/3 Single Cycle Datapath during OR Immediate 3 op rs rt immediate R[rt] = R[rs] OR ZeroExt[Imm6] RegDst= Rd RegWr= Rs 5 5 busw npc_sel=+4 Rw imm6 Rt Ra Rb RegFile 6 Rt 5 ExtOp=zero 2 Extender busa busb 6 instr fetch unit Rs Rt Rd Imm6 zero ctr=or MemtoReg= /27/3 Fall Lecture #8 67 Src= InstrucVon<3:> <2:25> = Data In <6:2> MemWr= <:5> WrEn Adr Data Memory <:5> Single Cycle Datapath during Load 3 op rs rt immediate R[rt] = Data Memory {R[rs] + SignExt[imm6]} RegDst= Rd RegWr= busw npc_sel= Rs 5 5 Rw imm6 Rt Ra Rb RegFile 6 Rt 5 ExtOp= 2 Extender busa busb 6 instr fetch unit Rs Rt Rd Imm6 zero ctr= MemtoReg= Src= InstrucVon<3:> <2:25> = Data In <6:2> MemWr= <:5> WrEn Adr Data Memory /27/3 Fall Lecture #8 68 <:5> Student RouleCe 34

35 /29/3 Single Cycle Datapath during Load 3 op rs rt immediate R[rt] = Data Memory {R[rs] + SignExt[imm6]} RegDst= Rd RegWr= Rs 5 5 busw npc_sel=+4 Rw imm6 Rt Ra Rb RegFile 6 Rt 5 ExtOp=sign 2 Extender busa busb 6 instr fetch unit Rs Rt Rd Imm6 zero ctr=add MemtoReg= Src= Instruction<3:> <2:25> = Data In <6:2> MemWr= <:5> WrEn Adr <:5> Data Memory /27/3 Fall Lecture #8 69 Single Cycle Datapath during Store 3 2 op rs rt immediate Data Memory {R[rs] + SignExt[imm6]} = R[rt] RegDst= Rd RegWr= busw npc_sel= Rs 5 5 Rw imm6 Rt Ra Rb RegFile 6 Rt 5 ExtOp= Extender busa busb 6 instr fetch unit Rs Rt Rd Imm6 zero ctr= MemtoReg= Src= InstrucVon<3:> <2:25> = Data In <6:2> MemWr= <:5> WrEn Adr <:5> Data Memory /27/3 Fall Lecture #8 7 35

36 /29/3 Single Cycle Datapath during Store 3 op rs rt immediate Data Memory {R[rs] + SignExt[imm6]} = R[rt] RegDst=x Rd RegWr= Rs 5 5 busw npc_sel=+4 Rw imm6 Rt Ra Rb RegFile 6 Rt 5 ExtOp=sign 2 Extender busa busb 6 instr fetch unit Rs Rt Rd Imm6 zero ctr=add MemtoReg=x Src= InstrucVon<3:> <2:25> = Data In <6:2> MemWr= <:5> WrEn Adr <:5> Data Memory /27/3 Fall Lecture #8 7 Single Cycle Datapath during Branch 3 op rs rt immediate if (R[rs] - R[rt] == ) then Zero = ; else Zero = RegDst= Rd RegWr= busw npc_sel= Rs 5 5 Rw imm6 Rt Ra Rb RegFile 6 Rt 5 ExtOp= 2 Extender busa busb 6 instr fetch unit Rs Rt Rd Imm6 zero ctr= MemtoReg= Src= InstrucVon<3:> <2:25> = Data In <6:2> MemWr= <:5> WrEn Adr <:5> Data Memory /27/3 Fall Lecture #

37 /29/3 Single Cycle Datapath during Branch 3 op rs rt immediate if (R[rs] - R[rt] == ) then Zero = ; else Zero = RegDst=x Rd RegWr= Rs 5 5 busw npc_sel=br Rw imm6 Rt Ra Rb RegFile 6 Rt 5 ExtOp=x 2 Extender busa busb 6 instr fetch unit Rs Rt Rd Imm6 zero ctr=sub MemtoReg=x Src= InstrucVon<3:> <2:25> = Data In <6:2> MemWr= <:5> WrEn Adr <:5> Data Memory /27/3 Fall Lecture #8 73 InstrucVon Fetch Unit at the End of Branch 3 2 op rs rt immediate if (Zero == ) then PC = PC SignExt[imm6]*4 ; else PC = PC + 4 npc_sel Zero imm6 4 PC Ext Adder Adder MUX npc_sel ctrl Mux Inst Memory Adr PC 6 InstrucVon<3:> What is encoding of npc_sel? Direct MUX select? Branch inst. / not branch Let s pick 2nd opvon npc_sel zero? MUX x Fall Lecture #8 Q: What logic gate? /27/

38 /29/3 4 Summary: Datapath s Control Signals ExtOp: zero, sign src: regb; immed ctr: ADD, SUB, OR PC Ext Adder Adder Inst Address npc_sel Mux PC RegDst RegWr busw Rd Rs 5 5 Rw imm6 Rt Ra Rb RegFile 6 ExtOp Rt 5 MemWr: write memory MemtoReg: ; Mem RegDst: rt ; rd RegWr: write register busa busb ctr MemtoReg MemWr /27/3 Fall Lecture #8 75 imm6 Extender Src Data In WrEn Adr Data Memory Agenda Timing and State Machines Datapath Elements: Mux + MIPS- lite Datapath CPU Timing MIPS- lite Control And, in Conclusion, /29/3 Fall Lecture #

39 /29/3 And. in Conclusion, Single- Cycle Processor Use muxes to select among input S input bits selects 2 S inputs Each input can be n- bits wide, independent of S Can implement muxes hierarchically ArithmeVc circuits are a kind of combinavonal logic Processor Control Datapath Memory Input Output Five steps to processor design:. Analyze instrucvon set à datapath requirements 2. Select set of datapath components & establish clock methodology 3. Assemble datapath meevng the requirements 4. Analyze implementavon of each instrucvon to determine sewng of control points that effects the register transfer. 5. Assemble the control logic Formulate Logic EquaVons Design Circuits /27/3 Fall Lecture #

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 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

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

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

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

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 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

add rd, rs, rt Review: A Single Cycle Datapath We have everything Lecture Recap: Meaning of the Control Signals

add rd, rs, rt Review: A Single Cycle Datapath We have everything Lecture Recap: Meaning of the Control Signals CS6C L27 Single-Cycle CPU Control () inst.eecs.berkeley.edu/~cs6c UC Berkeley CS6C : Machine Structures Lecture 26 Single-cycle CPU Control 27-3-2 Ehausted TA Ben Sussman www.icanhascheezburger.com Qutrits

More information

361 multipath..1. EECS 361 Computer Architecture Lecture 10: Designing a Multiple Cycle Processor

361 multipath..1. EECS 361 Computer Architecture Lecture 10: Designing a Multiple Cycle Processor 36 multipath.. EECS 36 Computer Architecture Lecture : Designing a Multiple Cycle Processor Recap: A Single Cycle Datapath We have everything except control signals (underline) Today s lecture will show

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

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

ECE 361 Computer Architecture Lecture 11: Designing a Multiple Cycle Controller. Review of a Multiple Cycle Implementation

ECE 361 Computer Architecture Lecture 11: Designing a Multiple Cycle Controller. Review of a Multiple Cycle Implementation ECE 6 Computer Architecture Lecture : Designing a Multiple Cycle ler 6 multicontroller. Review of a Multiple Cycle Implementation The root of the single cycle processor s problems: The cycle time has to

More information

CS 110 Computer Architecture Review Midterm II

CS 110 Computer Architecture Review Midterm II CS 11 Computer Architecture Review Midterm II http://shtech.org/courses/ca/ School of Information Science and Technology SIST ShanghaiTech University Slides based on UC Berkley's CS61C 1 Midterm II Date:

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

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

CpE 442. Designing a Multiple Cycle Controller

CpE 442. Designing a Multiple Cycle Controller CpE 442 Designing a Multiple Cycle Controller CPE 442 multicontroller.. Outline of Today s Lecture Recap (5 minutes) Review of FSM control (5 minutes) From Finite State Diagrams to Microprogramming (25

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

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

ECE468 Computer Organization and Architecture. Designing a Multiple Cycle Controller

ECE468 Computer Organization and Architecture. Designing a Multiple Cycle Controller ECE468 Computer Organization and Architecture Designing a Multiple Cycle Controller ECE468 multicontroller Review of a Multiple Cycle Implementation The root of the single cycle processor s problems: The

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

ECE 361 Computer Architecture Lecture 10: Designing a Multiple Cycle Processor

ECE 361 Computer Architecture Lecture 10: Designing a Multiple Cycle Processor ECE 6 Computer Architecture Lecture : Designing a Multiple Cycle Processor 6 multipath.. Recap: A Single Cycle Datapath We have everything except control signals (underline) RegDst Today s lecture will

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

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

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

ECE4680. Computer Organization and Architecture. Designing a Multiple Cycle Processor

ECE4680. Computer Organization and Architecture. Designing a Multiple Cycle Processor ECE68 Computer Organization and Architecture Designing a Multiple Cycle Processor ECE68 Multipath. -- op 6 Instr RegDst A Single Cycle Processor busw RegWr Main imm6 Instr Rb -bit Registers 6 op

More information

ECE468. Computer Organization and Architecture. Designing a Multiple Cycle Processor

ECE468. Computer Organization and Architecture. Designing a Multiple Cycle Processor ECE68 Computer Organization and Architecture Designing a Multiple Cycle Processor ECE68 multipath.. op 6 Instr RegDst A Single Cycle Processor busw RegWr Main imm6 Instr Rb -bit Registers 6 op RegDst

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

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

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

ECE4680. Computer Organization and Architecture. Designing a Multiple Cycle Processor

ECE4680. Computer Organization and Architecture. Designing a Multiple Cycle Processor ECE468 Computer Organization and Architecture Designing a Multiple Cycle Processor ECE468 Multipath. -- Start X:4 op 6 Instr RegDst A Single Cycle Processor busw RegWr Clk Main imm6 Instr Rb -bit

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

Midterm I March 1, 2001 CS152 Computer Architecture and Engineering

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

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

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

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

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

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

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

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

ECE4680 Computer Organization and Architecture. Designing a Pipeline Processor

ECE4680 Computer Organization and Architecture. Designing a Pipeline Processor ECE468 Computer Organization and Architecture Designing a Pipeline Processor Pipelined processors overlap instructions in time on common execution resources. ECE468 Pipeline. 22-4-3 Start X:4 Branch Jump

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

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

Final Exam Spring 2017

Final Exam Spring 2017 COE 3 / ICS 233 Computer Organization Final Exam Spring 27 Friday, May 9, 27 7:3 AM Computer Engineering Department College of Computer Sciences & Engineering King Fahd University of Petroleum & Minerals

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

1048: Computer Organization

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

More information

CS152 Computer Architecture and Engineering. Lecture 8 Multicycle Design and Microcode John Lazzaro (www.cs.berkeley.

CS152 Computer Architecture and Engineering. Lecture 8 Multicycle Design and Microcode John Lazzaro (www.cs.berkeley. CS152 Computer Architecture and Engineering Lecture 8 Multicycle Design and Microcode 2004-09-23 John Lazzaro (www.cs.berkeley.edu/~lazzaro) Dave Patterson (www.cs.berkeley.edu/~patterson) www-inst.eecs.berkeley.edu/~cs152/

More information

Fundamentals of Computer Systems

Fundamentals of Computer Systems Fundamentals of Computer Systems Single Cycle MIPS Processor Stephen. Edwards Columbia University Summer 26 Illustrations Copyright 27 Elsevier The path The lw The sw R-Type s The beq The Controller Encoding

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

CPSC614: Computer Architecture

CPSC614: Computer Architecture CPSC614: Computer Architecture E.J. Kim Texas A&M University Computer Science & Engineering Department Assignment 1, Due Thursday Feb/9 Spring 2017 1. A certain benchmark contains 195,700 floating-point

More information

Outline of today s lecture. EEL-4713 Computer Architecture Designing a Multiple-Cycle Processor. What s wrong with our CPI=1 processor?

Outline of today s lecture. EEL-4713 Computer Architecture Designing a Multiple-Cycle Processor. What s wrong with our CPI=1 processor? Outline of today s lecture EEL-7 Computer Architecture Designing a Multiple-Cycle Processor Recap and Introduction Introduction to the Concept of Multiple Cycle Processor Multiple Cycle Implementation

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

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. Chapter 4. The Processor COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor The Processor? Chapter 4 The Processor 2 Introduction We will learn How the ISA determines many aspects

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

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 3: The Processor (Chapter 4 of textbook) Chapter 4.1

Lecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1 Lecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1 Introduction Chapter 4.1 Chapter 4.2 Review: MIPS (RISC) Design Principles Simplicity favors regularity fixed size instructions small number

More information

Lecture 9. Pipeline Hazards. Christos Kozyrakis Stanford University

Lecture 9. Pipeline Hazards. Christos Kozyrakis Stanford University Lecture 9 Pipeline Hazards Christos Kozyrakis Stanford University http://eeclass.stanford.edu/ee18b 1 Announcements PA-1 is due today Electronic submission Lab2 is due on Tuesday 2/13 th Quiz1 grades will

More information