IP Library Granted Patent US 8,205,068
Granted Patent B2
US 8,205,068 · App. 12/181,363 · Granted Jun 19, 2012

Branch target buffer allocation

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,205,068
App. No.
12/181,363
Granted
Jun 19, 2012
Kind
B2
Abstract

A data processing system and method are provided for allocating an entry in a branch target buffer (BTB). The method comprises: receiving a branch instruction to be executed in a data processor; determining that the BTB does not include an entry corresponding to the branch instruction; identifying an entry in the BTB for allocation, the identified entry in the BTB comprising a target identifier and a first prediction value for a previously received branch instruction; determining whether to allocate the branch instruction to the identified entry in the BTB based on a comparison of the first prediction value to a second prediction value, wherein the second prediction value is generated from a branch history table (BHT); and allocating the branch instruction to the identified entry if the second prediction value indicates a more strongly taken prediction than the first prediction value.

Claims (47)

1. A method for allocating an entry of a plurality of entries in a branch target buffer (BTB), the method comprising:

receiving a branch instruction to be executed in a data processor;

determining that the BTB does not include an entry corresponding to the branch instruction;

identifying an entry in the BTB for allocation, the identified entry in the BTB comprising a target identifier and a first prediction value for a previously received branch instruction; and

determining whether to allocate the branch instruction to the identified entry in the BTB based on a comparison of the first prediction value to a second prediction value,

wherein the second prediction value is based on outcomes of a plurality of previous instruction branches.

2. The method of claim 1 , wherein the step of determining is further characterized by the second prediction value being generated from a branch history table (BHT).

3. The method of claim 2 , further comprising allocating the branch instruction to the identified entry if the second prediction value indicates a more strongly taken prediction than the first prediction value.

4. The method of claim 2 , further comprising shifting a plurality of bits into a branch history register, wherein each bit of the plurality of bits indicates a result of a branch instruction, and wherein one or more of the plurality of bits are used in creating an index to address the BHT.

5. The method of claim 2 , further comprising updating the BHT when a change-of-instruction-flow occurs as a result of the branch instruction.

6. The method of claim 1 , wherein allocating the branch instruction to the identified entry further comprises not allocating the branch instruction to the identified entry if the second prediction value indicates that the branch is not likely to be taken.

7. The method of claim 1 , further comprising:

generating a prediction confidence value based on a number of correct predictions;

combining the prediction confidence value with the second prediction value to generate a third prediction value; and

using the third prediction value to determine whether to allocate the branch instruction to the identified entry.

8. The method of claim 1 , wherein the second prediction value comprises a two-bit prediction value for indicating one of a strongly not-taken state, a weakly not-taken state, a weakly taken state, and a strongly taken state.

9. A method for allocating an entry of a plurality of entries in a branch target buffer (BTB), the method comprising:

receiving a branch instruction to be executed in a data processor;

determining that the BTB does not include an entry corresponding to the branch instruction;

identifying an entry in the BTB for allocation, the identified entry in the BTB comprising a target identifier and a first prediction value for a previously received branch instruction; and

determining whether to allocate the branch instruction to the identified entry in the BTB based on a comparison of the first prediction value to a second prediction value,

wherein the first prediction value comprises a two-bit prediction value for indicating one of a strongly not-taken state, a weakly not-taken state, a weakly taken state, and a strongly taken state.

10. A method for allocating an entry of a plurality of entries in a branch target buffer (BTB) in a data processing system, the method comprising:

receiving a plurality of instructions to be executed in the data processing system, the plurality of instructions comprising one or more branch instructions;

generating a branch history table (BHT), wherein the BHT is based on an accumulation of change-of-instruction-flow results during instruction execution of the plurality of instructions, wherein the accumulation of change-of-instruction-flow results are used to generate a first prediction value;

receiving a first branch instruction to be executed in the data processing system;

determining that the BTB does not include an entry corresponding to the first branch instruction;

identifying an entry in the BTB for allocation, the identified entry in the BTB comprising a second prediction value for a second branch instruction;

determining whether to allocate the first branch instruction to the identified entry in the BTB based on a comparison of the first prediction value to the second prediction value; and

allocating the first branch instruction to the identified entry if the first prediction value indicates a more strongly taken prediction than the second prediction value, and not allocating the entry to the second branch instruction if the first prediction value indicates a more strongly not taken prediction than the second prediction value.

11. The method of claim 10 , further comprising:

generating a prediction confidence value based on a number of correct predictions in the data processing system;

combining the prediction confidence value with the first prediction value to generate a third prediction value; and

using the third prediction value to determine whether to allocate the branch instruction to the identified entry.

12. The method of claim 10 , wherein the first prediction value comprises a two-bit prediction value for indicating one of a strongly not-taken state, a weakly not-taken state, a weakly taken state, and a strongly taken state.

13. The method of claim 10 , wherein the second prediction value comprises a two-bit prediction value for indicating one of a strongly not-taken state, a weakly not-taken state, a weakly taken state, and a strongly taken state.

