Answer:
The formula is: 1.2236n + 13
Step-by-step explanation:
Given data:
14-stage pipeline
13% of the instructions for a given test program
88% are correctly predicted
1 cycle branch delay
12% of the branches suffer a 7-cycle mis-prediction penalty
Question: Develop a formula for the number of cycles it will take to complete n lines of the program
Here
are branching instructions, but, 88% are correctly predicted, therefore:
![((13n)/(100) )*((88)/(100) )=0.1144n](https://img.qammunity.org/2021/formulas/engineering/college/z61fdyh09ot33k87fygg9a20mmh579f5si.png)
According the question, 12% of the branches suffer a 7-cycle mis-prediction penalty, the delay due this mis-prediction:
![((13n)/(100) )*((12)/(100) )*7=0.1092n](https://img.qammunity.org/2021/formulas/engineering/college/dkpj9cictlv453f970a7krwxx42y6aly3h.png)
The total delay:
0.1144n + 0.1092n = 0.2236n
The number of cycles it will take to complete n lines of the program:
n + 0.2236n + 14 - 1 = 1.2236n + 13