In a 5-stage classic RISC pipeline (IF, ID, EX, MEM, WB), a data hazard that cannot be resolved by forwarding/bypassing occurs in which of the following instruction sequences?
This is a classic load-use hazard. In the LW (Load Word) instruction, the data is fetched from memory during the MEM stage. The subsequent ADD instruction needs this data for its EX (Execute) stage. By the time the ADD reaches its EX stage, the LW instruction is only in its MEM stage. The data from memory is not yet available to be forwarded back to the ALU input. This requires the pipeline to stall for one cycle.