
MOTOROLA
Chapter 4. Burst Buffer Controller 2 Module
4-29
Branch Target Buffer
4.6
Branch Target Buffer
The burst buffer controller contains a branch target buffer (BTB) to reduce the impact of
branches on performance.
Following is a summary of the BTB features:
Software controlled BTB enable/disable, lock/unlock and invalidate
User transparent — no user management required
The BTB compensates for the branch hit and branch miss prediction impact on the system
performance. It consists of eight branch target entries (BTE). Refer to
Figure 4-17.All entries are managed as a fully associative cache. Each entry contains a tag and several
data buffers related to this tag
4.6.1
BTB Operation
When the RCPU generates a change of flow (COF) address for instruction fetch, the BTB
control logic compares it to the tag values currently stored in the tag register file where
following events can happen:
BTE Miss — The target address and instruction code data will be stored in one of
the BTE entries defined by its control logic. Up to four instructions and their
corresponding addresses subsequent to the COF target instruction may be saved in
each BTE entry. The number of valid instructions currently stored in the BTE entry
is written into the VDC field of the current BTE entry. The valid flag is set at the end
of this process. The entry to be replaced upon miss is chosen based on FIFO
replacement method. Thus the BTB can support up to eight different branch target
addresses in a program loop.
BTE Hit — When the target address of a branch matches one of the valid BTE
entries or the BCME entry, two activities take place in parallel:
The BTB supplies all the valid instructions in the matched entry to the RCPU.
— The ICDU (which is flushed due to the COF) starts to prefetch instructions (and
decompresses them in compressed mode) from the address following the last
instruction which is stored in the matched BTB entry. It will supply these
instructions to the RCPU after all the stored instructions in the matched BTB
entry were delivered.
In case of a BTB hit, the impact of instruction decompression latency is eliminated as well
as a latency of instruction storage memory device.