Reputation: 1
Hey to everyone I am trying to understand 5 stage pipeline MIPS with forwarding unit So I found a problem which has raw data hazards The problem is the following :
Ι1 and $1, $1, $2
Ι2 add $2, $1, $2
Ι3 lw $2, –20($3)
Ι4 sub $4, $2, $4
Dependencies : (Ι1, Ι2, $1) , (Ι3, Ι4, $2)
the pipeline with hazards is the following :
The solution of the forwarding unit is :
But I could not understand why forwarding unit store data from (EX to EX , WB to EX) And not to WB to ID for these two dependencies Also why we have to use a NOP instruction between I3 and I4 instruction
My solution is the following :
Upvotes: 0
Views: 149