< previous page page_237 next page >

Page 237
Table 4.13 Fraction of branch targets found to have changed from previous execution of that branch.
WorkloadProbability of Target Change
Compiler4.2%
Business2.1%
Scientific4.4%
Supervisor state1.4%

Table 4.14 Branch target address buffer hit ratio (organized as a LRU stack).
n
Mix Definition
EntriesCompilerBusinessScientificSupervisor State
10.0310.1210.1580.012
20.0750.1500.2230.066
40.1850.2120.2720.154
80.2980.2470.4020.259
160.3690.3150.6360.275
320.5140.4120.6930.301
640.6340.6240.8120.435
1280.7690.8320.9530.545
2560.8880.9290.9700.615
5120.9670.9680.9930.672

and, if necessary, the pipeline can be flushed if the actual target differs from the stored target (an infrequent event; see Table 4.13).
The effectiveness of such a branch target buffer depends on itshit ratio the probability that a branch is found in the BTB at the time it is fetched. Table 4.14 shows the hit ratios for various sizes of branch target buffers, where an entry is created whenever a branch is recognized and a global LRU replacement algorithm is used to remove the least recently used (executed) branch in the BTB in order to place a new entry into the BTB.
The BTBs described previously that contain the target instruction(s) [129] are sometimes called target instruction buffers (TIB). TIBs have been used in implementations such as the AMD 29000.
BTBs (or TIBs) can be used quite well in conjunction with the I-cache. Suppose we have a configuration as shown in Figure 4.24. The IF is made to both BTB and I-cache. If the IF ''hits" in the BTB, the target instruction that was previously stored in the BTB is now fetched and forwarded to the processor at its regularly scheduled time. The processor will begin the execution of the target instruction.

 
< previous page page_237 next page >