ltage.hh (13454:19a5b4fb1f1f) | ltage.hh (13455:56e25a5f9603) |
---|---|
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. --- 53 unchanged lines hidden (view full) --- 62class LTAGE: public TAGE 63{ 64 public: 65 LTAGE(const LTAGEParams *params); 66 67 // Base class methods. 68 void squash(ThreadID tid, void *bp_history) override; 69 | 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. --- 53 unchanged lines hidden (view full) --- 62class LTAGE: public TAGE 63{ 64 public: 65 LTAGE(const LTAGEParams *params); 66 67 // Base class methods. 68 void squash(ThreadID tid, void *bp_history) override; 69 |
70 void regStats() override; 71 |
|
70 private: 71 // Prediction Structures 72 // Loop Predictor Entry 73 struct LoopEntry 74 { 75 uint16_t numIter; 76 uint16_t currentIter; 77 uint16_t currentIterSpec; 78 uint8_t confidence; 79 uint16_t tag; 80 uint8_t age; 81 bool dir; 82 83 LoopEntry() : numIter(0), currentIter(0), currentIterSpec(0), 84 confidence(0), tag(0), age(0), dir(0) { } 85 }; 86 | 72 private: 73 // Prediction Structures 74 // Loop Predictor Entry 75 struct LoopEntry 76 { 77 uint16_t numIter; 78 uint16_t currentIter; 79 uint16_t currentIterSpec; 80 uint8_t confidence; 81 uint16_t tag; 82 uint8_t age; 83 bool dir; 84 85 LoopEntry() : numIter(0), currentIter(0), currentIterSpec(0), 86 confidence(0), tag(0), age(0), dir(0) { } 87 }; 88 |
89 // more provider types 90 enum { 91 LOOP = LAST_TAGE_PROVIDER_TYPE + 1 92 }; 93 |
|
87 // Primary branch history entry 88 struct LTageBranchInfo : public TageBranchInfo 89 { 90 uint16_t loopTag; 91 uint16_t currentIter; 92 93 bool loopPred; 94 bool loopPredValid; --- 77 unchanged lines hidden (view full) --- 172 * @param bp_history Wrapping pointer to TageBranchInfo (to allow 173 * storing derived class prediction information in the 174 * base class). 175 * @post bp_history points to valid memory. 176 */ 177 void squash( 178 ThreadID tid, bool taken, void *bp_history) override; 179 | 94 // Primary branch history entry 95 struct LTageBranchInfo : public TageBranchInfo 96 { 97 uint16_t loopTag; 98 uint16_t currentIter; 99 100 bool loopPred; 101 bool loopPredValid; --- 77 unchanged lines hidden (view full) --- 179 * @param bp_history Wrapping pointer to TageBranchInfo (to allow 180 * storing derived class prediction information in the 181 * base class). 182 * @post bp_history points to valid memory. 183 */ 184 void squash( 185 ThreadID tid, bool taken, void *bp_history) override; 186 |
187 /** 188 * Update the stats 189 * @param taken Actual branch outcome 190 * @param bi Pointer to information on the prediction 191 * recorded at prediction time. 192 */ 193 void updateStats(bool taken, TageBranchInfo* bi) override; 194 |
|
180 const unsigned logSizeLoopPred; 181 const unsigned loopTableAgeBits; 182 const unsigned loopTableConfidenceBits; 183 const unsigned loopTableTagBits; 184 const unsigned loopTableIterBits; 185 const unsigned logLoopTableAssoc; 186 const uint8_t confidenceThreshold; 187 const uint16_t loopTagMask; 188 const uint16_t loopNumIterMask; 189 190 LoopEntry *ltable; 191 192 int8_t loopUseCounter; 193 unsigned withLoopBits; | 195 const unsigned logSizeLoopPred; 196 const unsigned loopTableAgeBits; 197 const unsigned loopTableConfidenceBits; 198 const unsigned loopTableTagBits; 199 const unsigned loopTableIterBits; 200 const unsigned logLoopTableAssoc; 201 const uint8_t confidenceThreshold; 202 const uint16_t loopTagMask; 203 const uint16_t loopNumIterMask; 204 205 LoopEntry *ltable; 206 207 int8_t loopUseCounter; 208 unsigned withLoopBits; |
209 210 // stats 211 Stats::Scalar loopPredictorCorrect; 212 Stats::Scalar loopPredictorWrong; |
|
194}; 195 196#endif // __CPU_PRED_LTAGE | 213}; 214 215#endif // __CPU_PRED_LTAGE |