branch prediction

Posted by Alexander on Stack Overflow See other posts from Stack Overflow or by Alexander
Published on 2010-03-28T23:52:16Z Indexed on 2010/03/29 0:03 UTC
Read the original article Hit count: 526

Consider the following sequence of actual outcomes for a single static branch. T means the branch is taken. N means the branch is not taken. For this question, assume that this is the only branch in the program.

T T T N T N T T T N T N T T T N T N

Assume a two-level branch predictor that uses one bit of branch history—i.e., a one-bit BHR. Since there is only one branch in the program, it does not matter how the BHR is concatenated with the branch PC to index the BHT. Assume that the BHT uses one-bit counters and that, again, all entries are initialized to N. Which of the branches in this sequence would be mis-predicted? Use the table below. alt text

Now I am not asking answers to this question, rather than guides and pointers on this. What does a two level branch predictor means and how does it works? What does the BHR and BHT stands for?

© Stack Overflow or respective owner

Related posts about cpu-architecture

Related posts about assembly