{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

sol3 - CS151B/EE116C Solutions to Homework#3 Problem(1 0 6...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CS151B/EE116C – Solutions to Homework #3 Problem (1) jr rs 0 rs 0 0x8 6 5 15 6 0x8 = 001000 Instruction jr has the same opcode as R-type instructions. However, jr can be distinguished from the other implemented R-type instructions based on the most significant bit of the funct field. Specifically, bit 5 of the jr instruction is 0 while, as shown in Figure 4.12, bit 5 of all the implemented R-type instructions is 1. Thus, bit 5 from the output of the instruction memory must be a new input to the main part of the control unit. A) Modifications to the datapath: Add a new multiplexor to determine whether the next PC value will be as before (the output of the PCSrc MUX) or the value of register R[Rs]. Bit 5 from the instruction memory must be connected to the main part of the control unit. (see next page) B) jrc (jr control) – controls the new multiplexor. C) R lw sw beq jr Op5 Op4 Op3 Op2 Op1 Op0 IR[5] RegDst ALUSrc MemtoReg RegWrite MemRead MemWrite Branch ALUOp1 ALUOp0 jrc
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon