Pipeline Stage Table

NameAction
LoadStoreALUBranch
1Instruction Fetch (IF)
 IR <- Mem[PC]
NPC <- PC + 4
      
2Instruction decode/register fetch (ID)
  A <- Regs[IR6..10]
  B <- Regs[IR11..15]
Imm <- sign-extend(IR16..31)
      
3Execution/effective address (EX)
ALUOut <- A + Imm
      
ALUOut <- A op B
      or
ALUOut <- A op Imm
      
ALUOut <- NPC + Imm
  Cond <- (A op 0)
      
4Memory access/branch completion (MEM)
LMD <- Mem[ALUOut]
      
Mem[ALUOut] <- B
      
idle
if (cond)
  PC <- ALUOut
else
  PC <- NPC
      
5Write-back (WB)
Regs[IR11..15] <- LMD
      
idle
Regs[IR16..20] <- ALUOut
      or
Regs[IR11..15] <- ALUOut
      
idle

Michael J. O'Donnell
Last modified: Thu Feb 12 22:56:40 CST