Data hazard - solution (contd.)
The results need to forwarded not only from the immediately previous instruction but also from any instruction that started upto three cycles before.
The result from EX/MEM (1 cycle before) and MEM/WB (2 cycles before) are forwarded to the both ALU inputs.
Writing into the register file is done in the first half of the cycle and read is done in the second half.(3 cycles before)