US5327547A
Expired / Lapsed
US
⏱️ 0.0 years remaining
Two-level branch prediction cache
Assignee: Nexgen Inc
•
Filing: 1992-09-30
•
Granted: 1994-07-05
•
Expires: 2012-09-30
Abstract
Abstract An improved branch prediction cache (BPC) scheme that utilizes a hybrid cache structure. The BPC provides two levels of branch information caching. The fully associative first level BPC is a shallow but wide structure (36 32-byte entries), which caches full prediction information for a limited number of branch instructions. The second direct mapped level BPC is a deep but narrow structure (256 2-byte entries), which caches only partial prediction information, but does so for a much larger number of branch instructions. As each branch instruction is fetched and decoded, its address is used to perform parallel look-ups in the two branch prediction caches.
Inventors
- 👤 David R. Stiles
- 👤 John G. Favor
- 👤 Korbin S. Van Dyke
Bibliographic Details
Application Number
—
Jurisdiction
US
Data Source
google_patents
Last Synchronized
2026-10-30 19:33
CPC Classifications
G; G06; G06F; G06F9/00; G06F9/06; G06F9/30; G06F9/38; G06F9/3802; G06F9/3804; G06F9/3806; G06F9/3836; G06F9/3842; G06F9/3848
Claims Analysis
Total Claims: 15
Claim 1
Independent Claim
243 words
In a computer system that includes an instruction cache and decode logic responsive to fetched instructions, a branch prediction cache (BPC) structure comprising: a first level BPC, separate from the instruction cache, having a first number N1 of lines for storing prediction information on up to N1 previously encountered branch instructions, each line in said first level BPC being configured to store an entry providing prediction information at a first level of detail, said first level BPC being responsive to a first subset of address bits from an input program counter (PC) containing the address of an encountered instruction, and including first means for enabling a given first level BPC entry to be output in the event that said first subset of address bits and the given first level BPC entry satisfy a predetermined condition; and a second level BPC, separate from the instruction cache, having a second number N2 of lines, larger than said first number of lines, for storing prediction information on up to N2 previously encountered branch instructions, each line in said second level BPC being configured to store an entry providing prediction information at a second level of detail, lower than said first level of detail, said second level BPC being responsive to a second subset of address bits from the input PC, and including second means for enabling a second level BPC entry to be output for use in the event that said predetermined condition is not met.
Claim 2
Dependent Claim
243 words
In a computer system that includes an instruction cache and decode logic responsive to fetched instructions, a branch prediction cache (BPC) structure comprising: a first level BPC, separate from the instruction cache, having a first number N1 of lines for storing prediction information on up to N1 previously encountered branch instructions, each line in said first level BPC being configured to store an entry providing prediction information at a first level of detail, said first level BPC being responsive to a first subset of address bits from an input program counter (PC) containing the address of an encountered instruction, and including first means for enabling a given first level BPC entry to be output in the event that said first subset of address bits and the given first level BPC entry satisfy a predetermined condition; and a second level BPC, separate from the instruction cache, having a second number N2 of lines, larger than said first number of lines, for storing prediction information on up to N2 previously encountered branch instructions, each line in said second level BPC being configured to store an entry providing prediction information at a second level of detail, lower than said first level of detail, said second level BPC being responsive to a second subset of address bits from the input PC, and including second means for enabling a second level BPC entry to be output for use in the event that said predetermined condition is not met.
Claim 3
Dependent Claim
14 words
The BPC structure of claim 1 wherein said first level BPC is fully associative.
Claim 4
Dependent Claim
14 words
The BPC structure of claim 1 wherein said second level BPC is direct mapped.
Claim 5
Dependent Claim
19 words
The BPC structure of claim 1 wherein said first subset includes all the address bits of the input PC.
Claim 6
Dependent Claim
93 words
The BPC structure of claim 1 wherein a line in said first level BPC is configured to store, for a previously encountered branch instruction: an address of the previously encountered branch instruction; a full target address to which the previously encountered branch instruction last branched; at least one target instruction starting at said target address; and branch history information representing the direction taken during at least one previous execution of the previously encountered branch instruction; and wherein said first means for enabling includes means for communicating the target instructions to the decode logic.
Claim 7
Dependent Claim
25 words
The BPC structure of claim 1 wherein said second subset includes fewer address bits of the input PC than are included in said first subset.
Claim 8
Dependent Claim
53 words
The BPC structure of claim 1 wherein a line in said second level BPC is configured to store, for a previously encountered branch instruction: a partial target address of the previously encountered branch instruction and a branch history bit representing the direction taken during the previous execution of the previously encountered branch instruction.
Claim 9
Dependent Claim
43 words
The method of claim 1 wherein: said first level BPC is fully associative; a first level BPC entry includes address information for a previously encountered branch instruction; and said predetermined condition requires that said first subset of address bits match said address information.
Claim 10
Dependent Claim
22 words
The BPC structure of claim 1 wherein said first level BPC is fully associative and said second level BPC is direct mapped.
Claim 11
Dependent Claim
362 words
In a computer system having decode logic responsive to fetched instructions and an instruction cache from which instructions, including branch instructions, are fetched for execution, the improvement comprising: means for generating an input program counter (PC) representative of the address of an encountered instruction; a first level branch prediction cache (BPC), separate from the instruction cache, having a first number N1 of lines for storing prediction information on up to N1 previously encountered branch instructions, each line being configured to store an entry providing prediction information at a first level of detail including the address of the branch instruction for which prediction information is stored, a target address for the branch instruction, target bytes corresponding to the instruction stream starting at the target address, and branch history information representing the direction taken during at least one previous execution of the branch instruction; means, associated with said first level BPC, for comparing the input PC with the address of the branch instruction in each of the first level BPC entries, and, in the event of a match between the input PC and the address of the branch instruction in the first level BPC entry, for enabling a first level BPC entry to be output and target bytes in the first level BPC entry to be communicated to the decode logic; and a second level BPC, separate from the instruction cache, having a second number N2 of lines, larger than said first number of lines, for storing prediction information on up to N2 previously encountered branch instructions each line being configured to store an entry providing prediction information at a second level of detail, lower than said first level of detail, including a portion of a target instruction address and branch history information representing the direction taken during at least one previous execution of the branch instruction for which prediction information is stored, said second level BPC being indexed by only a portion of the input PC so as to provide a second level BPC entry for use in the event that no match occurs between the input PC and the address of the branch instruction in any of the first level BPC entries.
Claim 12
Dependent Claim
362 words
In a computer system having decode logic responsive to fetched instructions and an instruction cache from which instructions, including branch instructions, are fetched for execution, the improvement comprising: means for generating an input program counter (PC) representative of the address of an encountered instruction; a first level branch prediction cache (BPC), separate from the instruction cache, having a first number N1 of lines for storing prediction information on up to N1 previously encountered branch instructions, each line being configured to store an entry providing prediction information at a first level of detail including the address of the branch instruction for which prediction information is stored, a target address for the branch instruction, target bytes corresponding to the instruction stream starting at the target address, and branch history information representing the direction taken during at least one previous execution of the branch instruction; means, associated with said first level BPC, for comparing the input PC with the address of the branch instruction in each of the first level BPC entries, and, in the event of a match between the input PC and the address of the branch instruction in the first level BPC entry, for enabling a first level BPC entry to be output and target bytes in the first level BPC entry to be communicated to the decode logic; and a second level BPC, separate from the instruction cache, having a second number N2 of lines, larger than said first number of lines, for storing prediction information on up to N2 previously encountered branch instructions each line being configured to store an entry providing prediction information at a second level of detail, lower than said first level of detail, including a portion of a target instruction address and branch history information representing the direction taken during at least one previous execution of the branch instruction for which prediction information is stored, said second level BPC being indexed by only a portion of the input PC so as to provide a second level BPC entry for use in the event that no match occurs between the input PC and the address of the branch instruction in any of the first level BPC entries.
Claim 13
Dependent Claim
40 words
The improvement of claim 10 wherein said second level BPC contains no tag bits relating to said input PC so that an entry from said second level PC, when indexed by the portion of the input PC, is assumed valid.
Claim 14
Dependent Claim
291 words
In the operation of a computer system wherein instructions, including branch instructions, are fetched for execution, a method of predicting branch outcome, comprising the steps of: generating an input PC representative of the address of an encountered instruction; providing a first level BPC, separate from an instruction cache, having a first number of lines; storing in each of at least some of the lines of the first level BPC respective entries providing information corresponding to respective previously encountered branch instructions, each entry including the address of the respective branch instruction, a target address for the respective branch instruction, and branch history information representing the direction taken during at least one previous execution of the respective branch instruction; comparing the input PC with the address of the branch instruction in each of the first level BPC entries, and, in the event of a match between the PC and the address of the branch instruction for a particular first level BPC entry, enabling the particular first level BPC entry to be output; providing a second level BPC, separate from the instruction cache, having a second number, larger than said first number, of lines; storing in each of at least some of the lines of the second level BPC respective entries providing information corresponding to respective previously encountered branch instructions, each entry including a portion of a target instruction address and branch history information representing the direction taken during at least one previous execution of the branch instruction, the second level BPC being indexed by only a portion of the input PC; and enabling a second level BPC entry indexed by the portion of the input PC to be output for use in the event that no match exists in the first level BPC.
Claim 15
Dependent Claim
291 words
In the operation of a computer system wherein instructions, including branch instructions, are fetched for execution, a method of predicting branch outcome, comprising the steps of: generating an input PC representative of the address of an encountered instruction; providing a first level BPC, separate from an instruction cache, having a first number of lines; storing in each of at least some of the lines of the first level BPC respective entries providing information corresponding to respective previously encountered branch instructions, each entry including the address of the respective branch instruction, a target address for the respective branch instruction, and branch history information representing the direction taken during at least one previous execution of the respective branch instruction; comparing the input PC with the address of the branch instruction in each of the first level BPC entries, and, in the event of a match between the PC and the address of the branch instruction for a particular first level BPC entry, enabling the particular first level BPC entry to be output; providing a second level BPC, separate from the instruction cache, having a second number, larger than said first number, of lines; storing in each of at least some of the lines of the second level BPC respective entries providing information corresponding to respective previously encountered branch instructions, each entry including a portion of a target instruction address and branch history information representing the direction taken during at least one previous execution of the branch instruction, the second level BPC being indexed by only a portion of the input PC; and enabling a second level BPC entry indexed by the portion of the input PC to be output for use in the event that no match exists in the first level BPC.
References Cited (Backward Citations)
US4295193A
Cited
US4442488A
Cited
US4594659A
Cited
US4777594A
Cited
US4802113A
Cited
US4827402A
Cited
US4679141A
Cited
US4777587A
Cited
US4775955A
Cited
US4853840A
Cited
US4722050A
Cited
US4796175A
Cited
US4847753A
Cited
US4933837A
Cited
US4894772A
Cited
US4860199A
Cited
US4942520A
Cited
US4991078A
Cited
US4882673A
Cited
US4943908A
Cited
US4926323A
Cited
US5142634A
Cited
US5136697A
Cited
USPTO Annuity & Maintenance Windows
| Annuity Stage | Window Opens | Payment Deadline | Surcharge Period Until | Estimated Fee | Status |
|---|---|---|---|---|---|
| 3.5 Years (Year 4) | 1997-07-04 | 1998-01-03 | 1998-07-05 | $2000.00 | Window Closed / Lapsed |
| 7.5 Years (Year 8) | 2001-07-04 | 2002-01-03 | 2002-07-05 | $3760.00 | Window Closed / Lapsed |
| 11.5 Years (Year 12) | 2005-07-04 | 2006-01-03 | 2006-07-05 | $7700.00 | Window Closed / Lapsed |