lecture9.pptx

Data Forwarding

  1. We can take from ALU output to ALU input
  2. Or from memory to ALU input

Add a NOP, forward from after memory to ALU

Control Hazards

We need to stall at the decode stage, then stall for 3 cycles to wait until PC is updated.

(Wait after memory stage since that’s when PC is updated.)