Consider following program is executed on a 5 stage RISC pipeline and stages are IF, ID, EX, MA, WB.
IF = Instruction Fetch
ID = Instruction Decode and fetch register
EX = Execution Stage
MA = Memory Access
WB = Write back register file
Program:-
I1) ADD R0, R1 R2
I2) ADD R3, R0 R4
I3) ADD R10, R0 R5
I4) ADD R11, R0 R6
I5) ADD R12, R0 R7
I6) ADD R13, R0 R8
I7) ADD R14, R0 R9
Calculate the number of RAW dependency and Hazards.(There is no Structural Dependency)
My Answers -> Dependencies = 6, hazards = 3.
Someone verify these answer.