For the load, the instruction in the IF/ID pipeline register supplies the write register number, yet the register number is overwritten by the following instructions.Hence, we need to preserve the destination register number in the load instruction. Just as store passed the register contents from the ID/EX to the EX/MEM pipeline registers for use in the MEM stage, load must pass the register number from the ID/EX through EX/MEM to the MEM/WB pipeline register for use in the WB stage. The following figure shows the corrected pipelined datapath to handle the load instruction properly.
Q: Why didn’t the Invisible Man get invited to the Halloween party? A: They knew he wouldn’t show up. |