What is Fixed Prediction?


In a fixed prediction a similar guess is continually made, either ‘always taken’ or ‘always not-taken’ approaches.

‘Always not-taken approach’ − The ‘always not taken’ approach (or ‘not taken’ approach for short) has the following typical processing scheme are as follows −

  • It can detect an unresolved conditional branch and guess it as not taken’.

  • It can continue with the execution of the sequential path, but in preparation for a wrong guess, start the execution of the taken path (for example, calculate BTA) in parallel.

  • When the condition becomes evaluable, check the guess.

  • If the guess is correct, continue with the execution of the sequential path, and delete taken path preprocessing.

  • If the guess is incorrect, delete all speculative by executed instructions in the sequential path and continue with the ‘taken path’ processing.

The ‘always not taken’ approach prefers the ‘not taken’ path, so the taken penalty (TP) is typically higher than the not-taken penalty (NTP). As shown in the table, for penalty figure of processors employing this kind of fixed prediction.

Penalty figures for processors employing the ‘always not taken’ prediction approach

Processor typeTaken penalty cyclesNot-taken penalty cycles
Z 80000 (1984p)30
80486 (1989p)20
Power1 (1990)30
R 4000 (1992p)3(D)0
SuperSparc (1992p)1(D)0
Power2 (1993)10
MicroSparc (1992)1(D)1(D)

D: Delayed Branching

As the table indicates, most processors that use the ‘not taken’ prediction approach execute not-taken conditional branches without any penalty. In contrast, taken branches cause, in most cases, a penalty of 1-3 cycles. These penalty values can effectively be reduced by one cycle in processors that offer delayed branching, like the R4000 or the Sparc processors Supersparc and MicroSparc.

On the other hand, the ‘not-taken’ scheme is easier to implement than the ‘taken’ scheme. A large number of pipelined microprocessors employ this scheme, including certain earlier processors like the i486 but also many processors which appeared at the beginning of the 1990s. Examples are the SuperSparc, the Power1 and Power2, and the α 21064 and α 21064A.

‘Always taken’ approach − The ‘always taken’ approach has the following typical processing scheme are as follows −

  • It can always guess an unresolved conditional branch as ‘taken’.

  • In anticipation of a wrong guess, save the processing status (for example, the PC), and start the execution of the taken path.

  • When the condition becomes available check the guess.

  • If the guess is correct, continue with the execution of the taken path and delete the saved status.

  • If the guess is incorrect, delete the speculative processing along the taken path and continue with the execution of the sequential path using the saved processing status.

The taken penalty (TP) is expected to be less than the penalty for not-taken branches (NTP). As shown in the table, shows these values for the MC 68040.

Penalty figures for the ‘always taken’ prediction approach

Processor typeTaken penalty cyclesNot-taken penalty cycles
MC 68040 (1990)12

Updated on: 23-Jul-2021

150 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements