2 votes 2 votes Find total number of RAW hazards. Doubt: Should I4 - I5 be counted or not ? CO and Architecture co-and-architecture hazards + – just_bhavana asked Aug 27, 2017 retagged Nov 13, 2017 by Arjun just_bhavana 1.6k views answer comment Share Follow See all 12 Comments See all 12 12 Comments reply Shubhanshu commented Aug 27, 2017 reply Follow Share is it 3? 0 votes 0 votes rahul sharma 5 commented Aug 27, 2017 reply Follow Share It should be 5 1-2 (R0) 1-4 (R0) 2-3 (ACC) 2-4 (ACC) 4-5 (ACC) 3 votes 3 votes just_bhavana commented Aug 27, 2017 reply Follow Share I'm getting 6 in all @rahul you didn't consider 2-5 0 votes 0 votes rahul sharma 5 commented Aug 27, 2017 reply Follow Share I dont think we need them as. As the 5th instruction will have dependency on 4th instruction for ACC.So this cannot be possible hazard Because RAW hazard can occur only inorder sequence but WAW and WAR can occur only in out of order sequence.So if we consider 5 will try to read ACC from 4 and not 2 as 4 is executed before 5 0 votes 0 votes rahul sharma 5 commented Aug 27, 2017 reply Follow Share See this is already answered https://gateoverflow.in/85255/pipeline_hazard In the given answer RAW is 6 but i will still consider it as 5 Refer arjun sir's comment in the same post 0 votes 0 votes Warlock lord commented Aug 27, 2017 reply Follow Share I read through the article @rahul sharma 5 . But I have a doubt. When we are looking for WAR hazard, the hazard solely depends on if the instructions are out of order, am I wrong? So if we consider out of order execution, shouldn't I2-I5 be considered as RAW? 0 votes 0 votes rahul sharma 5 commented Aug 27, 2017 reply Follow Share RAW are considered only inorder . That's why we use buffers at end of pipeline so that the next instruction can read the updated data from the buffer instead of waiting for the previous instruction to complete. Where as WAW and WAR are the result of out of order execution. I read that post some time back and i have also seen other question where 2-5 should not be considered as RAW 1 votes 1 votes just_bhavana commented Aug 27, 2017 reply Follow Share Default we've to consider inorder or out of order execution ? 0 votes 0 votes rahul sharma 5 commented Aug 28, 2017 reply Follow Share RAW :- Inorder WAW WAR out of order:- because these are occurring only in out of order execution. 0 votes 0 votes Shubhanshu commented Sep 27, 2017 reply Follow Share 5 is the correct answer. 0 votes 0 votes Warlock lord commented Sep 28, 2017 i edited by Warlock lord Sep 28, 2017 reply Follow Share @Subhanshu @rahul_sharma read https://gateoverflow.in/85255/pipeline_hazard entirely (with lot of patience) Even Arjun agreed with Habib somewhere at the end of the chain. In the question in the link above, they have asked for possible "hazards" and thus every combination is to be considered. If it were "dependencies" the the answer will be 3 (true dependencies, adjacent). The answer to this question should be 6. 1 votes 1 votes Shubhanshu commented Sep 28, 2017 reply Follow Share @Warlock lord In the given question I2-I5 (Acc) is a possible RAW hazard but it will never occurs as I5 not depends on I2 for Acc instead it depends on I4, because whatever the value I4 writes on Data item Acc, that value I5 reads not the value I2 writes on Acc. So, it is just a possible RAW hazard but it will never occurs. And moreover in that question they are asking not RAW hazard they are asking about POSSIBLE RAW hazards. 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes . Answer should be 3. MD IMRAN HUSSAIN 1 answered Aug 28, 2017 MD IMRAN HUSSAIN 1 comment Share Follow See 1 comment See all 1 1 comment reply sachin486 commented Jul 30, 2020 reply Follow Share absolutely wrong 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes I1-I2 I2-I3 I4-I5 total three RAW hazards. Ankit Srivastava 7 answered Aug 27, 2017 Ankit Srivastava 7 comment Share Follow See 1 comment See all 1 1 comment reply rahul sharma 5 commented Aug 27, 2017 reply Follow Share This is wrong.See the above link i posted in comment. I should be 5 or 6 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes RAW Dependency - 5 I-2 on I-1 I-4 on I-1 I-3 on I-2 I-4 on I-2 I-5 on I-4 sachin486 answered Jul 30, 2020 sachin486 comment Share Follow See 1 comment See all 1 1 comment reply vijayp_ commented Feb 10, 2021 reply Follow Share there is difference between hazard and dependency. Although RAW dependencies are 5, but not all will create hazards. RAW hazards will be 3, non-adjacent one will be included in those adjacent one. By Hazard, I means, extra cycle created due to dependency. 0 votes 0 votes Please log in or register to add a comment.