Scenario:
A) Table below summarizes the relation between a sequence of three conditional statements.
B) Use a single bit correlating predictor, with initial state "NT / NT" for each branch prediction.
C) Assume a correlation history that initializes the rst prediction for branch`B1' to the case of `branch taken'.
D) Assume that the values for `R1' are only modied by the instructions specied in Table first and take the initial values as detailed in Table second on each new encounter with the above code.
Question 1: Complete the contents of Table second if the value for R1 iterates through the sequence 0 → 2 → 4 → .... and the predictor takes the form of a 1-bit correlated predictor. What is the corresponding miss prediction rate?
Question 2: Now design a (0, 2) predictor for the same sequence i.e., a common (0, 2) predictor design is employed for each of the three branches. What is the corresponding miss prediction rate?
Would such a predictor also work well for the case of predicting loop behaviour?
Table: Sequence of conditional statements. abs() denotes the absolute operator returning the magnitude of the argument.
Table: State table for 1-bit Correlated Predictor. The R1 column species the initial value of the register on the rst line of the above code. Thereafter the path through the code can modify the value for R1.