< previous page page_162 next page >

Page 162
0162-01.gif
Figure 3.5
Branch target table (or buffer).
Table 3.11 Percent of branch target references found in a branch table with two different strategies (R/M). (A branch table is a single-block I-cache with prefetch.)
Size (bytes)
Backward Branch
Forward Branch
16
1
32
32
5
32
64
11
35
128
16
39
256
19
42
512
22
46
1024
24
49
2K
26
53
4K
28
55
8K
30
57
16K
33
60
32K
36
63
Unlimited
36.5
63.5

instructions (dynamic). The buffer functions in two ways. First, it contains instructions sequentially ahead of the current instruction fetch address; thus, instructions fetched in sequence are available without the usual memory access time. Second, it keeps previously executed instructions and it recognizes when the target of a branch falls within its contents (backward branches). In either case, the buffers deliver those branch target instructions without accessing memory.
How successful it is depends on the distribution of branch distances for successful branches. Figure 3.5 and Tables 3.11-3.12 illustrate this relationship, where table size defines an instruction region starting at the address of the instruction following the branch instruction (in bytes). This region extends either to addresses less than the current address (backward) or greater than this address (forward). The centered region is for a buffer that both prefetches instructions and retains previously executed instructions.
While retaining history (previously executed branches) involves only storage, prefetching in anticipation of forward branches places an added bur-

 
< previous page page_162 next page >