The following assembly code is to be executed in a 3-stage pipelined processor…
The following assembly code is to be executed in a 3-stage pipelined processor with hazard detection and resolution in each stage. The stage are IF, OF (one or more as required) and execution (including write-back operation). What are the number of possible RAW, WAW and WAR hazards in the execution of the code.
Instruction Meaning
I₁: Inc R₀ R₀ ← (R₀) + 1
I₂: Mul ACC, R₀ ACC ← (ACC) × (R₀)
I₃: Store R₁, ACC R₁ ← (ACC)
I₄: Add ACC, R₀ ACC ← (ACC) + (R₀)
I₅: Store M, ACC M ← (ACC)
- A.
6, 1, 2
- B.
5, 3, 3
- C.
5, 3, 2
- D.
5, 1, 2
Attempted by 61 students.
Sign up free to check your answer
Sign up freeLoading lesson…

