next up previous
Next: Halting Up: Miscellaneous Previous: Memory


NOP Instruction

The MIPS ISA does not include an explicit NOP (null operation) instruction, so neither does our reduced MIPS ISA. However, the NOP instruction is needed to initialize all the instruction fields of the pipeline register data structures, and to replace or ``squash'' those instructions in the pipeline following a branch misprediction. In your simulator, you will use the ``add 0 0 0'' instruction as a NOP instruction (since this instruction does not effect any state). We have already declared this as NOPINSTRUCTION and used it in the initialization code.



MM Hugue 2011-09-24