45 #ifndef __CPU_PRED_TOURNAMENT_PRED_HH__
46 #define __CPU_PRED_TOURNAMENT_PRED_HH__
53 #include "params/TournamentBP.hh"
244 #endif // __CPU_PRED_TOURNAMENT_PRED_HH__
std::vector< SatCounter > localCtrs
Local counters.
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...
Implements a tournament branch predictor, hopefully identical to the one used in the 21264...
void squash(ThreadID tid, void *bp_history)
Restores the global branch history on a squash.
unsigned globalPredictorSize
Number of entries in the global predictor.
bool getPrediction(uint8_t &count)
Returns if the branch should be taken or not, given a counter value.
const Params * params() const
unsigned localCtrBits
Number of bits of the local predictor's counters.
void updateGlobalHistTaken(ThreadID tid)
Updates global history as taken.
unsigned choicePredictorSize
Number of entries in the choice predictor.
unsigned calcLocHistIdx(Addr &branch_addr)
Returns the local history index, given a branch address.
unsigned localThreshold
Thresholds for the counter value; above the threshold is taken, equal to or below the threshold is no...
void updateGlobalHistNotTaken(ThreadID tid)
Updates global history as not taken.
unsigned globalHistoryMask
Mask to apply to globalHistory to access global history table.
unsigned globalCtrBits
Number of bits of the global predictor's counters.
unsigned globalHistoryBits
Number of bits for the global history.
unsigned localHistoryTableSize
Number of entries in the local history table.
unsigned localPredictorSize
Number of counters in the local predictor.
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
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. ...
unsigned historyRegisterMask
Mask to control how much history is stored.
Basically a wrapper class to hold both the branch predictor and the BTB.
void updateLocalHistNotTaken(unsigned local_history_idx)
Updates local histories as not taken.
int16_t ThreadID
Thread index/ID type.
unsigned getGHR(ThreadID tid, void *bp_history) const
std::vector< unsigned > localHistoryTable
Array of local history table entries.
unsigned localPredictorMask
Mask to truncate values stored in the local history table.
std::vector< SatCounter > choiceCtrs
Array of counters that make up the choice predictor.
std::vector< unsigned > globalHistory
Global history register.
The branch history information that is created upon predicting a branch.
void update(ThreadID tid, Addr branch_addr, bool taken, void *bp_history, bool squashed)
Updates the branch predictor with the actual result of a branch.
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...
static const int invalidPredictorIndex
Flag for invalid predictor index.
TournamentBP(const TournamentBPParams *params)
Default branch predictor constructor.
std::vector< SatCounter > globalCtrs
Array of counters that make up the global predictor.
unsigned choiceCtrBits
Number of bits in the choice predictor's counters.
unsigned choiceHistoryMask
Mask to apply to globalHistory to access choice history table.
unsigned localHistoryBits
Number of bits for each entry of the local history table.
void updateLocalHistTaken(unsigned local_history_idx)
Updates local histories as taken.