Answer:
a) the speed up is 1.45
b) the speed up is 1.42
Explanation:
Given
5 stage pipeline = 1 ns clock cycle
12 stage pipeline = 0.6 ns clock cycle
a) The speed up is
[tex]speed-upx_{pipeline} =\frac{CPI_{unpipelined} }{CPI_{pipelined} } (\frac{cycle-time_{unpipelined} }{cycle-time_{pipelined} } )[/tex] (eq. 1)
The CPIpipelined is
[tex]CPI_{pipelined} =CPI_{ideal} +average-stall-cycle/instructions[/tex] (eq. 2)
The execution time is
[tex]execution-time=instruction*CPI_{pipelined} *cycle-time_{unpipelined}[/tex] (eq. 3)
The CPI for 5-stage pipeline is
CPI = 6/5
cycle time = 1 s
The CPI for 12-stage pipeline is
CPI = 11/8
cycle time = 0.6 s
Replacing values in equation 1
[tex]speed-up_{pipeline} =\frac{I*\frac{6}{5}*1 }{I*\frac{11}{8}*0.6 } =\frac{1.2}{1.375*0.6} =1.45[/tex]
b) The equation for CPI instruction in 5-stage is
[tex]CPI_{5} =CPI_{time} +instructions-of-5-stage*cycletime*number-of-cycles=\frac{6}{5} +(\frac{20}{100} )*0.05*2=1.22[/tex]
For CPI instruction in 12-stage is
[tex]CPI_{12} =\frac{11}{8} +(\frac{20}{100} )*0.05*5=1.43[/tex]
The speed up is using the equation 1
[tex]speed-up=\frac{1*1.22*1}{1*1.43*0.6} =1.42[/tex]