Question: Modify the single-cycle datapath by implementing the push instruction. The instruction below pushes register t0 on the stack. Notice that the rs field encodes register
Modify the single-cycle datapath by implementing the push instruction. The instruction below pushes register t0 on the stack. Notice that the rs field encodes register sp and that the immediate value is equal to 4.
The stack in MIPS is a full descending stack. Therefore, in the push operation, the register is written to memory address (sp-4), then the value of (sp-4) is written to register sp.
push $t0
| unique | sp | t0 | 4 |
| opcode | rs | rt | immediate |
a) Explain the functional form of the instruction based on the register names.
b) Explain the functional form based on the instruction fields.
c) Draw the changes on the datapath diagram and highlight them so they're visible
d) Give the values of the control signals
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
