Go to the documentation of this file.
43 const MPP_StatisticalCorrector_64KBParams *
p)
45 numEntriesSecondLocalHistories(
p->numEntriesSecondLocalHistories),
46 numEntriesThirdLocalHistories(
p->numEntriesThirdLocalHistories),
63 sh->setNumOrdinalHistories(3);
87 unsigned int pc = branch_pc;
88 lsum +=
gPredict((
pc << 1) +
bi->predBeforeSC,
sh->globalHist << 11,
92 lsum += 2.02 *
gPredict(branch_pc,
sh->getLocalHistory(1, branch_pc),
94 if (
sh->getLocalHistory(1, branch_pc) == 2047) lsum += 4;
95 if (
sh->getLocalHistory(1, branch_pc) == 0) lsum -= 4;
98 lsum +=
gPredict(branch_pc,
sh->getLocalHistory(3, branch_pc) << 11,
102 lsum +=
gPredict(branch_pc,
sh->getLocalHistory(2, branch_pc),
105 lsum +=
gPredict(branch_pc,
sh->getHistoryStackEntry(),
119 gUpdate((
pc << 1) +
bi->predBeforeSC, taken,
sh->globalHist << 11,
148 sh->globalHist = (
sh->globalHist << 1) + taken;
149 sh->updateLocalHistory(2, branch_pc, taken,
150 (branch_pc ^ (branch_pc >> 4)) & 15);
151 sh->updateLocalHistory(3, branch_pc, taken);
153 sh->updateHistoryStack(corrTarget, taken, inst->
isCall(),
200 MPP_StatisticalCorrector_64KBParams::create()
207 const MultiperspectivePerceptronTAGE64KBParams *
p)
227 MultiperspectivePerceptronTAGE64KBParams::create()
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
bool isDirectCtrl() const
unsigned getIndBias(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, bool bias) const override
void addSpec(HistorySpec *spec)
Add a table spec to the prefetcher.
int16_t ThreadID
Thread index/ID type.
const unsigned chooserConfWidth
std::vector< int8_t > bias
std::vector< int8_t > * lgehl
const unsigned scCountersWidth
std::vector< int > pUpdateThreshold
StatisticalCorrector::SCThreadHistory * makeThreadHistory() override
const unsigned numEntriesFirstLocalHistories
std::vector< int8_t > * tgehl
void gUpdates(ThreadID tid, Addr pc, bool taken, StatisticalCorrector::BranchInfo *bi, int64_t phist) override
void createSpecs() override
Creates the tables of the predictor.
void getBiasLSUM(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int &lsum) const override
const unsigned numEntriesThirdLocalHistories
std::vector< int8_t > * sgehl
MultiperspectivePerceptronTAGE64KB(const MultiperspectivePerceptronTAGE64KBParams *p)
std::vector< int8_t > * pgehl
SCThreadHistory * scHistory
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
virtual void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken, BranchInfo *tage_bi, Addr corrTarget)
void initGEHLTable(unsigned numLenghts, std::vector< int > lengths, std::vector< int8_t > *&table, unsigned logNumEntries, std::vector< int8_t > &w, int8_t wInitValue)
std::vector< int8_t > * ggehl
std::vector< int8_t > biasSK
int gPredictions(ThreadID tid, Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int &lsum, int64_t phist) override
const unsigned numEntriesSecondLocalHistories
size_t getSizeInBits() const override
void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken, StatisticalCorrector::BranchInfo *bi, Addr corrTarget) override
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)
MPP_StatisticalCorrector_64KB(const MPP_StatisticalCorrector_64KBParams *p)
unsigned getIndUpd(Addr branch_pc) const override
const unsigned pUpdateThresholdWidth
bool isUncondCtrl() const
T bits(T val, int first, int last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17