We now examine in detail how the basic pipeline CPU executes the store instruction.
The instruction is encoded as follows:
Br Cond ------ LD ST BRA Opcode Im Cen <-- Dest -> <- Src1 --> <-- Src2 -> +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+Notice that the Cen (C-enable) bit in the store instruction is always set to 0 (we are NOT writing to a register, but to memory !)
The instruction is encoded as follows:
Br Cond ------ LD ST BRA Opcode Im Cen <-- Dest -> <- Src1 --> <-- Src2 -> +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
Stall the IF stage when the instruction in the MEM stage is a STORE
instruction
(this fact can be recognized from the ST bit in the instruction) |