Reading a register value is asynchronous, whereas in an architecture that you work in your class, registers are written synchronously (i.e., records are triggered at the edges).
This means that you can read the current value of the register, apply some operation to it (for example, add a little immediate) and write the result on the next rising edge of synchronization.
Suppose you want to issue addiu $1, $1, 123 , that is, take the current value of $1 , add 123, and save the result to $1 .
At the beginning of the clock cycle, the control unit must instruct the register file to place the contents of $ 1 on one of the data buses that fall into the ALU. the control unit will also instruct to immediately connect 123 to another data bus, which also falls into the ALU. The appendix, which is a combinatorial circuit implemented inside the ALU, will calculate the addition and put the result on the data bus that connects the register file for storage. All this is done before the rising edge of the clock occurs, and the result of the addition will be presented to the next rising edge. At some point, the rise front arises, and the result of the addition is now written back to the register $1 .
source share