Go to the documentation of this file.
41 #ifndef __CPU_PRED_TOURNAMENT_PRED_HH__
42 #define __CPU_PRED_TOURNAMENT_PRED_HH__
49 #include "params/TournamentBP.hh"
241 #endif // __CPU_PRED_TOURNAMENT_PRED_HH__
unsigned choicePredictorSize
Number of entries in the choice predictor.
unsigned globalHistoryMask
Mask to apply to globalHistory to access global history table.
static const int invalidPredictorIndex
Flag for invalid predictor index.
void updateLocalHistTaken(unsigned local_history_idx)
Updates local histories as taken.
unsigned localThreshold
Thresholds for the counter value; above the threshold is taken, equal to or below the threshold is no...
unsigned localPredictorMask
Mask to truncate values stored in the local history table.
int16_t ThreadID
Thread index/ID type.
std::vector< unsigned > localHistoryTable
Array of local history table entries.
unsigned localCtrBits
Number of bits of the local predictor's counters.
void btbUpdate(ThreadID tid, Addr branch_addr, void *&bp_history)
Updates the branch predictor to Not Taken if a BTB entry is invalid or not found.
TournamentBP(const TournamentBPParams *params)
Default branch predictor constructor.
void squash(ThreadID tid, void *bp_history)
Restores the global branch history on a squash.
void updateGlobalHistTaken(ThreadID tid)
Updates global history as taken.
unsigned localHistoryBits
Number of bits for each entry of the local history table.
unsigned choiceCtrBits
Number of bits in the choice predictor's counters.
The branch history information that is created upon predicting a branch.
std::vector< unsigned > globalHistory
Global history register.
bool lookup(ThreadID tid, Addr branch_addr, void *&bp_history)
Looks up the given address in the branch predictor and returns a true/false value as to whether it is...
std::vector< SatCounter > localCtrs
Local counters.
void updateLocalHistNotTaken(unsigned local_history_idx)
Updates local histories as not taken.
unsigned historyRegisterMask
Mask to control how much history is stored.
unsigned calcLocHistIdx(Addr &branch_addr)
Returns the local history index, given a branch address.
Basically a wrapper class to hold both the branch predictor and the BTB.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void updateGlobalHistNotTaken(ThreadID tid)
Updates global history as not taken.
const Params * params() const
unsigned localHistoryTableSize
Number of entries in the local history table.
unsigned localPredictorSize
Number of counters in the local predictor.
unsigned globalPredictorSize
Number of entries in the global predictor.
std::vector< SatCounter > choiceCtrs
Array of counters that make up the choice predictor.
bool getPrediction(uint8_t &count)
Returns if the branch should be taken or not, given a counter value.
Implements a tournament branch predictor, hopefully identical to the one used in the 21264.
void uncondBranch(ThreadID tid, Addr pc, void *&bp_history)
Records that there was an unconditional branch, and modifies the bp history to point to an object tha...
std::vector< SatCounter > globalCtrs
Array of counters that make up the global predictor.
unsigned globalHistoryBits
Number of bits for the global history.
void update(ThreadID tid, Addr branch_addr, bool taken, void *bp_history, bool squashed, const StaticInstPtr &inst, Addr corrTarget)
Updates the branch predictor with the actual result of a branch.
unsigned globalCtrBits
Number of bits of the global predictor's counters.
unsigned choiceHistoryMask
Mask to apply to globalHistory to access choice history table.
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17