41#ifndef __CPU_PRED_2BIT_LOCAL_PRED_HH__
42#define __CPU_PRED_2BIT_LOCAL_PRED_HH__
49#include "params/LocalBP.hh"
54namespace branch_prediction
101 { assert(bp_history == NULL); }
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Basically a wrapper class to hold both the branch predictor and the BTB.
Implements a local predictor that uses the PC to index into a table of counters.
virtual void uncondBranch(ThreadID tid, Addr pc, void *&bp_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.
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...
const unsigned localPredictorSize
Size of the local predictor.
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.
bool getPrediction(uint8_t &count)
Returns the taken/not taken prediction given the value of the counter.
const unsigned localCtrBits
Number of bits of the local predictor's counters.
const unsigned localPredictorSets
Number of sets.
void squash(ThreadID tid, void *bp_history)
const unsigned indexMask
Mask to get index bits.
std::vector< SatCounter8 > localCtrs
Array of counters that make up the local predictor.
unsigned getLocalIndex(Addr &PC)
Calculates the local index based on the PC.
const Params & params() const
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
int16_t ThreadID
Thread index/ID type.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.