CPU Pipeline
Cycle 0 CPI DATA HAZ BRANCH FLUSH LOAD-USE
Instruction
Bubble
Hazard
Instructions — edit and press Reset
Registers R0–R7
Memory (16 words)
Statistics
Cycles
0
Issued
0
Stalls
0
Flushes
0
Forwards
0
CPI
Event Log

CPU Pipeline Simulator

5-stage in-order pipeline with hazard detection & forwarding

The 5 Stages

IF Instruction Fetch → ID Decode & Register Read → EX Execute (ALU) → MEM Memory Access → WB Write Back

Hazards Simulated

Instruction Set

InstructionSyntaxSemantics
ADDADD Rd, Rs1, Rs2Rd = Rs1 + Rs2
SUBSUB Rd, Rs1, Rs2Rd = Rs1 - Rs2
MULMUL Rd, Rs1, Rs2Rd = Rs1 × Rs2
LOADLOAD Rd, imm(Rs)Rd = MEM[Rs + imm]
STORESTORE Rs, imm(Rb)MEM[Rb + imm] = Rs
BEQBEQ Rs1, Rs2, labelif Rs1 == Rs2: jump to label
NOPNOPNo operation (1 cycle)

How to Use