Go to the documentation of this file.
45 TAGE_SC_L_64KB_StatisticalCorrectorParams *
p)
47 numEntriesSecondLocalHistories(
p->numEntriesSecondLocalHistories),
48 numEntriesThirdLocalHistories(
p->numEntriesThirdLocalHistories),
74 sh->setNumOrdinalHistories(3);
79 sh->imHist.resize(1 <<
im[0]);
87 return (
bi->predBeforeSC + (((hitBank+1)/4)<<4) + (
bi->highConf<<1) +
88 (
bi->lowConf <<2) + ((altBank!=0)<<3) +
89 ((branch_pc^(branch_pc>>2))<<7)) & ((1<<
logBias) -1);
100 (branch_pc << 1) +
bi->predBeforeSC,
sh->bwHist,
bwm,
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;
154 sh->imHist[imliCount] = (
sh->imHist[imliCount] << 1)
156 sh->updateLocalHistory(2, branch_pc, taken, branch_pc & 15);
157 sh->updateLocalHistory(3, branch_pc, taken);
194 TAGE_SC_L_64KB_StatisticalCorrectorParams::create()
224 int numAllocated = 0;
225 bool maxAllocReached =
false;
229 for (
int j = 0;
j < 2; ++
j) {
230 int i = ((
j == 0) ? I : (I ^ 1)) + 1;
234 if (abs (2 * ctr + 1) <= 3) {
253 if (maxAllocReached) {
258 tCounter += (penalty - 2 * numAllocated);
267 if (
bi->hitBank > 0) {
268 if (abs (2 *
gtable[
bi->hitBank][
bi->hitBankIndex].
ctr + 1) == 1) {
269 if (
bi->longestMatchPred != taken) {
271 if (
bi->altBank > 0) {
275 if (
bi->altBank == 0){
285 if (abs (2 *
gtable[
bi->hitBank][
bi->hitBankIndex].
ctr + 1) == 1) {
289 if (
bi->altTaken == taken) {
290 if (
bi->altBank > 0) {
292 if (abs (2 * ctr + 1) == 7) {
293 if (
gtable[
bi->hitBank][
bi->hitBankIndex].
u == 1) {
294 if (
bi->longestMatchPred == taken) {
305 if ((
bi->longestMatchPred !=
bi->altTaken) &&
306 (
bi->longestMatchPred == taken) &&
313 TAGE_SC_L_TAGE_64KBParams::create()
324 TAGE_SC_L_64KBParams::create()
void handleTAGEUpdate(Addr branch_pc, bool taken, TAGEBase::BranchInfo *bi) override
Handles the update of the TAGE entries.
std::vector< unsigned > tagTableTagWidths
TAGE_SC_L_64KB(const TAGE_SC_L_64KBParams *params)
bool isDirectCtrl() const
std::vector< int8_t > * pgehl
const unsigned nHistoryTables
unsigned getIndUpds(Addr branch_pc) const
std::vector< int8_t > * sgehl
int16_t ThreadID
Thread index/ID type.
SCThreadHistory * makeThreadHistory() override
int calcDep(TAGEBase::BranchInfo *bi)
int gPredictions(ThreadID tid, Addr branch_pc, BranchInfo *bi, int &lsum, int64_t phist) override
uint16_t gtag(ThreadID tid, Addr pc, int bank) const override
Computes the partial tag of a tagged table.
std::vector< int8_t > * lgehl
unsigned getIndBiasBank(Addr branch_pc, BranchInfo *bi, int hitBank, int altBank) const override
std::vector< int > pUpdateThreshold
std::vector< bool > noSkip
const unsigned numEntriesFirstLocalHistories
virtual unsigned getIndUpd(Addr branch_pc) const
int gIndexLogsSubstr(int nbr, int i) override
std::vector< int8_t > * bwgehl
std::vector< ThreadHistory > threadHistory
std::vector< int8_t > * tgehl
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)
std::vector< int8_t > wbw
void handleUReset() override
Handles the U bits reset.
void baseUpdate(Addr pc, bool taken, BranchInfo *bi)
Updates the bimodal predictor.
TAGE_SC_L_64KB_StatisticalCorrector(TAGE_SC_L_64KB_StatisticalCorrectorParams *p)
const unsigned tagTableCounterBits
int gindex_ext(int index, int bank) const override
SCThreadHistory * scHistory
std::vector< int8_t > * imgehl
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const unsigned numEntriesSecondLocalHistories
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)
static void ctrUpdate(T &ctr, bool taken, int nbits)
Updates a direction counter based on the actual branch outcome.
const unsigned numEntriesThirdLocalHistories
std::vector< int8_t > wim
std::vector< int8_t > * igehl
void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken, BranchInfo *tage_bi, Addr corrTarget) override
void handleAllocAndUReset(bool alloc, bool taken, TAGEBase::BranchInfo *bi, int nrand) override
Handles Allocation and U bits reset on an update.
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 tagTableUBits
#define ULL(N)
uint64_t constant
bool isUncondCtrl() const
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17