IDRASAcademic OS
COA100% Active LaboratorySIMULATION

5-Stage RISC Pipeline Hazard & Forwarding Unit Laboratory

Cycle-by-cycle clock execution grid across IF, ID, EX, MEM, WB pipeline stages. Visualizes Read-After-Write (RAW) data hazards, forwarding bypass multiplexers, and load-use stall bubbles.

COA • SIMULATION5-Stage RISC Pipeline Hazard & Forwarding Unit Laboratory
COA • CPU ARCHITECTURE5-Stage Classic RISC

5-Stage Pipeline Hazard & Forwarding Unit Laboratory

CLOCK CYCLE:T1of 12
Space-Time Pipeline Execution MatrixVertical: Instructions | Horizontal: Clock Cycles
InstructionT1T2T3T4T5T6T7T8T9T10T11T12
ADD R1, R2, R3IF
IFIDEXMEMWB·······
SUB R4, R1, R5
·IFIDEXMEMWB······
AND R6, R1, R7
··IFSTALLIDEXMEMWB····
OR R8, R4, R1
···IFSTALLIDEXMEMWB···
LW R9, 0(R8)
····IFIDEXMEMWB···
ADD R10, R9, R2
·····IFIDEXMEMWB··
StageIF
ADD R1, R2, R3
StageID
Idle / Bubble
StageEX
Idle / Bubble
StageMEM
Idle / Bubble
StageWB
Idle / Bubble
Hazard Analysis:

Forwarding Unit ACTIVE: Data hazards between consecutive ALU instructions (e.g. R1 written by ADD and read by SUB) are resolved without any stalls by forwarding the ALU output from EX/MEM latch directly into the ALU input multiplexer! Notice how instruction 6 (ADD R10, R9, R2) still requires 1 stall bubble because Load-Use hazard data is only ready after the MEM stage.

Want a step-by-step breakdown from our 4 AI Engineering Agents?
Mastery Standard: Complete all 3 tasks in the Lab Protocol to earn verified mastery credits.
Study Full Unit Notes →