11
Consider a 4 stage pipeline processor. The number of cycles needed by the four instructions 11, 12, 13, 14 in stage S1, S2, S3, S4 is shown below :
What is the number of cycles needed to execute
the following loop ?
for (i = 1 to 2) {I1; I2; I3; I4;}
| S1 | S2 | S3 | S4 | |
| I1 | 2 | 1 | 1 | 1 |
| I2 | 1 | 3 | 2 | 2 |
| I3 | 2 | 1 | 1 | 3 |
| I4 | 1 | 2 | 2 | 2 |
for (i = 1 to 2) {I1; I2; I3; I4;}

1st time for loop required is cycle and again second time 15 cycle
So, total = 30 cycle





