0
Good afternoon, everybody! All right?
I’m having doubts about how to implement push instruction in the RISCV pipeline (I’ll put it below). This can be done by including new wires, increasing multiplexer width, inserting new multiplexers, creating new control signals, including signals with constant values. This push instruction is the instruction that saves the value of a register to the stack and updates the stack pointer. The equivalent code for push X5 in Assembly is:
Addi sp, sp, -4 sw X5, 0 (sp)
The pipeline is this:
I started trying to add more multiplexers to be able to perform the sum operation, but I’m not sure how to continue. Someone could help me?