gem5  v20.1.0.0
tage_base.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 The University of Wisconsin
3  *
4  * Copyright (c) 2006 INRIA (Institut National de Recherche en
5  * Informatique et en Automatique / French National Research Institute
6  * for Computer Science and Applied Mathematics)
7  *
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions are
12  * met: redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer;
14  * redistributions in binary form must reproduce the above copyright
15  * notice, this list of conditions and the following disclaimer in the
16  * documentation and/or other materials provided with the distribution;
17  * neither the name of the copyright holders nor the names of its
18  * contributors may be used to endorse or promote products derived from
19  * this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 /* @file
35  * Implementation of a TAGE branch predictor. TAGE is a global-history based
36  * branch predictor. It features a PC-indexed bimodal predictor and N
37  * partially tagged tables, indexed with a hash of the PC and the global
38  * branch history. The different lengths of global branch history used to
39  * index the partially tagged tables grow geometrically. A small path history
40  * is also used in the hash.
41  *
42  * All TAGE tables are accessed in parallel, and the one using the longest
43  * history that matches provides the prediction (some exceptions apply).
44  * Entries are allocated in components using a longer history than the
45  * one that predicted when the prediction is incorrect.
46  */
47 
48 #ifndef __CPU_PRED_TAGE_BASE
49 #define __CPU_PRED_TAGE_BASE
50 
51 #include <vector>
52 
53 #include "base/statistics.hh"
54 #include "cpu/static_inst.hh"
55 #include "params/TAGEBase.hh"
56 #include "sim/sim_object.hh"
57 
58 class TAGEBase : public SimObject
59 {
60  public:
61  TAGEBase(const TAGEBaseParams *p);
62  void init() override;
63 
64  protected:
65  // Prediction Structures
66 
67  // Tage Entry
68  struct TageEntry
69  {
70  int8_t ctr;
71  uint16_t tag;
72  uint8_t u;
73  TageEntry() : ctr(0), tag(0), u(0) { }
74  };
75 
76  // Folded History Table - compressed history
77  // to mix with instruction PC to index partially
78  // tagged tables.
80  {
81  unsigned comp;
84  int outpoint;
86 
88  {
89  comp = 0;
90  }
91 
92  void init(int original_length, int compressed_length)
93  {
94  origLength = original_length;
95  compLength = compressed_length;
96  outpoint = original_length % compressed_length;
97  }
98 
99  void update(uint8_t * h)
100  {
101  comp = (comp << 1) | h[0];
102  comp ^= h[origLength] << outpoint;
103  comp ^= (comp >> compLength);
104  comp &= (ULL(1) << compLength) - 1;
105  }
106  };
107 
108  public:
109 
110  // provider type
111  enum {
117  };
118 
119  // Primary branch history entry
120  struct BranchInfo
121  {
122  int pathHist;
123  int ptGhist;
124  int hitBank;
126  int altBank;
129 
130  bool tagePred;
131  bool altTaken;
136 
137  // Pointer to dynamically allocated storage
138  // to save table indices and folded histories.
139  // To do one call to new instead of five.
140  int *storage;
141 
142  // Pointers to actual saved array within the dynamically
143  // allocated storage.
145  int *tableTags;
146  int *ci;
147  int *ct0;
148  int *ct1;
149 
150  // for stats purposes
151  unsigned provider;
152 
153  BranchInfo(const TAGEBase &tage)
154  : pathHist(0), ptGhist(0),
155  hitBank(0), hitBankIndex(0),
156  altBank(0), altBankIndex(0),
157  bimodalIndex(0),
158  tagePred(false), altTaken(false),
159  condBranch(false), longestMatchPred(false),
160  pseudoNewAlloc(false), branchPC(0),
161  provider(-1)
162  {
163  int sz = tage.nHistoryTables + 1;
164  storage = new int [sz * 5];
166  tableTags = storage + sz;
167  ci = tableTags + sz;
168  ct0 = ci + sz;
169  ct1 = ct0 + sz;
170  }
171 
172  virtual ~BranchInfo()
173  {
174  delete[] storage;
175  }
176  };
177 
178  virtual BranchInfo *makeBranchInfo();
179 
185  virtual int bindex(Addr pc_in) const;
186 
195  virtual int gindex(ThreadID tid, Addr pc, int bank) const;
196 
204  virtual int F(int phist, int size, int bank) const;
205 
213  virtual uint16_t gtag(ThreadID tid, Addr pc, int bank) const;
214 
222  template<typename T>
223  static void ctrUpdate(T & ctr, bool taken, int nbits);
224 
232  static void unsignedCtrUpdate(uint8_t & ctr, bool up, unsigned nbits);
233 
241  virtual bool getBimodePred(Addr pc, BranchInfo* bi) const;
242 
250  void baseUpdate(Addr pc, bool taken, BranchInfo* bi);
251 
260  void updateGHist(uint8_t * &h, bool dir, uint8_t * tab, int &PT);
261 
272  void update(ThreadID tid, Addr branch_pc, bool taken, BranchInfo* bi);
273 
286  virtual void updateHistories(
287  ThreadID tid, Addr branch_pc, bool taken, BranchInfo* b,
288  bool speculative,
290  Addr target = MaxAddr);
291 
305  virtual void squash(
306  ThreadID tid, bool taken, BranchInfo *bi, Addr target);
307 
320  virtual void condBranchUpdate(
321  ThreadID tid, Addr branch_pc, bool taken, BranchInfo* bi,
322  int nrand, Addr corrTarget, bool pred, bool preAdjustAlloc = false);
323 
332  bool tagePredict(
333  ThreadID tid, Addr branch_pc, bool cond_branch, BranchInfo* bi);
334 
341  virtual void updateStats(bool taken, BranchInfo* bi);
342 
346  virtual void buildTageTables();
347 
352  virtual void calculateParameters();
353 
358  virtual void calculateIndicesAndTags(
359  ThreadID tid, Addr branch_pc, BranchInfo* bi);
360 
365  virtual unsigned getUseAltIdx(BranchInfo* bi, Addr branch_pc);
366 
372  virtual void adjustAlloc(bool & alloc, bool taken, bool pred_taken);
373 
377  virtual void handleAllocAndUReset(
378  bool alloc, bool taken, BranchInfo* bi, int nrand);
379 
383  virtual void handleUReset();
384 
388  virtual void handleTAGEUpdate(
389  Addr branch_pc, bool taken, BranchInfo* bi);
390 
394  virtual void resetUctr(uint8_t & u);
395 
400  virtual void extraAltCalc(BranchInfo* bi);
401 
402  virtual bool isHighConfidence(BranchInfo* bi) const
403  {
404  return false;
405  }
406 
407  void btbUpdate(ThreadID tid, Addr branch_addr, BranchInfo* &bi);
408  unsigned getGHR(ThreadID tid, BranchInfo *bi) const;
409  int8_t getCtr(int hitBank, int hitBankIndex) const;
410  unsigned getTageCtrBits() const;
411  int getPathHist(ThreadID tid) const;
412  bool isSpeculativeUpdateEnabled() const;
413  size_t getSizeInBits() const;
414 
415  protected:
417  const unsigned nHistoryTables;
418  const unsigned tagTableCounterBits;
419  const unsigned tagTableUBits;
420  const unsigned histBufferSize;
421  const unsigned minHist;
422  const unsigned maxHist;
423  const unsigned pathHistBits;
424 
427 
431 
432  // Keep per-thread histories to
433  // support SMT.
434  struct ThreadHistory {
435  // Speculative path history
436  // (LSB of branch address)
437  int pathHist;
438 
439  // Speculative branch direction
440  // history (circular buffer)
441  // @TODO Convert to std::vector<bool>
442  uint8_t *globalHistory;
443 
444  // Pointer to most recent branch outcome
445  uint8_t* gHist;
446 
447  // Index to most recent branch outcome
448  int ptGhist;
449 
450  // Speculative folded histories.
453  };
454 
456 
460  virtual void initFoldedHistories(ThreadHistory & history);
461 
464  int *tableTags;
465 
467  int64_t tCounter;
468  uint64_t logUResetPeriod;
469  const int64_t initialTCounterValue;
470  unsigned numUseAltOnNa;
471  unsigned useAltOnNaBits;
472  unsigned maxNumAlloc;
473 
474  // Tells which tables are active
475  // (for the base TAGE implementation all are active)
476  // Some other classes use this for handling associativity
478 
480 
481  const unsigned instShiftAmt;
482 
484 
485  struct TAGEBaseStats : public Stats::Group {
486  TAGEBaseStats(Stats::Group *parent, unsigned nHistoryTables);
487  // stats
498 
501  } stats;
502 };
503 
504 #endif // __CPU_PRED_TAGE_BASE
TAGEBase::tagTableTagWidths
std::vector< unsigned > tagTableTagWidths
Definition: tage_base.hh:425
TAGEBase::getGHR
unsigned getGHR(ThreadID tid, BranchInfo *bi) const
Definition: tage_base.cc:705
TAGEBase::TAGEBaseStats::longestMatchProvider
Stats::Vector longestMatchProvider
Definition: tage_base.hh:499
TAGEBase::FoldedHistory::outpoint
int outpoint
Definition: tage_base.hh:84
TAGEBase::makeBranchInfo
virtual BranchInfo * makeBranchInfo()
Definition: tage_base.cc:76
TAGEBase::initFoldedHistories
virtual void initFoldedHistories(ThreadHistory &history)
Initialization of the folded histories.
Definition: tage_base.cc:145
TAGEBase::TAGEBaseStats::bimodalProviderCorrect
Stats::Scalar bimodalProviderCorrect
Definition: tage_base.hh:491
TAGEBase::TageEntry::u
uint8_t u
Definition: tage_base.hh:72
TAGEBase::nHistoryTables
const unsigned nHistoryTables
Definition: tage_base.hh:417
TAGEBase::histLengths
int * histLengths
Definition: tage_base.hh:462
TAGEBase::ThreadHistory::ptGhist
int ptGhist
Definition: tage_base.hh:448
TAGEBase::getTageCtrBits
unsigned getTageCtrBits() const
Definition: tage_base.cc:760
TAGEBase::BranchInfo::ct0
int * ct0
Definition: tage_base.hh:147
ThreadID
int16_t ThreadID
Thread index/ID type.
Definition: types.hh:227
TAGEBase::BranchInfo::pseudoNewAlloc
bool pseudoNewAlloc
Definition: tage_base.hh:134
TAGEBase::minHist
const unsigned minHist
Definition: tage_base.hh:421
TAGEBase::BranchInfo::storage
int * storage
Definition: tage_base.hh:140
TAGEBase::ThreadHistory::computeTags
FoldedHistory * computeTags[2]
Definition: tage_base.hh:452
TAGEBase::BranchInfo
Definition: tage_base.hh:120
TAGEBase::maxNumAlloc
unsigned maxNumAlloc
Definition: tage_base.hh:472
TAGEBase::TAGEBaseStats
Definition: tage_base.hh:485
TAGEBase::BranchInfo::altBank
int altBank
Definition: tage_base.hh:126
std::vector< unsigned >
TAGEBase::BranchInfo::altBankIndex
int altBankIndex
Definition: tage_base.hh:127
TAGEBase::LAST_TAGE_PROVIDER_TYPE
@ LAST_TAGE_PROVIDER_TYPE
Definition: tage_base.hh:116
TAGEBase::BranchInfo::ct1
int * ct1
Definition: tage_base.hh:148
TAGEBase::handleTAGEUpdate
virtual void handleTAGEUpdate(Addr branch_pc, bool taken, BranchInfo *bi)
Handles the update of the TAGE entries.
Definition: tage_base.cc:549
TAGEBase::ThreadHistory
Definition: tage_base.hh:434
Stats::Vector
A vector of scalar stats.
Definition: statistics.hh:2575
MaxAddr
const Addr MaxAddr
Definition: types.hh:166
TAGEBase::noSkip
std::vector< bool > noSkip
Definition: tage_base.hh:477
TAGEBase::getBimodePred
virtual bool getBimodePred(Addr pc, BranchInfo *bi) const
Get a branch prediction from the bimodal predictor.
Definition: tage_base.cc:287
TAGEBase::BranchInfo::tagePred
bool tagePred
Definition: tage_base.hh:130
TAGEBase::getCtr
int8_t getCtr(int hitBank, int hitBankIndex) const
Definition: tage_base.cc:754
TAGEBase::gindex
virtual int gindex(ThreadID tid, Addr pc, int bank) const
Computes the index used to access a partially tagged table.
Definition: tage_base.cc:224
Stats::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2533
TAGEBase::FoldedHistory
Definition: tage_base.hh:79
TAGEBase::useAltOnNaBits
unsigned useAltOnNaBits
Definition: tage_base.hh:471
TAGEBase::threadHistory
std::vector< ThreadHistory > threadHistory
Definition: tage_base.hh:455
TAGEBase::btableHysteresis
std::vector< bool > btableHysteresis
Definition: tage_base.hh:429
PowerISA::bi
Bitfield< 20, 16 > bi
Definition: types.hh:63
TAGEBase::condBranchUpdate
virtual void condBranchUpdate(ThreadID tid, Addr branch_pc, bool taken, BranchInfo *bi, int nrand, Addr corrTarget, bool pred, bool preAdjustAlloc=false)
Update TAGE for conditional branches.
Definition: tage_base.cc:508
TAGEBase::unsignedCtrUpdate
static void unsignedCtrUpdate(uint8_t &ctr, bool up, unsigned nbits)
Updates an unsigned counter based on up/down parameter.
Definition: tage_base.cc:273
TAGEBase::gtag
virtual uint16_t gtag(ThreadID tid, Addr pc, int bank) const
Computes the partial tag of a tagged table.
Definition: tage_base.cc:242
TAGEBase::tableIndices
int * tableIndices
Definition: tage_base.hh:463
TAGEBase::TAGE_LONGEST_MATCH
@ TAGE_LONGEST_MATCH
Definition: tage_base.hh:113
TAGEBase::tCounter
int64_t tCounter
Definition: tage_base.hh:467
TAGEBase::ThreadHistory::globalHistory
uint8_t * globalHistory
Definition: tage_base.hh:442
TAGEBase::btablePrediction
std::vector< bool > btablePrediction
Definition: tage_base.hh:428
TAGEBase::BranchInfo::ptGhist
int ptGhist
Definition: tage_base.hh:123
TAGEBase::handleAllocAndUReset
virtual void handleAllocAndUReset(bool alloc, bool taken, BranchInfo *bi, int nrand)
Handles Allocation and U bits reset on an update.
Definition: tage_base.cc:438
TAGEBase::pathHistBits
const unsigned pathHistBits
Definition: tage_base.hh:423
TAGEBase::calculateIndicesAndTags
virtual void calculateIndicesAndTags(ThreadID tid, Addr branch_pc, BranchInfo *bi)
On a prediction, calculates the TAGE indices and tags for all the different history lengths.
Definition: tage_base.cc:334
TAGEBase::TAGEBaseStats::bimodalAltMatchProviderWrong
Stats::Scalar bimodalAltMatchProviderWrong
Definition: tage_base.hh:494
TAGEBase::F
virtual int F(int phist, int size, int bank) const
Utility function to shuffle the path history depending on which tagged table we are accessing.
Definition: tage_base.cc:207
sim_object.hh
TAGEBase::tableTags
int * tableTags
Definition: tage_base.hh:464
TAGEBase::BranchInfo::hitBank
int hitBank
Definition: tage_base.hh:124
TAGEBase::extraAltCalc
virtual void extraAltCalc(BranchInfo *bi)
Extra steps for calculating altTaken For this base TAGE class it does nothing.
Definition: tage_base.cc:649
TAGEBase::BranchInfo::BranchInfo
BranchInfo(const TAGEBase &tage)
Definition: tage_base.hh:153
MipsISA::pc
Bitfield< 4 > pc
Definition: pra_constants.hh:240
statistics.hh
TAGEBase::BranchInfo::provider
unsigned provider
Definition: tage_base.hh:151
TAGEBase::BranchInfo::longestMatchPred
bool longestMatchPred
Definition: tage_base.hh:133
TAGEBase::FoldedHistory::compLength
int compLength
Definition: tage_base.hh:82
TAGEBase::baseUpdate
void baseUpdate(Addr pc, bool taken, BranchInfo *bi)
Updates the bimodal predictor.
Definition: tage_base.cc:296
TAGEBase::TageEntry::ctr
int8_t ctr
Definition: tage_base.hh:70
TAGEBase::BranchInfo::ci
int * ci
Definition: tage_base.hh:146
TAGEBase::TageEntry::TageEntry
TageEntry()
Definition: tage_base.hh:73
TAGEBase::isHighConfidence
virtual bool isHighConfidence(BranchInfo *bi) const
Definition: tage_base.hh:402
TAGEBase::resetUctr
virtual void resetUctr(uint8_t &u)
Algorithm for resetting a single U counter.
Definition: tage_base.cc:502
TAGEBase::updateHistories
virtual void updateHistories(ThreadID tid, Addr branch_pc, bool taken, BranchInfo *b, bool speculative, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr, Addr target=MaxAddr)
(Speculatively) updates global histories (path and direction).
Definition: tage_base.cc:582
TAGEBase::logUResetPeriod
uint64_t logUResetPeriod
Definition: tage_base.hh:468
TAGEBase::FoldedHistory::bufferSize
int bufferSize
Definition: tage_base.hh:85
TAGEBase::TAGEBaseStats::bimodalAltMatchProviderCorrect
Stats::Scalar bimodalAltMatchProviderCorrect
Definition: tage_base.hh:490
TAGEBase::TAGEBase
TAGEBase(const TAGEBaseParams *p)
Definition: tage_base.cc:45
TAGEBase
Definition: tage_base.hh:58
TAGEBase::BIMODAL_ONLY
@ BIMODAL_ONLY
Definition: tage_base.hh:112
TAGEBase::TageEntry
Definition: tage_base.hh:68
TAGEBase::handleUReset
virtual void handleUReset()
Handles the U bits reset.
Definition: tage_base.cc:487
TAGEBase::logTagTableSizes
std::vector< int > logTagTableSizes
Definition: tage_base.hh:426
static_inst.hh
TAGEBase::tagTableCounterBits
const unsigned tagTableCounterBits
Definition: tage_base.hh:418
TAGEBase::useAltPredForNewlyAllocated
std::vector< int8_t > useAltPredForNewlyAllocated
Definition: tage_base.hh:466
TAGEBase::BranchInfo::branchPC
Addr branchPC
Definition: tage_base.hh:135
TAGEBase::updateStats
virtual void updateStats(bool taken, BranchInfo *bi)
Update the stats.
Definition: tage_base.cc:656
TAGEBase::TageEntry::tag
uint16_t tag
Definition: tage_base.hh:71
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
TAGEBase::BranchInfo::altTaken
bool altTaken
Definition: tage_base.hh:131
TAGEBase::squash
virtual void squash(ThreadID tid, bool taken, BranchInfo *bi, Addr target)
Restores speculatively updated path and direction histories.
Definition: tage_base.cc:623
StaticInst::nullStaticInstPtr
static StaticInstPtr nullStaticInstPtr
Pointer to a statically allocated "null" instruction object.
Definition: static_inst.hh:237
TAGEBase::FoldedHistory::comp
unsigned comp
Definition: tage_base.hh:81
TAGEBase::BranchInfo::bimodalIndex
int bimodalIndex
Definition: tage_base.hh:128
TAGEBase::getSizeInBits
size_t getSizeInBits() const
Definition: tage_base.cc:778
TAGEBase::logRatioBiModalHystEntries
const unsigned logRatioBiModalHystEntries
Definition: tage_base.hh:416
TAGEBase::ctrUpdate
static void ctrUpdate(T &ctr, bool taken, int nbits)
Updates a direction counter based on the actual branch outcome.
Definition: tage_base.cc:255
TAGEBase::update
void update(ThreadID tid, Addr branch_pc, bool taken, BranchInfo *bi)
Update TAGE.
TAGEBase::TAGEBaseStats::longestMatchProviderWrong
Stats::Scalar longestMatchProviderWrong
Definition: tage_base.hh:492
TAGEBase::initialTCounterValue
const int64_t initialTCounterValue
Definition: tage_base.hh:469
TAGEBase::isSpeculativeUpdateEnabled
bool isSpeculativeUpdateEnabled() const
Definition: tage_base.cc:772
TAGEBase::histBufferSize
const unsigned histBufferSize
Definition: tage_base.hh:420
TAGEBase::gtable
TageEntry ** gtable
Definition: tage_base.hh:430
TAGEBase::TAGEBaseStats::TAGEBaseStats
TAGEBaseStats(Stats::Group *parent, unsigned nHistoryTables)
Definition: tage_base.cc:719
ArmISA::u
Bitfield< 22 > u
Definition: miscregs_types.hh:348
TAGEBase::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: tage_base.cc:81
TAGEBase::BranchInfo::hitBankIndex
int hitBankIndex
Definition: tage_base.hh:125
TAGEBase::TAGEBaseStats::longestMatchProviderCorrect
Stats::Scalar longestMatchProviderCorrect
Definition: tage_base.hh:488
TAGEBase::maxHist
const unsigned maxHist
Definition: tage_base.hh:422
TAGEBase::TAGEBaseStats::longestMatchProviderWouldHaveHit
Stats::Scalar longestMatchProviderWouldHaveHit
Definition: tage_base.hh:497
ArmISA::b
Bitfield< 7 > b
Definition: miscregs_types.hh:376
TAGEBase::FoldedHistory::init
void init(int original_length, int compressed_length)
Definition: tage_base.hh:92
TAGEBase::instShiftAmt
const unsigned instShiftAmt
Definition: tage_base.hh:481
TAGEBase::TAGE_ALT_MATCH
@ TAGE_ALT_MATCH
Definition: tage_base.hh:115
TAGEBase::btbUpdate
void btbUpdate(ThreadID tid, Addr branch_addr, BranchInfo *&bi)
Definition: tage_base.cc:182
TAGEBase::getUseAltIdx
virtual unsigned getUseAltIdx(BranchInfo *bi, Addr branch_pc)
Calculation of the index for useAltPredForNewlyAllocated On this base TAGE implementation it is alway...
Definition: tage_base.cc:347
TAGEBase::TAGEBaseStats::bimodalProviderWrong
Stats::Scalar bimodalProviderWrong
Definition: tage_base.hh:495
Stats::Group
Statistics container.
Definition: group.hh:83
TAGEBase::BIMODAL_ALT_MATCH
@ BIMODAL_ALT_MATCH
Definition: tage_base.hh:114
TAGEBase::stats
TAGEBase::TAGEBaseStats stats
TAGEBase::tagePredict
bool tagePredict(ThreadID tid, Addr branch_pc, bool cond_branch, BranchInfo *bi)
TAGE prediction called from TAGE::predict.
Definition: tage_base.cc:354
TAGEBase::FoldedHistory::update
void update(uint8_t *h)
Definition: tage_base.hh:99
ArmISA::up
Bitfield< 23 > up
Definition: types.hh:133
TAGEBase::ThreadHistory::pathHist
int pathHist
Definition: tage_base.hh:437
TAGEBase::FoldedHistory::origLength
int origLength
Definition: tage_base.hh:83
TAGEBase::TAGEBaseStats::altMatchProviderWrong
Stats::Scalar altMatchProviderWrong
Definition: tage_base.hh:493
TAGEBase::tagTableUBits
const unsigned tagTableUBits
Definition: tage_base.hh:419
RefCountingPtr< StaticInst >
TAGEBase::adjustAlloc
virtual void adjustAlloc(bool &alloc, bool taken, bool pred_taken)
Extra calculation to tell whether TAGE allocaitons may happen or not on an update For this base TAGE ...
Definition: tage_base.cc:432
TAGEBase::calculateParameters
virtual void calculateParameters()
Calculates the history lengths and some other paramters in derived classes.
Definition: tage_base.cc:168
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
TAGEBase::BranchInfo::~BranchInfo
virtual ~BranchInfo()
Definition: tage_base.hh:172
TAGEBase::BranchInfo::tableTags
int * tableTags
Definition: tage_base.hh:145
TAGEBase::TAGEBaseStats::altMatchProvider
Stats::Vector altMatchProvider
Definition: tage_base.hh:500
TAGEBase::TAGEBaseStats::altMatchProviderCorrect
Stats::Scalar altMatchProviderCorrect
Definition: tage_base.hh:489
TAGEBase::numUseAltOnNa
unsigned numUseAltOnNa
Definition: tage_base.hh:470
TAGEBase::ThreadHistory::computeIndices
FoldedHistory * computeIndices
Definition: tage_base.hh:451
TAGEBase::initialized
bool initialized
Definition: tage_base.hh:483
TAGEBase::BranchInfo::pathHist
int pathHist
Definition: tage_base.hh:122
TAGEBase::BranchInfo::condBranch
bool condBranch
Definition: tage_base.hh:132
TAGEBase::FoldedHistory::FoldedHistory
FoldedHistory()
Definition: tage_base.hh:87
ULL
#define ULL(N)
uint64_t constant
Definition: types.hh:50
TAGEBase::TAGEBaseStats::altMatchProviderWouldHaveHit
Stats::Scalar altMatchProviderWouldHaveHit
Definition: tage_base.hh:496
TAGEBase::ThreadHistory::gHist
uint8_t * gHist
Definition: tage_base.hh:445
TAGEBase::buildTageTables
virtual void buildTageTables()
Instantiates the TAGE table entries.
Definition: tage_base.cc:160
TAGEBase::updateGHist
void updateGHist(uint8_t *&h, bool dir, uint8_t *tab, int &PT)
(Speculatively) updates the global branch history.
Definition: tage_base.cc:316
TAGEBase::getPathHist
int getPathHist(ThreadID tid) const
Definition: tage_base.cc:766
TAGEBase::BranchInfo::tableIndices
int * tableIndices
Definition: tage_base.hh:144
TAGEBase::speculativeHistUpdate
const bool speculativeHistUpdate
Definition: tage_base.hh:479
SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:92
TAGEBase::bindex
virtual int bindex(Addr pc_in) const
Computes the index used to access the bimodal table.
Definition: tage_base.cc:201

Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17