Question: CMP 334 Homework CMP334 Homework 13: Branch Prediction Suppose 20% of the instructions executed by a pipeline processor are conditional branch instructions. Three out of

CMP 334 Homework
 CMP 334 Homework CMP334 Homework 13: Branch Prediction Suppose 20% of

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 taken yes backward no ves no yes no not taken taken forward not taken no

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!