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.
std::vector< SatCounter > localCtrs
Array of counters that make up the local predictor.
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.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const Params * params() const
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.
const unsigned localCtrBits
Number of bits of the local predictor's counters.
Implements a local predictor that uses the PC to index into a table of counters.
LocalBP(const LocalBPParams *params)
Default branch predictor constructor.
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 Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17