Consider a pipeline ‘x’ consist of 5 stages named as IF, ID, OF, EX and WB with the respective stage...

Consider a pipeline ‘x’ consist of 5 stages named as IF, ID, OF, EX and WB with the respective stage delays of 2 ns, 5 ns, 6 ns, 8 ns and 1 ns. The alternative pipeline ‘y’ contain the same number of stages but EX stage is divided into 4 sub stages, (EX1, EX2, EX3 and EX4) with equal delay i.e. (8 ns/4) and ID stage is divided into 2 substages (ID1 and ID2) with equal delays of (5 ns/2). In the pipeline x and y memory reference instructions are not overlapped so the penalty of memory reference instructions in the pipeline ‘x’ is 4 cycles and in the pipeline ‘y’ is 8 cycles. If the program contains 30% of the instructions which are memory based instructions, the speedup ratio of x is speedup ratio of y is ___________.

8Comments
Abhishek Tiwari @abhishekssj5
27 Dec 2015 01:07 pm

Calculate CPI for both the pipelines

then speedup would be=cpi1/cpi2 ( as no. of instruction is same)

cpi1=pipeline1_cycle_time)/(1+avg stall/instruction)

cpi1=8/(1+0.30*4)

similarly

cpi2=6/(1+0.30*8)

therefore speedup= 2.06

 

Vimal Singh @vimal
27 Dec 2015 11:11 pm

Can u plz explain in detail how u calculated "pipeline_cycle_time", "avg_stall" ??

Parimal Andhalkar @parimal_andhalkar
28 Dec 2015 12:52 am

my question is which  ratio is req.   x to y  or  y to x  ?

Abhishek Tiwari @abhishekssj5
28 Dec 2015 12:42 pm

pipeline_cycle_time is the maximum stage delay among all the stages of a pipeline + buffer delay (if any).

for pipeline 1 pipeline_cycle_time=max_of_time_of_stages(IF,ID,OF,EX,WB)=max(2,5,6,8,1)=8ns

for pipeline 2 pipeline_cycle_time=Max_of_time_of_stages(IF,ID1,ID2,OF,EX1,EX2,EX3,WB)

=max(2,5/2,5/2,6,2,2,2,1)=6

and avg_stall=%of_instruction_creating_stall*no._of stalls created

therefore for pipeline1 avg stall =0.30*x

in pipeline2 avg stall =0.30*y

and ratio required is x to y

Parimal Andhalkar @parimal_andhalkar
28 Dec 2015 12:47 pm

what is ur ans

Vimal Singh @vimal
31 Dec 2015 05:56 pm

thanks for explaination :) 
can u plzz explain how to calculate -> "%of_instruction_creating_stall"

Abhishek Tiwari @abhishekssj5
28 Dec 2015 12:57 pm
ans is the ratio of speedup of x to y=2.06
Abhishek Tiwari @abhishekssj5
31 Dec 2015 06:38 pm

@vimal singh it is mentioned in the question itself that 30% of instruction are memory based which causes stall.

Pages