A simple Dynamic Branch Prediction cache

Compare and contrast each of the following techniques for achieving instruction-level parallelism
March 21, 2023
Describe the characteristic features of a VLIW
March 21, 2023

A simple Dynamic Branch Prediction cache

2000 Paper 8 Question 4
Comparative Architectures
Outline the design of a simple dynamic branch prediction cache which would provide
a high degree of accuracy for branches that exhibit a strong bias in one or other
direction (for example, loop-closing branches). [5 marks]
Give an example of a simple code sequence containing branches that would be
mispredicted by your design, and describe how it would behave. [5 marks]
By storing a record of a branch’s recent behaviour it is possible to devise prediction
caches which are able to predict accurately branches whose behaviour follows some
short regular pattern.
Revise your prediction cache design to make use of a four-bit “local history” for
each entry. [5 marks]
How would this predictor perform with a branch exhibiting the following repeating
sequences?
(T = taken, N = not-taken)
(a) NTTNNTTNNTTN…
(b) NTTNNTNTTNNT…
(c) TNTTTTTNTTTT…
[5 marks]