retagged by
2,622 views
0 votes
0 votes
Consider execution of 100 instructions on a 5 stage pipeline. let P be the probability of an instruction being branch. The value of P such that speed up is atleast 4 is_____(assume each stage takes 1 cycle to perform its task and branch is predicted on forth stage of the pipeline)
retagged by

1 Answer

0 votes
0 votes
Taking some assumptions  , let the 5 stages be IF, D, EX, M ,WB. Since in the case of pipeline it is given that branch will not be known till M, so there will be  3 stall cycles. Branch penalty=3(for branch instructions).

                                                IF  |  ID | E | M | WB

                                                        X |  X | X |  IF |......    so, 3 stall cycles will be there  in case of branch instruction.

Avg CPI(pipelined)= 1(in the ideal case)  +  Branch penalty *# of branch instructions=1+3*P (let P will be the number of branches

instructions)=1+3p.

       In the case of non-pipelined CPI=5(since there will be no overlapping).

Given speedup>=4  

=> 5/1+3p>=4

=>p<=0.084

Related questions

4 votes
4 votes
0 answers
1
jayadev asked Feb 3, 2022
392 views
Consider a 5—stage pipeline processor used to execute 200 number of instructions and among those 100 instructions cause 3 stall cycles each. What is the total cycles re...
0 votes
0 votes
0 answers
2
Manan Shah asked Dec 20, 2018
238 views
The first instruction is arithmetic nature while instruction is a branch which of the following can occur in pipeline implementation1) RAW2) WAR3) WAW4) RAR