45 namespace branch_prediction
49 const MPP_StatisticalCorrector_8KBParams &
p)
59 sh->setNumOrdinalHistories(1);
80 unsigned int pc = branch_pc;
81 lsum +=
gPredict((
pc << 1) +
bi->predBeforeSC,
sh->globalHist << 11,
85 lsum += 2 *
gPredict(branch_pc,
sh->getLocalHistory(1, branch_pc),
87 if (
sh->getLocalHistory(1, branch_pc) == 2047) lsum += 4;
88 if (
sh->getLocalHistory(1, branch_pc) == 0) lsum -= 4;
90 lsum +=
gPredict(branch_pc,
sh->getHistoryStackEntry(),
104 gUpdate((
pc << 1) +
bi->predBeforeSC, taken,
sh->globalHist << 11,
127 sh->globalHist = (
sh->globalHist << 1) + taken;
129 sh->updateHistoryStack(corrTarget, taken, inst->
isCall(),
165 const MultiperspectivePerceptronTAGE8KBParams &
p)
bool isDirectCtrl() const
bool isUncondCtrl() const
size_t getSizeInBits() const override
void getBiasLSUM(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int &lsum) const override
MPP_StatisticalCorrector_8KB(const MPP_StatisticalCorrector_8KBParams &p)
int gPredictions(ThreadID tid, Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int &lsum, int64_t phist) override
StatisticalCorrector::SCThreadHistory * makeThreadHistory() override
void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken, StatisticalCorrector::BranchInfo *bi, Addr corrTarget) override
void gUpdates(ThreadID tid, Addr pc, bool taken, StatisticalCorrector::BranchInfo *bi, int64_t phist) override
unsigned getIndUpd(Addr branch_pc) const override
void gUpdate(Addr branch_pc, bool taken, int64_t hist, std::vector< int > &length, std::vector< int8_t > *tab, int nbr, int logs, std::vector< int8_t > &w, StatisticalCorrector::BranchInfo *bi) override
unsigned getIndBiasSK(Addr branch_pc, StatisticalCorrector::BranchInfo *bi) const override
unsigned getIndBias(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, bool bias) const override
std::vector< int8_t > * pgehl
std::vector< int8_t > * ggehl
void createSpecs() override
Creates the tables of the predictor.
MultiperspectivePerceptronTAGE8KB(const MultiperspectivePerceptronTAGE8KBParams &p)
void addSpec(HistorySpec *spec)
Add a table spec to the prefetcher.
std::vector< int8_t > * lgehl
virtual void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken, BranchInfo *tage_bi, Addr corrTarget)
int gPredict(Addr branch_pc, int64_t hist, std::vector< int > &length, std::vector< int8_t > *tab, int nbr, int logs, std::vector< int8_t > &w)
const unsigned scCountersWidth
const unsigned numEntriesFirstLocalHistories
SCThreadHistory * scHistory
const unsigned chooserConfWidth
std::vector< int8_t > biasSK
std::vector< int > pUpdateThreshold
std::vector< int8_t > bias
const unsigned pUpdateThresholdWidth
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
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.