How many pipeline stages detect branch mispredictions?
Are there three stages in the pipeline which can detect branch mispredictions?
Branch Target Buffer (raising BPU CLEAR signal)
Branch Address Calculator (raising BA CLEAR signal)
Branch Execution Unit (flushing entire pipeline)
I am not sure about whether the BTB can actually detect branch mispredictions. Could somebody please confirm this? What is the difference between BPU CLEAR and BA CLEAR? Do they get raised from different parts of the pipeline?