Branch prediction within a multithreaded processor
First Claim
1. Apparatus for processing data, said apparatus comprising:
- a multithreaded processor having a hardware scheduling mechanism for interleaving execution of program instructions from a plurality of program threads; and
a branch prediction mechanism having;
(i) a plurality of branch history registers each storing a prediction index that is a representation of preceding branch behaviour for a respective program thread of said plurality of program threads;
(ii) a global history table shared between said plurality of program threads and having a plurality of storage locations storing predictions of branch behaviour, said plurality of storage locations being indexed in dependence upon a prediction index for a currently active program thread; and
(iii) mapping logic providing different mappings for different program threads between storage locations of predictions within said plurality of storage locations and preceding branch behaviour represented by respective prediction indices.
1 Assignment
0 Petitions
Accused Products
Abstract
A branch prediction mechanism 16, 18 within a multithreaded processor having hardware scheduling logic 6, 8, 10, 12 uses a shared global history table 18 which is indexed by respective branch history registers 20, 22 for each program thread. Different mappings are used between preceding branch behaviour and the prediction value stored within respective branch history registers 20, 22. These different mappings may be provided by inverters placed into the shift in paths for the branch history registers 20, 22 or by adders 40, 42 or in some other way. The different mappings help to equalise the probability of use of the particular storage locations within the global history table 18 such that the plurality of program threads are not competing excessively for the same storage locations corresponding to the more commonly occurring patterns of preceding branch behaviour.
-
Citations
13 Claims
-
1. Apparatus for processing data, said apparatus comprising:
-
a multithreaded processor having a hardware scheduling mechanism for interleaving execution of program instructions from a plurality of program threads; and a branch prediction mechanism having; (i) a plurality of branch history registers each storing a prediction index that is a representation of preceding branch behaviour for a respective program thread of said plurality of program threads; (ii) a global history table shared between said plurality of program threads and having a plurality of storage locations storing predictions of branch behaviour, said plurality of storage locations being indexed in dependence upon a prediction index for a currently active program thread; and (iii) mapping logic providing different mappings for different program threads between storage locations of predictions within said plurality of storage locations and preceding branch behaviour represented by respective prediction indices. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A method of processing data, said method comprising the steps of:
-
interleaving execution of program instructions from a plurality of program threads using a hardware scheduling mechanism controlling a multithreaded processor; and predicting branch behaviour by; (i) storing a prediction index that is a representation of preceding branch behaviour for a respective program thread of said plurality of program threads within a respective one of a plurality of branch history registers; (ii) storing predictions of branch behaviour within a global history table shared between said plurality of program threads and having a plurality of storage locations, said plurality of storage locations being indexed in dependence upon a prediction index for a currently active program thread; and (iii) performing different mappings for different program threads between storage locations of predictions within said plurality of storage locations and preceding branch behaviour represented by respective prediction indices. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. Apparatus for processing data, said apparatus comprising:
-
multithreaded processor means having hardware scheduling means for interleaving execution of program instructions from a plurality of program threads; and branch prediction means having; (i) a plurality of branch history register means each for storing a prediction index that is a representation of preceding branch behaviour for a respective program thread of said plurality of program threads; (ii) a global history table means shared between said plurality of program threads and having a plurality of storage locations for storing predictions of branch behaviour, said plurality of storage locations being indexed in dependence upon a prediction index for a currently active program thread; and (iii) mapping means for providing different mappings for different program threads between storage locations of predictions within said plurality of storage locations and preceding branch behaviour represented by respective prediction indices.
-
Specification