Presentation is loading. Please wait.

Presentation is loading. Please wait.

Datapath & Control MIPS

Similar presentations


Presentation on theme: "Datapath & Control MIPS"— Presentation transcript:

1 Datapath & Control MIPS
Section 5 12/1/2018 2:15 PM

2 Microprocessor Two components: Datapath Control Unit 12/1/2018 2:15 PM

3 Two Types of Circuits Combinational circuits Sequential circuits
12/1/2018 2:15 PM

4 Clocking 12/1/2018 2:15 PM

5 MIPS Datapath 12/1/2018 2:15 PM

6 MIPS Datapath add $s1, $s2, $s3 12/1/2018 2:15 PM

7 MIPS Datapath lw $s1, 8( $s2) 12/1/2018 2:15 PM

8 MIPS Datapath sw $s1, 8( $s2) 12/1/2018 2:15 PM

9 MIPS Datapath 12/1/2018 2:15 PM

10 MIPS Datapath 12/1/2018 2:15 PM

11 DP for R-type & Memory Instr.
Figure 5.10 12/1/2018 2:15 PM

12 Datapath for Instruction Fetch
Figure 5.6 12/1/2018 2:15 PM

13 Datapath for Branches BEQ $s1, $s2, 25 WHY? Figure 5.9
12/1/2018 2:15 PM

14 Immediate address is 16 bits
Datapath for Branches × 4 Immediate address is 16 bits Figure 5.9 12/1/2018 2:15 PM

15 Almost Complete MIPS Datapath
lw, sw, beq, add, sub, and, or, set on less than Figure 5.11 12/1/2018 2:15 PM

16 Control Unit Designing the control unit. 12/1/2018 2:15 PM

17 ALU Control Instruction OP Function Field ALU op LW 35 100011 add SW
43 101011 BEQ 4 000100 subtract ADD 000000 32 100000 SUB 34 100010 AND 36 100100 and OR 37 100101 or SLT 42 101010 set on less than 12/1/2018 2:15 PM

18 ALU Control Instruction ALUOp Funct. Field ALU action ALU select LW 00
xxxxxx add 0010 SW BEQ 01 subtract 0110 ADD 10 xx0000 SUB xx0010 AND xx0100 and 0000 OR xx0101 or 0001 SLT xx1010 set on less than 0111 Do add. Independent of the Function field. 12/1/2018 2:15 PM

19 ALU Control Instruction ALUOp Funct. Field ALU action ALU select LW 00
xxxxxx add 0010 SW BEQ 01 subtract 0110 ADD 10 xx0000 SUB xx0010 AND xx0100 and 0000 OR xx0101 or 0001 SLT xx1010 set on less than 0111 Do subtract. Independent of the Function field. 12/1/2018 2:15 PM

20 ALU Control Instruction ALUOp Funct. Field ALU action ALU select LW 00
xxxxxx add 0010 SW BEQ 01 subtract 0110 ADD 10 xx0000 SUB xx0010 AND xx0100 and 0000 OR xx0101 or 0001 SLT xx1010 set on less than 0111 Operation dependent on the Function field. 12/1/2018 2:15 PM

21 ALU Control Circuit 12/1/2018 2:15 PM

22 The Three Instruction Classes
R-type – add, sub, and, or, slt. I-type – lw, sw, beq. op rs rt rd shift funct 31:26 25:21 20:16 15:11 10:6 5:0 op rs rt address 31:26 25:21 20:16 15:0 12/1/2018 2:15 PM

23 The Three Instruction Classes
R-type – add, sub, and, or, slt. I-type – lw, sw, beq. Destination op rs rt rd shift funct 31:26 25:21 20:16 15:11 10:6 5:0 Registers to read op rs rt address 31:26 25:21 20:16 15:0 Destination for lw 12/1/2018 2:15 PM

24 More Complete Datapath
12/1/2018 2:15 PM

25 More Complete Datapath
12/1/2018 2:15 PM

26 Control Signals for R-type
12/1/2018 2:15 PM

27 Control Signals for R-type
12/1/2018 2:15 PM

28 Control Signals for lw 12/1/2018 2:15 PM

29 Control Signals for branch
12/1/2018 2:15 PM

30 Control Truth Table InstrOp RegDst ALUSrc Mem2Reg RegWr MemRead MemWr
Branch ALUOp R-fmt 000000 1 10 lw 100011 00 sw 101011 x beq 000100 01 12/1/2018 2:15 PM

31 Control Circuit 12/1/2018 2:15 PM

32 The Third Instruction Class J
J-type – jump. op address 31:26 25:0 000010 12/1/2018 2:15 PM

33 Jump Instruction 12/1/2018 2:15 PM

34 Single-Cycle Implementation
12/1/2018 2:15 PM

35 Multi-Cycle Implementation
Fetch Decode and register fetch Execution, memory address computation or branch completion Memory access or R-type completion Memory read completion 12/1/2018 2:15 PM

36 Multi-Cycle Implementation
12/1/2018 2:15 PM

37 Multi-Cycle Implementation
12/1/2018 2:15 PM

38 Finite State Machine (FSM)
12/1/2018 2:15 PM

39 Memory reference FSM 12/1/2018 2:15 PM

40 R-type FSM 12/1/2018 2:15 PM

41 Branch FSM 12/1/2018 2:15 PM

42 Jump FSM 12/1/2018 2:15 PM

43 Partial MIPS Instructions
OP (6) rs (5) rt (5) rd (5) shamt (5) funct (6) LW 35 rs rd offset SW 43 BEQ 4 rt ADD 32 SUB 34 AND 36 OR 37 SLT 42 ADDI 8 imm OUT 63 * All numbers are in decimal. 12/1/2018 2:15 PM


Download ppt "Datapath & Control MIPS"

Similar presentations


Ads by Google