Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Datapath Andreas Klappenecker CPSC321 Computer Architecture.

Similar presentations


Presentation on theme: "The Datapath Andreas Klappenecker CPSC321 Computer Architecture."— Presentation transcript:

1 The Datapath Andreas Klappenecker CPSC321 Computer Architecture

2 Administrative Issues WebCT: news, chat, grades https://webct.tamu.edu Quantum Computing Seminar Chance to make $356 Fair Scholarship in Telecommunications $1000 for five qualified students in Computer Science or Comp. Eng. (CPSC) Computer Science Logo Contest $1000 for best logo

3 Administrative Issues Talk by David Patterson Friday, October 10, 4:10pm, HRBB 124 Project 0 due October 10 Exam, October 17 Invited Admissions for UGrads

4 Goal of this lecture Create a single datapath for lw, sw beq (j later) add, sub, and, or, slt Our line of attack We recall datapaths of these operations and compose their datapaths

5 Instruction Word Formats Register format Immediate format Jump format op-code rs rt rd shamt funct op-code rs rt immediate value op-code 26 bit current segment address 6 55 16 6 555 5 6 6 26

6 Requirements of the Instruction Set Memory Register file PC Sign extender ALU Add 4 to increase PC

7 Hardware components

8 Instruction Fetch + PC update

9 R-Format Instructions Register format op-code rs rt rd shamt funct 6 555 5 6

10 Datapath for a load and store 1. register access 2. memory access calculation 3. read or write from memory 4. in the case of a load, write into register file

11 Marrying two Datapaths

12 Datapaths for Instruction Fetch, Memory and R-type Instructions xtend ALU result Zero ALU Address RegWrite ALU operation 3 MemRead MemWrite ALUSrc MemtoReg xtend ALU result Zero ALU Address RegWrite ALU operation 3 MemRead MemWrite ALUSrc MemtoReg xtend ALU result Zero ALU Address RegWrite ALU operation 3 MemRead MemWrite ALUSrc MemtoReg Note the added multiplexor switching between register 2 and sign-extended immediate value

13 Datapath for a Branch Use ALU to evaluate the branch condition, another adder for branch target = PC + 4 + (sign extended 16 bits)>>2

14 Marrying Branches with Rest Output of Sign extend goes where? Output of PC adder goes where?

15 Datapath for MIPS instructions Seven control signals

16 ALU Control For load and store instructions Use ALU to compute memory address by addition (add immediate value) For R-type instructions Perform addition, subtraction, and, or, slt value depends on 6bit function field For beq perform subtraction

17 ALU Control Logic (Recall ALU) ALU cntrlFunction 000and 001or 010add 110subtract 111slt Depending on instruction, the ALU has to perform one of the five operations

18 Must describe hardware to compute 3-bit ALU control input ALU control bits depend on ALUOp control bits and different functions codes for R-type instructions ALU Control

19

20 Datapath for MIPS instructions Note the seven control signals!

21 Generating Control Signals Opcode field of instruction yields control signals and ALUOp signals

22 Control

23 Summary


Download ppt "The Datapath Andreas Klappenecker CPSC321 Computer Architecture."

Similar presentations


Ads by Google