Chapter 04 RISC V Removed
Chapter 04 RISC V Removed
◼ In RISC-V pipeline
◼ Need to compare registers and compute
target early in the pipeline
◼ Add hardware to do it in ID stage
MEM
Right-to-left WB
flow leads to
hazards
Wrong
register
number
ForwardB = 00 ID/EX The second ALU operand comes from the register
file.
ForwardB = 10 EX/MEM The second ALU operand is forwarded from the prior
ALU result.
ForwardB = 01 MEM/WB The second ALU operand is forwarded from data
memory or an earlier ALU result.
Stall inserted
here
Flush these
instructions
(Set control
values to 0)
PC
Hold pending
operands