Go to the documentation of this file.
41 #ifndef __CPU_PRED_2BIT_LOCAL_PRED_HH__
42 #define __CPU_PRED_2BIT_LOCAL_PRED_HH__
49 #include "params/LocalBP.hh"
95 { assert(bp_history == NULL); }
125 #endif // __CPU_PRED_2BIT_LOCAL_PRED_HH__
virtual void uncondBranch(ThreadID tid, Addr pc, void *&bp_history)
int16_t ThreadID
Thread index/ID type.
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.
const unsigned indexMask
Mask to get index bits.
const unsigned localPredictorSize
Size of the local predictor.
void squash(ThreadID tid, void *bp_history)
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.
Basically a wrapper class to hold both the branch predictor and the BTB.
std::vector< SatCounter8 > localCtrs
Array of counters that make up the local predictor.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
unsigned getLocalIndex(Addr &PC)
Calculates the local index based on the PC.
bool getPrediction(uint8_t &count)
Returns the taken/not taken prediction given the value of the counter.
const unsigned localPredictorSets
Number of sets.
LocalBP(const LocalBPParams ¶ms)
Default branch predictor constructor.
const unsigned localCtrBits
Number of bits of the local predictor's counters.
const Params & params() const
Implements a local predictor that uses the PC to index into a table of counters.
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...
Generated on Tue Mar 23 2021 19:41:25 for gem5 by doxygen 1.8.17