IP Library Granted Patent US 7,895,422
Granted Patent B2
US 7,895,422 · App. 12/040,204 · Granted Feb 22, 2011

Selective postponement of 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,895,422
App. No.
12/040,204
Granted
Feb 22, 2011
Kind
B2
Abstract

A system and method provides branch target buffer (BTB) allocation. When a branch instruction is received, a branch target address that corresponds to the branch instruction is determined. A determination is made whether the branch target address is presently stored in a branch target buffer (BTB). When the branch target address is not presently stored in the branch target buffer, an entry in the branch target buffer is identified to receive the branch target address. A value in a field within the identified entry in the branch target buffer, such as a postponement flag (PF), is used to selectively override a replacement decision defined by predetermined branch target buffer allocation criteria. In one form, if a branch is taken, the identified entry is replaced with the branch target address in response to determining that the value in the field within the identified entry has a predetermined value.

Claims (51)

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

receiving a branch instruction and determining a branch target address corresponding to the branch instruction;

determining whether the branch instruction hits or misses in a branch target buffer (BTB), wherein when the branch instruction results in a miss in the branch target buffer, identifying an entry in the branch target buffer as an identified entry to receive the branch target address; and

using a value in a field within the identified entry in the branch target buffer to selectively override a replacement decision defined by predetermined branch target buffer allocation criteria, wherein the replacement decision indicates whether or not to allocate the identified entry to store information of the branch instruction which resulted in the BTB miss, wherein the information of the branch instruction includes the branch target address.

2. The method of claim 1 further comprising:

storing the information of the branch instruction within the identified entry in response to the value in the field.

3. The method of claim 1 further comprising:

using a first replacement value within a first set of replacement decisions when the value assumes a first value to thereby determine whether to selectively override the replacement decision; and

using a second replacement value within a second set of replacement decisions that is different from the first set of replacement decisions when the value assumes a second value to thereby determine whether to selectively override the replacement decision.

4. The method of claim 3 further comprising:

always storing the information of the branch instruction into the identified entry in response to determining that a branch is taken and the value in the field within the identified entry has a predetermined value.

5. The method of claim 3 further comprising:

implementing the second set of replacement decisions to always allocate the identified entry in the branch target buffer to store the information of the branch instruction.

6. The method of claim 3 further comprising:

counting a number of times that postponement of the identified entry in the branch target buffer occurs to form the value as a count value; and

when the count value reaches a predetermined number, always allocating the identified entry in the branch target buffer to store the information of the branch instruction if a branch is taken.

7. The method of claim 3 further comprising:

making the first set of replacement decisions and the second set of replacement decisions user programmable, the first set of replacement decisions and the second set of replacement decisions being represented in a table.

8. The method of claim 1 further comprising:

when the branch target address is presently stored within the branch target buffer, clearing the value in the field corresponding to the entry storing the branch target address if a branch is taken.

9. A system comprising:

branch address circuitry for forming a branch target address corresponding to an instruction;

a branch target buffer (BTB) having a plurality of entries, at least one of the plurality of entries having a postponement flag field comprising a value for indicating whether the at least one of the plurality of entries has previously not been allocated with a new branch target address; and

control logic circuitry coupled to the branch address circuitry and the BTB for determining whether the branch target address is stored in the BTB, the control logic circuitry identifying an allocation entry in the BTB for allocation to receive the branch target address in response to a miss in the BTB, the control logic circuitry allocating the entry using a first branch target buffer allocation criteria based on a first value of the postponement flag field and using a second branch target buffer allocation criteria based on a second value of the postponement flag field.

10. The system of claim 9 wherein the control logic circuitry further comprises logic that allocates the entry by determining whether to replace the identified entry using the first branch target buffer allocation criteria based on the first value of the postponement flag and using the second branch target buffer allocation criteria based on the second value of the postponement flag field.

11. The system of claim 9 further comprising:

a first programmable table for storing the first branch target buffer allocation criteria to be used in response to the first value of the postponement flag; and

a second programmable table for storing the second branch target buffer allocation criteria to be used in response to the second value of the postponement flag.

12. The system of claim 9 wherein the postponement flag field further comprises:

at least two bits wherein a first field value represents the value for indicating whether the at least one of the plurality of entries has previously not been allocated with the new branch target address, a second field value represents the value for indicating use of the second branch target buffer allocation criteria, and a third field value indicates that the entry must be allocated.

13. The system of claim 9 wherein the postponement flag field further comprises:

at least two bits wherein a first range of values indicates that the first branch target buffer allocation criteria is used to determine allocation of the entry, a second range of values indicates that the second branch target buffer allocation criteria is used to determine allocation of the entry, and a third range of values indicates that a third branch target buffer allocation criteria is used to determine allocation of the entry.

14. A method comprising:

receiving a branch instruction at an input of a processor;

determining a branch target address corresponding to the branch instruction;

determining whether the branch instruction hits or misses in a branch target buffer (BTB), wherein when the branch instruction results in a miss in the branch target buffer, identifying an entry in the branch target buffer as an identified entry to receive the branch target address; and

using a postponement flag corresponding to the identified entry to indicate whether or not replacement of the entry that was identified was postponed since a branch associated with the entry was last taken.

15. The method of claim 14 further comprising:

using a first set of branch target buffer replacement decisions when the postponement flag assumes a first value; and

using a second set of branch target buffer replacement decisions that is different from the first set of branch target buffer replacement decisions when the postponement flag assumes a second value.

16. The method of claim 15 further comprising:

implementing the second set of branch target buffer replacement decisions to always allocate the identified entry in the branch target buffer to receive the branch target address if a branch is taken.

17. The method of claim 15 further comprising:

making the first set of branch target buffer replacement decisions and the second set of branch target buffer replacement decisions programmable, the first set of branch target buffer replacement decisions and the second set of branch target buffer replacement decisions are represented in a table.

18. The method of claim 14 further comprising:

always replacing the identified entry in the branch target buffer with the branch target address in response to determining that the value of the postponement flag has a predetermined value.

19. The method of claim 14 further comprising:

counting a number of times that postponement of the identified entry occurs to form the postponement flag as a count value; and

when the count value reaches a predetermined number, always allocating the identified entry if a branch is taken.

20. The method of claim 14 further comprising:

implementing the postponement flag with at least two bits, wherein a first range of values provided by the at least two bits indicates that a first branch target buffer allocation criteria is used to determine allocation of the identified entry, a second range of values provided by the at least two bits indicates that a second branch target buffer allocation criteria is used to determine allocation of the identified entry, and a third range of values provided by the at least two bits indicates that a third branch target buffer allocation criteria is used to determine allocation of the entry.

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/0688 →
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 →
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 3, 2008
From: MOYER, WILLIAM C.; SCOTT, JEFFREY W.
To: FREESCALE SEMICONDUCTOR, INC.
Reel/Frame 020590/0834 →