https://d2vlcm61l7u1fs.cloudfront.net/media%2Ffd8%2Ffd8dd2ee-4083-4251-b78b-f9c9
ID: 3812735 • Letter: H
Question
https://d2vlcm61l7u1fs.cloudfront.net/media%2Ffd8%2Ffd8dd2ee-4083-4251-b78b-f9c9d333a6c7%2Fphp199Ule.png
The basic single-cycle MIPS processor in the above figure only implements some instructions. We want to add a new instruction (andi $t1, $t2, imm-value) to an existing ISA.
• Which existing components (if any) can be used for the new instruction?
• Which new components (if any) do we need for this instruction?
• What new signals do we need (if any) from the control unit to support this instruction?
Explanation / Answer
Which existing components (if any) can be used for the new instruction?
This instruction uses instruction memory, both existing read ports of Registers, the ALU, and
the write port of Registers.
This instruction uses the instruction memory, one of the existing register read ports, the path
that passed the immediate to the ALU, and the register write port
Which new components (if any) do we need for this instruction?
Another read port in Registers (to read Rx) and either a second ALU (to add Rx to Rs + Rt) or a
third input to the existing ALU.
We need to extend the existing ALU to also do shifts (adds a SLL ALU operation).
What new signals do we need (if any) from the control unit to support this instruction?
ALUMux is the control signal that controls the Mux at the ALU input, 0 (Reg)
selects the output of the register fi le and 1 (Imm) selects the immediate from the
instruction word as the second input to the ALU.
RegMux is the control signal that controls the Mux at the Data input to the register
fi le, 0 (ALU) selects the output of the ALU and 1 (Mem) selects the output of
memory.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.