Added data forwarding to the Execute stage to reduce the number of NOPs needed between dependent instructions.
| Version | NOPs Needed | Cycles to Finish |
|---|---|---|
| Without forwarding | 15 NOPs | ~20 cycles |
| With forwarding | 2 NOPs | ~14 cycles |
execute.v— forwarding unit addedidExLatch.v— added rs field pass-throughdecode.v— added rs output portmips_pipeline.v— wired forwarding signals
FINAL REGISTERS: r1=12 r2=2 r3=3
PASS: r1 is 12 as expected.