Solution :
Given :
a). ADD
![$R1,R2,R1$](https://img.qammunity.org/2022/formulas/engineering/college/s1dhxtsylvx6i0plux5ik0vzw9bfl80avb.png)
LW
![$R2, 0(R1)$](https://img.qammunity.org/2022/formulas/engineering/college/3m54592b46mzdg39pcmqjm5cidbgryqmgb.png)
LW
![$R1, 4(R1)$](https://img.qammunity.org/2022/formulas/engineering/college/6b0ch35v8636leek7f5c3lilm1jdyf43k7.png)
OR
![$R3,R1,R2$](https://img.qammunity.org/2022/formulas/engineering/college/elcd245in9w055x4hrp7f3div6fbrtp4jf.png)
Without forwarding
Only the RAW dependencies can cause data hazards.
The dependencies are :
RAW dependency between instruction 1 and 2 on R1
RAW dependency between instruction 1 and 3 on R1
RAW dependency between instruction 3 and 4 on R1
RAW dependency between instruction 2 and 4 on R2
With forwarding
The result after the execution phase of first instruction is forwarded to second instruction.
So there would not be any dependencies among instruction 1 and 2 and also 1 and 3.
With forwarding the RAW dependencies that can exit only from load to next instruction.
So the dependencies that exit is only between 3 and 4.
The dependencies are RAW dependencies between instruction 3 and 4 on R1.
b). LW
![$R1,0(R1)$](https://img.qammunity.org/2022/formulas/engineering/college/myjko60tpltegcanrvyowwaj7u8ty0je66.png)
AND
![$R1,R1,R2$](https://img.qammunity.org/2022/formulas/engineering/college/ttpeervam4dh2xk1f8xfqfgnasln39fotc.png)
LW
![$R2,0(R1)$](https://img.qammunity.org/2022/formulas/engineering/college/gtvhi6ne0l5l8bncoieaocztyzmtkwtika.png)
LW
![$R1,0(R3)$](https://img.qammunity.org/2022/formulas/engineering/college/s3w46skjmvi73nvwvaji0c9qh6jltk9wo9.png)
Only RAW dependencies can cause data hazards
The dependencies are
RAW dependency between instruction 1 and 2 on R1
RAW dependency between instruction 1 and 3 on R1
RAW dependency between instruction 2 and 3 on R1
With forwarding
The result after the execution phase of second instruction is forwarded to third instruction.
So there won't be RAW dependencies among instruction 2 and 3.
With forwarding the RAW dependencies that can exist only from load to next instruction.
So dependencies that exists is only between 1 and 2.
Therefore dependencies are RAW dependency between instruction 1 and 2 on R1.