Assume the processor executes the following instruction sequence.
and $t1, $t4, $t5
and $t4, $t1, $t3
add $t1, $t1, $t4
beq $t1, $t3, BranchTo
Assume there is full forwarding (from EX/MEM register and from MEM/WB register). Indicate remaining hazards and insert nop instructions to eliminate them.
using Full Forwarding .
I1:and $t1, $t4, $t5
I2:and $t4, $t1, $t3
I3:add $t1, $t1, $t4
I4:beq $t1, $t3, BranchTo
value of register $t1 is forwarded from instruction I1 to I2
(Resolving hazard using Forwarding)
value of register $t1 is forwarded from instruction I1 to I3 and
value of register $t4 is forwarded from instruction I2 to
I3(Resolving hazards using Forwarding)
value of register $t1 is forwarded from instruction I3 to I4
(Resolving hazard using Forwarding)
There is No any remaining Hazard.
No nop instruction needed
Get Answers For Free
Most questions answered within 1 hours.