267 views
Consider a 5—stage pipeline processor used to execute 200 number of instructions and among those 100 instructions cause 3 stall cycles each. What is the total cycles required for these operation if CPI is not equal to one.

### 1 comment

$(200+5-1) + (3*100) = 504$.

You can also try this by table filling

 1 2 3 4 5 6 7 …. 100 101 102 103 104 105 106 107 108 109 110 111 112 ….. 500 501 502 503 504 I1 F D E M W I2 F D E M W I3 F D E M W . . I100 F D E M W I101 $\phi$ $\phi$ $\phi$ F D E M W I102 $\phi$ $\phi$ $\phi$ F D E M W . $\phi$ $\phi$ $\phi$ I200 F D E M W

100 instructions with no stalls :

$5 + (100-1)* 1 = 104$ cycles

Next 100 with 3 stall cycles :

$108 + (100-1)*4 = 504$ cycles