retagged by
1,630 views
1 votes
1 votes

A hypothetical 5 stage pipeline processor is designed in which branch is predicted at 3rd stage and each stage takes 1 cycle to compute its task. If  p   is a the probability of an instruction being a branch instruction then the value of  p  such that speed up is atleast 3 is ________. (Upto 2 decimal places)

retagged by

3 Answers

Best answer
3 votes
3 votes
two stall cycles

as branch instruction will be after 3 stage so

speed up =(no. of stages of pipeline)/(1+no. of instructions*no. of stall cycles)

her no. of insrtuctions will be % will be p(example 50% are branch instructions or 40% are branch instructions)

put this in eqaution

5/(1+2p)=3

p=0.33
selected by
0 votes
0 votes

Branch instruction predicted at 3rd stage => Number of stall cycles =2

Now, Speed up = exec. time non-pipeline/ exec. time pipeline

          Exec. time non-pipeline = 5*1 = 5 cycles

          Exec. time pipeline = (1+p*2)*1

Therefore, Speed up = 5/1+2p

                    3= 5/1+2p => p=0.33

Related questions

2 votes
2 votes
1 answer
4
Satbir asked Jan 16, 2019
847 views
5 stage pipeline → 3,6,5,8,4 latencies(in ns).What is average CPI of non pipelined CPU when speed up achieved by to pipeline is 4 ? (ans = 1.23)