Q. A 4-stage instruction pipeline executes the following loop: i = 1 while (i…
Q. A 4-stage instruction pipeline executes the following loop:
i = 1
while (i < 512)
{
I1;
I2;
I3;
I4;
i++;
}
The time spent by each instruction in the stages is given below:
Instruction | Stage 1 | Stage 2 | Stage 3 | Stage 4 |
I1 | 1 | 2 | 1 | 3 |
I2 | 1 | 2 | 4 | 1 |
I3 | 3 | 1 | 2 | 2 |
I4 | 1 | 3 | 2 | 3 |
After how many pipeline cycles will the output of instruction I3 for the second iteration (i = 2) be available?
- A.
182 cycles
- B.
24 cycles
- C.
27 cycles
- D.
19 cycles
Attempted by 52 students.
Sign up free to check your answer
Sign up freeLoading lesson…

