Skip to content

Branch Prediction

The branch prediction is a crucial component in modern computer architectures. The main purpose of it is to guess the outcome of a branch. Without a branch prediction the processor would need to wait for the result of the branch to be calculated in the execution stage of the pipeline, which is towards the end of the pipeline. Especially in longer pipelines this results in many wasted clock cycles, during which no new instructions are fetched and progressed towards completion. The branch prediction aims at reducing the wasted cycles by giving a prediction of the most likely outcome of the branch, so new instructions can be fetched. These speculative executed instruction advance the program along the most likely path.

To keep track of the currently executed speculative paths the branch prediction uses a mask system.

Branch Mask

The Branch Mask (TODO: Fertig zeichnen)