14. The method of claim 10 , further comprising shifting a plurality of bits into a branch history register, wherein each bit of the plurality of bits indicates a result of a branch instruction, and wherein at least one of the plurality of bits is used to generate an index to address the BHT.

15. A data processing system comprising:

processing logic for executing instructions;

a branch target buffer (BTB) coupled to the processing logic, the BTB having a plurality of entries, an entry of the plurality of entries comprising a first prediction value corresponding to a first branch instruction;

a BTB controller, coupled to the BTB, for selecting an entry of the plurality of entries is to be replaced;

a branch history table (BHT), coupled to the processing logic, for providing a second prediction value based on an accumulation of change-of-instruction-flow results during execution of the plurality of instructions, the second prediction value corresponding to a second branch instruction; and

BTB replacement allocation logic coupled to the BTB for receiving the first prediction value and to the BHT for receiving the second prediction value, the BTB replacement allocation logic for performing a comparison of the first prediction value to the second prediction value, and for causing the entry of the plurality of entries to be allocated to the second branch instruction based on the comparison.

16. The data processing system of claim 15 , further comprising a confidence predictor coupled to the BTB replacement allocation logic, the confidence predictor for generating a prediction confidence value based on a number of correct branch predictions, wherein the prediction confidence value is combined with the second prediction value to generate a third prediction value, and wherein the third prediction value is used to determine whether to allocate the entry of the plurality of entries to the second branch instruction.

17. The data processing system of claim 15 , wherein the first prediction value comprises a two-bit prediction value for indicating one of a strongly not-taken state, a weakly not-taken state, a weakly taken state, and a strongly taken state.

18. The data processing system of claim 15 , wherein the second prediction value comprises a two-bit prediction value for indicating one of a strongly not-taken state, a weakly not-taken state, a weakly taken state, and a strongly taken state.

19. The data processing system of claim 15 , wherein when the comparison determines that if the second prediction value indicates a more strongly taken value than the first prediction value, the entry of the plurality of entries is allocated for the second branch instruction.

Assignments (19)
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 11759915 AND REPLACE IT WITH APPLICATION 11759935 PREVIOUSLY RECORDED ON REEL 040925 FRAME 0001. ASSIGNOR(S) HEREBY CONFIRMS THE RELEASE OF SECURITY INTEREST. Recorded Feb 17, 2020
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP, B.V. F/K/A FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 052917/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 11759915 AND REPLACE IT WITH APPLICATION 11759935 PREVIOUSLY RECORDED ON REEL 040928 FRAME 0001. ASSIGNOR(S) HEREBY CONFIRMS THE RELEASE OF SECURITY INTEREST. Recorded Jan 17, 2020
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 052915/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE APPLICATION 11759915 AND REPLACE IT WITH APPLICATION 11759935 PREVIOUSLY RECORDED ON REEL 037486 FRAME 0517. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Dec 10, 2019
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 053547/0421 →
CORRECTIVE ASSIGNMENT TO CORRECT THE TO CORRECT THE APPLICATION NO. FROM 13,883,290 TO 13,833,290 PREVIOUSLY RECORDED ON REEL 041703 FRAME 0536. ASSIGNOR(S) HEREBY CONFIRMS THE THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS.. Recorded Feb 20, 2019
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: SHENZHEN XINGUODU TECHNOLOGY CO., LTD.
Reel/Frame 048734/0001 →
CORRECTIVE ASSIGNMENT TO CORRECT THE REMOVE PATENTS 8108266 AND 8062324 AND REPLACE THEM WITH 6108266 AND 8060324 PREVIOUSLY RECORDED ON REEL 037518 FRAME 0292. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS. Recorded Feb 1, 2017
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 041703/0536 →
RELEASE OF SECURITY INTEREST Recorded Nov 7, 2016
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 040928/0001 →
RELEASE OF SECURITY INTEREST Recorded Sep 21, 2016
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP, B.V., F/K/A FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 040925/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 4, 2016
From: FREESCALE SEMICONDUCTOR, INC.
To: NORTH STAR INNOVATIONS INC.
Reel/Frame 037694/0264 →
ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS Recorded Jan 13, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037518/0292 →
ASSIGNMENT AND ASSUMPTION OF SECURITY INTEREST IN PATENTS Recorded Jan 12, 2016
From: CITIBANK, N.A.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 037486/0517 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037354/0757 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037356/0143 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037356/0553 →
SECURITY AGREEMENT Recorded Nov 6, 2013
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 031591/0266 →
SECURITY AGREEMENT Recorded Jun 18, 2013
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., AS NOTES COLLATERAL AGENT
Reel/Frame 030633/0424 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 13, 2011
From: MOYER, WILLIAM C.; SCOTT, JEFFREY W.
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 026584/0330 →
SECURITY AGREEMENT Recorded May 13, 2010
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A., AS COLLATERAL AGENT
Reel/Frame 024397/0001 →
SECURITY AGREEMENT Recorded Mar 15, 2010
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A.
Reel/Frame 024085/0001 →
SECURITY AGREEMENT Recorded Dec 9, 2008
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A.
Reel/Frame 021936/0772 →