in CO and Architecture retagged by
1,160 views
2 votes
2 votes

Find total number of RAW hazards.

Doubt: Should I4 - I5 be counted or not ?

in CO and Architecture retagged by
1.2k views

4 Comments

5 is the correct answer.
0
0
edited by

@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
1

@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
0

3 Answers

1 vote
1 vote

.

               Answer should be 3.

1 comment

absolutely wrong
0
0
0 votes
0 votes
I1-I2

I2-I3

I4-I5

total three RAW hazards.

1 comment

This is wrong.See the above link i posted in comment. I should be 5 or 6
0
0
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

1 comment

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
0

Related questions

0 votes
0 votes
0 answers
4
Na462 asked in CO and Architecture Nov 14, 2018
493 views
Na462 asked in CO and Architecture Nov 14, 2018
by Na462
493 views