Method and apparatus for branch prediction based on branch targets utilizing tag and data arrays
First Claim
1. A method for branch prediction in a digital processor, comprising:
- providing a branch target buffer having a tag array and a data array, wherein each entry in the tag array provides an index to a corresponding entry in the data array;
storing in a selected entry in the tag array a target address of a current branch instruction;
storing in a corresponding entry in the data array a target address of a next branch instruction; and
providing the target address of the next branch instruction in response to accessing the tag array with the target address of the current branch instruction.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods and apparatus are provided for branch prediction in a digital processor. A method includes providing a branch target buffer having a tag array and a data array, wherein each entry in the tag array provides an index to a corresponding entry in the data array, storing in a selected entry in the tag array information representative of a branch target of a current branch instruction, storing in a corresponding entry in the data array information representative of a branch target of a next branch instruction, and providing the information representative of the branch target of the next branch instruction in response to a match to an entry in the tag array. The information representative of the branch target of the next branch instruction may include a taken branch target address of the next branch instruction and an offset value. The offset value may represent an address of a next sequential instruction following the next branch instruction.
-
Citations
30 Claims
-
1. A method for branch prediction in a digital processor, comprising:
-
providing a branch target buffer having a tag array and a data array, wherein each entry in the tag array provides an index to a corresponding entry in the data array; storing in a selected entry in the tag array a target address of a current branch instruction; storing in a corresponding entry in the data array a target address of a next branch instruction; and providing the target address of the next branch instruction in response to accessing the tag array with the target address of the current branch instruction. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. Apparatus for predicting branches in a program executed on a digital processor, comprising:
-
a branch target buffer having a tag array and a data array, wherein each entry in the tag array provides an index to a corresponding entry in the data array; means for storing in a selected entry in the tag array a target address of a current branch instruction; means for storing in a corresponding entry in the data array a target address of a next branch instruction; and means for providing from the branch target buffer the target address of the next branch instruction in response to accessing the tag array with the target address of the current branch instruction. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26)
-
-
27. Apparatus for predicting branches in a program executed on a digital processor, comprising:
-
a branch target buffer having a tag array and a data array, wherein each entry in the tag array provides an index to a corresponding entry in the data array, wherein a selected entry in the tag array stores a target address of a current branch instruction and a corresponding entry in the data array stores a taken branch target address of a next branch instruction, a not taken branch target address of the next branch instruction and prediction information corresponding to the next branch instruction; an address selector for selecting the taken branch target address or the not taken branch target address in response to the prediction information; and a block size calculation unit for redirecting instruction fetching to the branch target buffer when the difference between the not taken branch target address and the current fetch address is less than a predetermined value. - View Dependent Claims (28, 29, 30)
-
Specification