Question
CMP334 Homework 13: Branch Prediction Suppose 20% of the instructions executed by a pipeline processor are conditional branch instructions. Three out of four of these
CMP334 Homework 13: Branch Prediction Suppose 20% of the instructions executed by a pipeline processor are conditional branch instructions. Three out of four of these are backward branches, of these four fifths are taken branches. Of the forward conditional branches, three fifths are taken . Suppose further that a taken branch ( backward or forward ) stalls 3 cycles if it is predicted correctly , but 4 cycles if it is not. Branches (in either direction) that are not taken do not stall if they are predicted correctly. Otherwise, they stall for 2 cycles. Compute the stall cycles per instruction (SCPI) for each of the following static branch prediction strategies: a) predict all branches not taken b) predict forward branches taken ; backward branches not taken c) predict forward branches not taken ; backward branches taken d) predict all branches taken Which strategy will achieve the best performance? Hint: Fill out the following table. direction actual predicted? cycles frequency SCPI backward taken yes no not taken yes no forward taken yes no not taken yes no
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started