Static vs Dynamic Branch Prediction
Assume a 5-stage pipeline is used in each of two processors P1 and P2. 30% of all executed instructions are branches. 60% of all branches are taken. Branch outcomes are calculated during the Decode stage (stage 2). branch penalties are the only source of stalls. Both P1 and P2 run at the same clock frequency. Assume P1 uses static branch prediction (and assumes NOT TAKEN); while P2 uses dynamic branch prediction.
What branch prediction accuracy must P2 have in order to perform as well as P1?
If the branch prediction accuracy for P2 is 90%, what is the speedup of P2 over P1?
For (1) I know that the delay for P1 can be calculated as (.3)(.6)(1), does that mean P2 needs to have an accuracy of 40%?
For (2) I know that speedup = Tslow/Tfast, so would it be ((.3)(.6)(1))/((.3)(.1)(1))?
Assume a 5-stage pipeline is used in each of two processors P1 and P2. 30% of all executed instructions are branches. 60% of all branches are taken. Branch outcomes are calculated during the Decode stage (stage 2). branch penalties are the only source of stalls. Both P1 and P2 run at the same clock frequency. Assume P1 uses static branch prediction (and assumes NOT TAKEN); while P2 uses dynamic branch prediction.
What branch prediction accuracy must P2 have in order to perform as well as P1?
If the branch prediction accuracy for P2 is 90%, what is the speedup of P2 over P1?
For (1) I know that the delay for P1 can be calculated as (.3)(.6)(1), does that mean P2 needs to have an accuracy of 40%?
For (2) I know that speedup = Tslow/Tfast, so would it be ((.3)(.6)(1))/((.3)(.1)(1))?
No comments:
Post a Comment