What is a branch target buffer and how does it contribute to a reduction of the branch penalty?

What will be an ideal response?


The fundamental problem with a branch is that if it is taken, instructions already in the pipeline have to be
flushed. Consequently, you want to detect a branch instruction as soon as possible. Then you can begin execution
at the target address.
Branch target prediction operates by detecting the branch, guessing its outcome and fetching instructions from
the next or target address as soon as possible.
The branch target buffer, BTB, is a form of memory cache that caches the addresses of branch instructions. The
program counter searches the BTB. If the current instruction address corresponds to a branch, the cache can be
accessed and the predicted outcome of the branch read (This is true only of BTBs that have a prediction bit. In
general, it is assumed that every cached branch will be taken). The BTB contains the address of the target of the
branch. This means that instructions can be loaded from that address immediately (without having to read the
branch instruction and compute the target address). If you also cache the instruction at the target address you
can get the instruction almost immediately. The BTB lets you resolve the branch much earlier in the pipeline and
therefore reduce the branch penalty.

Computer Science & Information Technology

You might also like to view...

Explain how the disabling and enabling of interrupts is useful in implementing mutual exclusion primitives on uniprocessor systems.

What will be an ideal response?

Computer Science & Information Technology

Font sizes and the spacing between characters are measured in ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

The Picture Tools Format tab is the Ribbon location for many different ___________ that can be applied to pictures.

a. styles b. animations c. transitions d. layouts

Computer Science & Information Technology

Kiera is building a new computer and wants to make sure she has an adequate power supply for all the new equipment she is purchasing. She will be installing three HDDs, with each using 25 watts. The processor she is using will need 125 watts. The motherboard will use 80 watts. RAM will require 3 watts for each of the four DDR3 DIMM modules. Her video card will need 400 watts to run at the maximum level. She wants to keep the cost as low as possible for the power supply. ? Which power supply would you recommend?

A. 600W power supply B. 700W power supply C. 800W power supply D. 900W power supply

Computer Science & Information Technology