Data:
Instruction pipeline = 6 stage
25% of the instructions incur 2 pipeline stall cycles
Formula:
Speed up = \(\frac{{Execution\;time\left( {non\;pipeline} \right)}}{{Execution\;time\;\left( {pipeline} \right)}}\)
Time with pipeline =1+ stall freqency×stall cycle
Calculation:
Time without pipeline = 6 stages=6 cycles
Time with pipeline = =1+.25 × 2 =1.5
Speed up = \(\frac{{6}}{{1.5}} = 4\)