in CO and Architecture retagged by
1,255 views
1 vote
1 vote
Consider a machine with 5-stage pipeline with 1ns clock cycle. The second machine with 12-stage pipeline with a 0.6ns clock cycle. The 5-stage pipeline experiences a stall due to data hazard for every 5 instructions, whereas 12 stage pipeline experiences 3 stalls for every 8 instructions. Branch instructions constitute 20% of the total instructions , and misprediction rate for both machines is 5%.
1.What is the speed up of 12-stage pipeline over 5 stage pipeline considering only data hazards?

2.If the branch mispredict penalty for the first machine is 2 cycles but the second machine is 5 cycles, what is the speed up of 12-stage pipeline over 5 stage pipeline?
in CO and Architecture retagged by
1.3k views

1 comment

what is meant by misprediction rate here and what to do with it??
0
0

1 Answer

2 votes
2 votes
1.  Texe(Execution time) =N(No of instrucions)*CPI(clock per instruction) *Tclockp (clock period)

without any stall it need 1 clock cycle per instruction but here,

CPI=6/5 for machine-1

CPI=11/8 for machine-2

Speed UP= N * (6/5) * 1ns  / N * (11/8) * 0.6ns  =1.45

2. When prediction technique has been used some time it gives correct branch but not always so here that more penalty is given in terms of 2 and 5 cycles for machine1 and machine2 accordingly.So that CPI will going to be increase.Misprediction rate for both the machines are 5%.

        previously machine-1  = 6/5

                         Now 0.80 * 6/5 + 0.20 (6/5 + 0.05 *2)

                               =1.22

previously machine-2  = 11/8

                         Now 0.80 * 11/8 + .20 (11/8 +  0.05 *5)

                               =1.425

same way speed-up will be = N * 1.22 * 1 / N * 1.425 *0.6  =1.426

1 comment

@gabbar,why are you taking stalls caused by data hazards in branch instructions??

                        " Now 0.80 * 6/5 + 0.20 (6/5 + 0.05 *2)"--here why are you muliplying 6/5 with 20% branch intructions??every five stalls are because of data hazard,not branch instructions..
0
0

Related questions