Question

Ch04.4. [6 points] Branch Prediction. Consider the following sequence of actual outcomes for a single static branch. T means

0 0
Add a comment Improve this question Transcribed image text
Answer #1

By Assuming that we try to predict this sequence with a Branch History Table using one-bit counters , As given counters in the Branch History table are initialized to the N state, the branches in this sequence would be miss-predicted as given below :

Predictor state before prediction Branch Outcome Misprediction?
N T Y
T T N
T T N
T N Y
N T Y
T N Y
N T Y
T T N
T T N
T N Y
N T Y
T N Y
N T Y
T T N
T T N
T N Y
N T Y
T N Y
Add a comment
Know the answer?
Add Answer to:
Ch04.4. [6 points] Branch Prediction. Consider the following sequence of actual outcomes for a si...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The following sequence of branch outcomes is applied to a saturating counter branch predictor T T...

    The following sequence of branch outcomes is applied to a saturating counter branch predictor T T T N T T N N N T N N N T T T T N T T T N N T T T T N T If the branch penalty is two additional cycles for an incorrectly predicted branch, how many additional cycles does the system incur for the above sequence of 30 branches? Assume that the predictor is initially in the strongly...

  • 14(10 points) In this problem we want to examine the accuracy of branch predictors for the...

    14(10 points) In this problem we want to examine the accuracy of branch predictors for the following repeating pattern (e.g, in a loop) of branch outcomes: NT, T, NT, NT, T What is the accuracy of always-taken and always-not-taken predictors for this sequence of branch outcome? a) b) Wh at is the accuracy of the 2-bit predictor for the first four branches in this pattern, assuming the predictor starts in the bottom left state ( predict not taken) in state...

  • (25 points) Consider a 1-bit and a 2-bit predictor. In the table below, indicate the prediction...

    (25 points) Consider a 1-bit and a 2-bit predictor. In the table below, indicate the prediction for the branch and whether the prediction is correct. For the 1-bit predictor use the notation"1 for taken, and "0 for not taken states. For the 2- bit predictor, use "11 for strongly taken state, "10 for weakly-taken state.'00 for strongly-not-taken state, and "01" for weakly-not-taken state. Assuming the first entry in the table, fill in the predictor's state after branch resolution for each...

  • Question 15 Assume that an architecture uses 2-bit branch predictor and the predictor is initially set...

    Question 15 Assume that an architecture uses 2-bit branch predictor and the predictor is initially set to WNT. For the following branch outcomes, indicate if each outcome is correctly predicted or not. In the table, T and NT represent Taken and Not-Taken branch outcomes, respectively. The states for 2-bit branch are ST (Strong-Taken), WT (Weak-Taken), WNT (Weak-Not-Taken), SNT (Strong-Not-Taken). Please use C for correct prediction and I for incorrect prediction. Branch Outcome T T T T T NT NT NT...

  • This exercise examines the accuracy of various branch predictors for the following repeating pattern (e.g. in...

    This exercise examines the accuracy of various branch predictors for the following repeating pattern (e.g. in a loop) of branch outcomes: T, T, T, NT, T, NT. a. What is the accuracy of always-taken and always-not-taken predictors for this sequence of branch outcomes? b. What is the accuracy of the two-bit predictor for the first five branches in this pattern, i.e. T, T, T, NT, T? Assume that the predictor starts off in the bottom left state from Figure 4.63...

  • Suppose that a machine with a 5-stage pipeline uses branch prediction. 12% of the instructions for...

    Suppose that a machine with a 5-stage pipeline uses branch prediction. 12% of the instructions for a given test program are branches, of which 84% are correctly predicted. The other 16% of the branches suffer a 4-cycle mis-prediction penalty. (In other words, when the branch predictor predicts incorrectly, there are four instructions in the pipeline that must be discarded.) Assuming there are no other stalls, develop a formula for the number of cycles it will take to complete n lines...

  • Assume that an architecture uses 2-bit branch predictor and the predictor is initially set to SNT....

    Assume that an architecture uses 2-bit branch predictor and the predictor is initially set to SNT. For the following branch outcomes, indicate if each outcome is correctly predicted or not. In the table, T and NT represent Taken and Not-Taken branch outcomes, respectively. The states for 2-bit branch are ST (Strong-Taken), WT (Weak-Taken), WNT (Weak-Not-Taken), SNT (Strong-Not-Taken). Please use C for correct prediction and I for incorrect prediction. T т т т NT NT NT T T T T NT...

  • 1. Suppose we have a 5-stage pipeline CPU and run the following instructions: or $tl, $t2, $t3 or...

    1. Suppose we have a 5-stage pipeline CPU and run the following instructions: or $tl, $t2, $t3 or $t2, $tl, $t4 or $tl, $tl, $t2 1.1. What dependencies are there in the code? 1.2. Suppose there is no forwarding. What hazard may happen? Draw the pipeline diagram and insert stall (nop) to prevent these hazard. 1.3. If the pipeline has full forwarding. Are there still hazard? If so, draw the pipeline diagram and insert stall (nop) to prevent the hazard....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT