Claims
- 1. In a computer system comprising at least one execution unit for executing instructions, a method for rapidly dispatching instructions to said at least one execution unit for execution, said method comprising the steps of:
a) storing a plurality of sets of instructions in a plurality of cache lines of an instruction cache array; b) storing a plurality of corresponding sets of tag and associated control information in a plurality of corresponding tag entries of a corresponding tag array; c) storing a plurality of corresponding sets of instruction classes in a plurality of corresponding instruction class entries of a corresponding instruction class array, each of said set of instruction classes comprising a plurality of instruction classes for said instructions of said corresponding set of instructions; d) storing a plurality of corresponding sets of predictive annotations in a plurality of corresponding predictive annotation entries of a corresponding predictive annotation array, each of said set of predictive annotations comprising at least one branch prediction for said instructions of said corresponding set of instructions; and e) fetching and prefetching repeatedly selected ones of said stored sets of instructions for dispatch to said at least one execution unit for execution using said stored corresponding instruction classes and branch predictions.
- 2. The method as set forth in claim 1, wherein, said instruction class and predictive annotation entries are stored into said corresponding instruction class and predictive annotation arrays in said steps c) and d) one instruction class and corresponding predictive annotation entry at a time, each of said instruction class and corresponding predictive annotation entries being stored into said instruction class and predictive annotation arrays when their corresponding cache line of instructions is stored into said instruction cache array, each of said branch predictions of said predictive annotation entries being initialized in accordance with an initialization policy of a branch prediction algorithm when its predictive annotation entry is stored into said predictive annotation array.
- 3. The method as set forth in claim 2, wherein, each of said at least one branch prediction of each of said sets of predictive annotations is initialized to predict “branch will not be taken”.
- 4. The method as set forth in claim 1, wherein, each of said fetchings and prefetchings in said step e) comprises the steps of:
e.1) accessing one of said cache line of instructions and its corresponding tag, instruction class and predictive annotation entries concurrently using a fetch address; e.2) selecting one of said sets of instructions from said accessed cache line and a branch prediction from said selected set of instructions' corresponding set of predictive annotations in said accessed cache line's corresponding predictive annotation entry; e.3) determining a next fetch address from said selected branch prediction; e.4) determining subsequently whether said selected branch prediction predicts correctly; and e.5) updating said selected branch prediction in accordance to an update policy of a branch prediction algorithm based on said prediction correctness determination.
- 5. The method as set forth in claim 4, wherein, said update policy in said step
e.5) updates each of said selected branch predictions as follows: 1BranchPrediction,UpdateClassActualPolicyPC-relative branchPT, ANTPNT −> BRPD[A]PC-relative branchPNT, ATPT −> BRPD[A]PC-relative branchPT, ATNo ActionPC-relative branchPNT, ANTNo ActionRegister indirectPNT, ATPT −> BRPD[A]control transferRegister indirectPT, ATNo Actioncontrol transferUnconditional PCPNT, ATPT −> BRPD[A]control transferUnconditional PCPT, ATNo Actioncontrol transfer
- 6. The method as set forth in claim 1, wherein,
each of said set of predictive annotations in said step d) further comprises at least one next fetch address prediction for said instructions of said corresponding set of instructions; and said fetchings and prefetchings in said step e) use said stored corresponding next fetch address predictions as well as said instruction classes and branch predictions.
- 7. The method as set forth in claim 6, wherein, said next fetch address predictions are initialized, accessed, selected, and updated in substantially the same manner as said branch predictions.
- 8. The method as set forth in claim 7, wherein, each of said at least one next fetch address prediction of each of said sets of predictive annotations is initialized to predict an address that equals to a sum of a program counter and a next sequential fetch block size, said program counter indicating a current fetch address and said next fetch sequential block size indicating a next sequential fetch block's block size.
- 9. The method as set forth in claim 7, wherein, each of said selected next fetch address predictions is updated as follows:
- 10. The method as set forth in claim 7, wherein,
each set of said predictive annotations comprises one branch prediction and one next fetch address prediction, said one branch and next fetch address predictions predicting branch direction and next fetch address for a dominant instruction of its corresponding set of instructions; said method further comprises the step of f) storing each of said selected next fetch address predictions in a register, said register being used for storing a next fetch address for a next set of instructions to be fetched, said stored next fetch address being also used for selecting said branch prediction and said next fetch address prediction for said next set of instructions to be fetched.
- 11. In a computer system comprising at least one execution unit for executing instructions, an apparatus for rapidly dispatching instructions to said at least one execution unit for execution, said apparatus comprising:
a) instruction array means comprising a plurality of cache lines for storing a plurality of sets of instructions; b) tag array means comprising a plurality of tag entries for storing a plurality of corresponding sets of tag and associated control information; c) instruction class array means comprising a plurality of instruction class entries for storing a plurality of corresponding sets of instruction classes, each of said set of instruction classes comprising a plurality of instruction classes for said instructions of said corresponding set of instructions; d) predictive annotation array means comprising a plurality of predictive annotation entries for storing a plurality of corresponding sets of predictive annotations, each of said set of predictive annotations comprising at least one branch prediction for said instructions of said corresponding set of instructions; and e) fetching and prefetching means coupled to said instruction array means, said tag array means, said instruction class array means, and said predictive annotation array means for fetching and prefetching repeatedly selected ones of said stored sets of instructions for dispatch to said at least one execution unit for execution using said stored corresponding instruction classes and branch predictions.
- 12. The apparatus as set forth in claim 11, wherein,
said instruction class and said predictive annotation array means store each of said instruction class and corresponding predictive annotation entries one instruction class and corresponding predictive annotation entry at a time, said instruction class and predictive annotation array means store each of said instruction class and corresponding predictive annotation entries into said instruction class and predictive annotation array means when said instruction array means stores its corresponding cache line of instructions into itself, said predictive annotation array means initializes each of said branch predictions of said predictive annotation entries in accordance to an initialization policy of a branch prediction algorithm when said predictive annotation array means stores its predictive annotation entries into itself.
- 13. The apparatus as set forth in claim 12, wherein, said predictive annotation array means initializes each of said at least one branch prediction of each of said sets of predictive annotations to predict “branch will not be taken”.
- 14. The apparatus as set forth in claim 11, wherein, said fetching and prefetching means comprises:
e.1) accessing means for accessing one of said cache line of instructions and its corresponding tag, instruction class and predictive annotation entries stored in said instruction, tag, instruction class and predictive annotation array means concurrently using a fetch address; e.2) selection means coupled to said instruction, tag, instruction class and predictive annotation array means for selecting one of said sets of instructions from said accessed cache line and a branch prediction from said selected set of instructions' corresponding set of predictive annotations in said accessed cache line's corresponding predictive annotation entry; e.3) first determination means coupled to said selection means for determining a next fetch address from said selected branch prediction; e.4) second determination means coupled to said selection means and said execution means for determining subsequently whether said selected branch prediction predicts correctly; and e.5) update means coupled to said second determination means and said instruction, tag and predictive annotation array means for updating said selected branch prediction in accordance with an update policy of a branch prediction algorithm based on said prediction correctness determination.
- 15. The apparatus as set forth in claim 14, wherein, said update means updates each of said selected branch predictions as follows:
- 16. The apparatus as set forth in claim 11, wherein,
each of said set of predictive annotations further comprises at least one next fetch address prediction for said instructions of said corresponding set of instructions; and said fetching and prefetching means uses said stored corresponding next fetch address predictions as well as said instruction classes and branch predictions.
- 17. The apparatus as set forth in claim 16, wherein,
said fetching and prefetching means comprises accessing mean, selection means and update means for accessing, selecting and updating said branch predictions, said predictive annotation array means, said accessing means, said selection means, and said update means initializes, accesses, selects, and updates said next fetch address predictions in substantially the same manner as said branch predictions.
- 18. The apparatus as set forth in claim 17, wherein, said predictive annotation array means initializes each of said at least one next fetch address prediction of each of said sets of predictive annotations to predict an address that equals to a sum of a program counter and a next sequential fetch block size, said program counter indicating a current fetch address and said next sequential fetch block size indicating a next sequential fetch block's block size.
- 19. The apparatus as set forth in claim 17, wherein, said update means update each of said selected next fetch address predictions as follows:
- 20. The apparatus as set forth in claim 17, wherein,
each set of said predictive annotations comprises one branch prediction and one next fetch address prediction, said one branch and next fetch address predictions predicting branch direction and next fetch address for a dominant instruction of its corresponding set of instructions; said apparatus further comprises e) register means coupled to said fetching and prefetching means for storing each of said selected next fetch address predictions, said register being used for storing a next fetch address for a next set of instructions to be fetched, said stored next fetch address being also used for selecting said branch prediction and said next fetch address prediction for said next set of instructions to be fetched.
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] This is a division of application Ser. No. 08/800,367, filed Feb. 14, 1997, which is a continuation of application Ser. No. 08/363,107, filed Dec. 22, 1994, which is a continuation application of Ser. No. 07/938,371, filed Aug. 31, 1992, all of which are incorporated herein by reference.
Divisions (1)
|
Number |
Date |
Country |
Parent |
08800367 |
Feb 1997 |
US |
Child |
09927346 |
Aug 2001 |
US |
Continuations (2)
|
Number |
Date |
Country |
Parent |
08363107 |
Dec 1994 |
US |
Child |
08800367 |
Feb 1997 |
US |
Parent |
07938371 |
Aug 1992 |
US |
Child |
08363107 |
Dec 1994 |
US |