06-25-2018, 11:33 PM
(This post was last modified: 06-25-2018, 11:40 PM by greatgamer34.
Edit Reason: missing word
)
So its just an down/up 2 bit counter with edge protection. This is also called a saturation counter, IE) when decrementing and at state 00 it will remain at state 00 instead of decrementing to 11; when incrementing at state 11 it will remain at state 11 instead of incrementing to 00. The MSB is the BP's prediction(1=take, 0 =dont take), the LSB is the last outcome of the CPU(did it take the branch or not?; 1 = taken, 0 = did not take). The down/up control line comes from the result of the branch after the result is found(1 clock cycle later).