The following code is executed in the basic 5 stage pipeline, we assume that each cycle tkaes 8 ns and the BEQ is not taken.
Loop: DADD R1, R2, R3
LW R4, 0 (R1)
BEQ R4, R3, end
SW R3, 4 (R1)
DADD R2, R2, 8
J loop .
end: ....
a.How long would one iteration take in an ideal pipelined processor (i.e , no delays/stalls between instructions)?
b. Considering hazards, how long would one loop iteration take without and with forwarding