The Datapath Andreas Klappenecker CPSC321 Computer Architecture.
Published byModified over 4 years ago
Presentation on theme: "The Datapath Andreas Klappenecker CPSC321 Computer Architecture."— Presentation transcript:
The Datapath Andreas Klappenecker CPSC321 Computer Architecture
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
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
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
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
Requirements of the Instruction Set Memory Register file PC Sign extender ALU Add 4 to increase PC
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
Datapath for a Branch Use ALU to evaluate the branch condition, another adder for branch target = PC + 4 + (sign extended 16 bits)>>2
Marrying Branches with Rest Output of Sign extend goes where? Output of PC adder goes where?
Datapath for MIPS instructions Seven control signals
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
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
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