45 TAGE_SC_L_64KB_StatisticalCorrectorParams *
p)
47 numEntriesSecondLocalHistories(p->numEntriesSecondLocalHistories),
48 numEntriesThirdLocalHistories(p->numEntriesThirdLocalHistories),
74 sh->setNumOrdinalHistories(3);
88 (bi->
lowConf <<2) + ((altBank!=0)<<3) +
89 ((branch_pc^(branch_pc>>2))<<7)) & ((1<<
logBias) -1);
107 branch_pc, sh->getLocalHistory(1, branch_pc),
lm,
111 branch_pc, sh->getLocalHistory(2, branch_pc),
sm,
115 branch_pc, sh->getLocalHistory(3, branch_pc),
tm,
137 return (i >= (nbr - 2)) ? 1 : 0;
153 int64_t imliCount = sh->imliCount;
156 sh->updateLocalHistory(2, branch_pc, taken, branch_pc & 15);
157 sh->updateLocalHistory(3, branch_pc, taken);
177 gUpdate(pc, taken, sh->getLocalHistory(1, pc),
lm,
180 gUpdate(pc, taken, sh->getLocalHistory(2, pc),
sm,
183 gUpdate(pc, taken, sh->getLocalHistory(3, pc),
tm,
194 TAGE_SC_L_64KB_StatisticalCorrectorParams::create()
209 int tag = pc ^ threadHistory[tid].computeTags[0][bank].comp ^
210 (threadHistory[tid].computeTags[1][bank].comp << 1);
212 return (tag & ((
ULL(1) << tagTableTagWidths[bank]) - 1));
224 int numAllocated = 0;
225 bool maxAllocReached =
false;
227 for (
int I = calcDep(bi); I < nHistoryTables; I += 2) {
229 for (
int j = 0;
j < 2; ++
j) {
230 int i = ((
j == 0) ? I : (I ^ 1)) + 1;
234 if (abs (2 * ctr + 1) <= 3) {
238 maxAllocReached = (numAllocated == maxNumAlloc);
253 if (maxAllocReached) {
258 tCounter += (penalty - 2 * numAllocated);
273 tagTableCounterBits);
276 baseUpdate(branch_pc, taken, bi);
282 tagTableCounterBits);
292 if (abs (2 * ctr + 1) == 7) {
302 baseUpdate(branch_pc, taken, bi);
313 TAGE_SC_L_TAGE_64KBParams::create()
324 TAGE_SC_L_64KBParams::create()
unsigned getIndUpds(Addr branch_pc) const
void handleTAGEUpdate(Addr branch_pc, bool taken, TAGEBase::BranchInfo *bi) override
Handles the update of the TAGE entries.
void gUpdates(ThreadID tid, Addr pc, bool taken, BranchInfo *bi, int64_t phist) override
virtual 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, BranchInfo *bi)
void ctrUpdate(T &ctr, bool taken, int nbits)
void initGEHLTable(unsigned numLenghts, std::vector< int > lengths, std::vector< int8_t > *&table, unsigned logNumEntries, std::vector< int8_t > &w, int8_t wInitValue)
void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken, BranchInfo *tage_bi, Addr corrTarget) override
std::vector< int8_t > * igehl
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)
uint16_t gtag(ThreadID tid, Addr pc, int bank) const override
Computes the partial tag of a tagged table.
unsigned getIndBiasBank(Addr branch_pc, BranchInfo *bi, int hitBank, int altBank) const override
bool isDirectCtrl() const
bool isUncondCtrl() const
std::vector< int64_t > imHist
virtual unsigned getIndUpd(Addr branch_pc) const
int gPredictions(ThreadID tid, Addr branch_pc, BranchInfo *bi, int &lsum, int64_t phist) override
std::vector< int > pUpdateThreshold
SCThreadHistory * scHistory
std::vector< int8_t > * tgehl
const Params * params() const
int gIndexLogsSubstr(int nbr, int i) override
const unsigned numEntriesFirstLocalHistories
const unsigned numEntriesThirdLocalHistories
int gindex_ext(int index, int bank) const override
std::vector< int8_t > * bwgehl
std::vector< int8_t > * imgehl
TAGE_SC_L_64KB_StatisticalCorrector(TAGE_SC_L_64KB_StatisticalCorrectorParams *p)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define ULL(N)
uint64_t constant
virtual void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken, BranchInfo *tage_bi, Addr corrTarget)
std::vector< int8_t > * pgehl
const unsigned numEntriesSecondLocalHistories
int16_t ThreadID
Thread index/ID type.
std::vector< int8_t > wim
SCThreadHistory * makeThreadHistory() override
void handleAllocAndUReset(bool alloc, bool taken, TAGEBase::BranchInfo *bi, int nrand) override
Handles Allocation and U bits reset on an update.
std::vector< int8_t > * lgehl
std::vector< int8_t > * sgehl
TAGE_SC_L_64KB(const TAGE_SC_L_64KBParams *params)
std::vector< int8_t > wbw