retagged by
1,176 views
2 votes
2 votes

I know this question is already asked,

But here my doubt is different, I have seen many people calculating the RAW hazard without seeing the no of stages in the pipeline which is not correct.

In the above question If we see clearly by keeping in the mind that no of stages given are 3, 

From the above question, Inst I1 modifying the data item r0 it will successfully writes the data item r0 at the end of 3rd clock cycle, so the main point is that whatever be the next instruction coming after the EX(which includes WB also) stage that will not have RAW dependency because till that time r0 is written onto the register file, and thus the instruction will read the correct value and this should not included in the RAW hazard but in the solution @Habibkhan Sir, included (I1-I4) also into the answer.

let me know where I am doing wrong??

ref:-https://courses.cs.washington.edu/courses/cse378/09au/lectures/cse378au09-15.pdf

In the last line also it is written that:-

The SW is no problem at all, since it reads $2 after the SUB finishes.

retagged by

Please log in or register to answer this question.

Related questions

500
views
0 answers
0 votes
AskHerOut asked Dec 22, 2017
500 views
Although the following instructions do not make much sense but if such case occurs, is data forwarding from MA of I1 to MA of I2 allowed? Or will it result in some stall? ... //A<-Mem[address]I2: Store Adress2, A // Mem[Address2] <- A
794
views
0 answers
0 votes
Na462 asked Nov 14, 2018
794 views
478
views
1 answers
0 votes
smsubham asked Dec 27, 2018
478 views
Please Confirm.
2.3k
views
1 answers
2 votes
Mk Utkarsh asked Oct 23, 2018
2,317 views
Consider the below instructions executed on a 5 stage(IF,ID,EX,MA,WB) RISC pipeline with operand forwarding.I1: ADD R0,R1,R2 (R0=R1+R2)I2: SUB R3,R0,R2I3:MUL R4,R3,R0I4:DIV R5,R4,R0How many RAW dependencies?