i1. add $2, $1, $3 # $2 = $1 + $3 i2. add $4, $2, $3 # $4 = $2 + $3RAW data hazards could happen at both EX and MEM stages.
1a. IF/ID.Rs = ID/EX.Rw 1b. IF/ID.Rt = ID/EX.Rwwhere “
IF/ID.Rs
” refers to the Rs
register whose value is found in the pipeline register IF/ID.
Hazard of the above instruction sequence can be detected by Condition 1a. |
“Conquer the angry one by not getting angry; conquer the wicked by goodness; conquer the stingy by generosity, and the liar by speaking the truth. [Verse 223]” ― Siddhārtha Gautama, The Dhammapada |