# Data Hazard in Pipelining

To be precise I am here for RAW hazard. Consider a 5 stage pipeline .

In case of $$I_4-I_1$$ dependency , I am not sure if it is an $$RAW$$ hazard as $$I_4$$ does not depends on value of $$R_1$$ that $$I_1$$ gives. and even if it fetches it ,it still be a wrong value as per the instruction sequence as $$I_2$$ is modifying it.

So , is $$I_4-I_1$$ a $$RAW$$ hazard ?
and if yes, then please give suitable explanation why so and related information about $$RAW$$ hazard as it happened even if $$I_2$$ modified the Value in between .

• We can't say without knowing number of stages used in pipeline. If stages are not more than 3, it's not RAW – Mr. Sigma. Dec 31 '18 at 12:50
• In 5 stage pipeline ? ( edited ) – CHETAN RAJPUT Dec 31 '18 at 13:05
• What my concern is , R1 is modified by I2 then why still I4-I2 on R1 is a hazard ? – CHETAN RAJPUT Dec 31 '18 at 13:07

We can't say without knowing number of stages used in pipeline. If stages are not more than $$3$$, it's not RAW.