IP Library Granted Patent US 7,937,573
Granted Patent B2
US 7,937,573 · App. 12/040,210 · Granted May 3, 2011

Metric for selective branch target buffer (BTB) 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 7,937,573
App. No.
12/040,210
Granted
May 3, 2011
Kind
B2
Abstract

A method and data processing system allocates entries in a branch target buffer (BTB). Instructions are fetched from a plurality of instructions and one of the plurality of instructions is determined to be a branch instruction. A corresponding branch target address is determined. A determination is made whether the branch target address is stored in a branch target buffer (BTB). When the branch target address is not stored in the branch target buffer, an entry in the branch target buffer is identified for allocation to receive the branch target address based upon stored metrics such as data processing cycle saving information and branch prediction state. In one form the stored metrics are stored in predetermined fields of the entries of the BTB.

Claims (41)

1. A method for branch target buffer (BTB) allocation in a pipelined data processing system, comprising:

fetching an instruction from a plurality of instructions and determining that the instruction is a branch instruction;

determining a branch target address corresponding to the branch instruction;

determining whether the branch target address is stored in a branch target buffer (BTB), wherein when the branch target address is not stored in the branch target buffer, identifying an entry in the branch target buffer for allocation to receive the branch target address;

determining whether to allocate the branch instruction based upon data processing cycle saving information; and

storing the data processing cycle saving information in the pipelined data processing system.

2. The method of claim 1 further comprising:

storing the data processing cycle saving information in a field of an entry of the BTB.

3. The method of claim 1 further comprising:

determining the data processing cycle saving information by determining a number of data processing cycles to be saved by using a presently stored branch target address in the entry.

4. The method of claim 1 further comprising:

determining the data processing cycle saving information by determining a difference between a savings in data processing cycles obtained by a presently stored target address in the entry and a savings in data processing cycles that would be realized in response to a subsequent access of the branch target address if the branch target address were stored in the BTB.

5. The method of claim 1 further comprising:

determining the data processing cycle saving information as an estimated number of data processing cycles that are saved on a subsequent access of the branch target address if the branch target address is stored in the entry in the branch target buffer.

6. The method of claim 1 further comprising:

determining whether to allocate the entry based on using both a state of a branch prediction of a stored branch target address stored in the entry being identified and the data processing cycle saving information to determine whether to store the branch target address in the entry.

7. The method of claim 1 further comprising:

storing a branch prediction state of the branch target address in the entry after a change of instruction flow occurs in response to the branch instruction.

8. A data processing system comprising:

a branch target buffer (BTB) having a plurality of entries; and

control logic circuitry coupled to the BTB for determining whether a predetermined branch target address is stored in the BTB, the control logic circuitry identifying an entry in the branch target buffer for allocation to receive the predetermined branch target address in response to a miss in the BTB, the control logic circuitry allocating the entry based upon data processing cycle saving information, the data processing cycle saving information being stored in the data processing system.

9. The data processing system of claim 8 wherein the data processing cycle saving information is stored in the BTB in a field of each entry of the BTB.

10. The data processing system of claim 8 wherein the control logic circuitry further causes a branch prediction state of the branch target address to be stored in the entry after a change of instruction flow occurs in response to the branch instruction.

11. The data processing system of claim 10 wherein the control logic circuitry uses both the data processing cycle saving information and the branch prediction state that are stored in the data processing system to determine allocations in the BTB.

12. The data processing system of claim 8 wherein the control logic circuitry determines the data processing cycle saving information by determining a number of data processing cycles to be saved by using a presently stored branch target address in the entry.

13. The data processing system of claim 8 wherein the control logic circuitry determines the data processing cycle saving information by determining a difference between a savings in data processing cycles obtained by a presently stored target address in the entry and a savings in data processing cycles that would be realized in response to a subsequent access of the branch target address if the branch target address were stored in the BTB.

14. A method for branch target buffer (BTB) allocation in a pipelined data processing system, comprising:

fetching instructions from a plurality of instructions and determining that one of the plurality of instructions is a branch instruction;

determining a branch target address corresponding to the branch instruction;

determining whether the branch target address is stored in a branch target buffer (BTB); and

when the branch target address is not stored in the branch target buffer, identifying an entry in the branch target buffer for allocation to receive the branch target address and based upon a state of a branch prediction of the entry being identified, determining whether to store the branch target address in the entry.

15. The method of claim 14 wherein the state of the branch prediction of the entry being identified is stored in the entry of the branch target buffer.

16. The method of claim 14 further comprising:

determining a state of the branch prediction of the branch target in the entry of the branch target buffer.

17. The method of claim 16 wherein when the state of the branch prediction of the branch target in the entry being identified indicates a not-taken state, allocation of the branch target address into the entry is performed.

18. The method of claim 14 further comprising:

determining whether to allocate the entry in the branch target buffer based upon a number of data processing cycles that would be saved in response to a subsequent access of the branch target address if the branch target address is stored in the entry in the branch target buffer.

19. The method of claim 18 further comprising:

storing the number of data processing cycles that would be saved in the entry of the branch target buffer upon allocation of the entry in the branch target buffer.

20. The method of claim 14 further comprising:

determining whether to allocate the entry in the branch target buffer based upon a difference between a savings in data processing cycles obtained by a presently stored target address in the entry and a savings in data processing cycles that would be realized in response to a subsequent access of the branch target address if the branch target address were stored in the BTB.

Assignments (23)
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 →
RELEASE OF SECURITY INTEREST Recorded Sep 10, 2019
From: MORGAN STANLEY SENIOR FUNDING, INC.
To: NXP B.V.
Reel/Frame 050744/0097 →
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 NATURE OF CONVEYANCE PREVIOUSLY RECORDED AT REEL: 040632 FRAME: 0001. ASSIGNOR(S) HEREBY CONFIRMS THE MERGER AND CHANGE OF NAME. Recorded Sep 21, 2017
From: FREESCALE SEMICONDUCTOR INC.
To: NXP USA, INC.
Reel/Frame 044209/0047 →
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 →
CHANGE OF NAME Recorded Nov 8, 2016
From: FREESCALE SEMICONDUCTOR, INC.
To: NXP USA, INC.
Reel/Frame 040632/0001 →
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 →
SUPPLEMENT TO THE SECURITY AGREEMENT Recorded Jun 16, 2016
From: FREESCALE SEMICONDUCTOR, INC.
To: MORGAN STANLEY SENIOR FUNDING, INC.
Reel/Frame 039138/0001 →
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/0688 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037356/0553 →
PATENT RELEASE Recorded Dec 21, 2015
From: CITIBANK, N.A., AS COLLATERAL AGENT
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 037356/0143 →
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 →
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 Jul 7, 2008
From: FREESCALE SEMICONDUCTOR, INC.
To: CITIBANK, N.A.
Reel/Frame 021194/0593 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 24, 2008
From: MOYER, WILLIAM C.; SCOTT, JEFFREY W.
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 020692/0266 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 3, 2008
From: MOYER, WILLIAM C.
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 020590/0817 →