gem5  v21.1.0.2
multiperspective_perceptron_tage.cc
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Texas A&M University
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright notice,
8  * this list of conditions and the following disclaimer.
9  *
10  * 2. Redistributions in binary form must reproduce the above copyright notice,
11  * this list of conditions and the following disclaimer in the documentation
12  * and/or other materials provided with the distribution.
13  *
14  * 3. Neither the name of the copyright holder nor the names of its
15  * contributors may be used to endorse or promote products derived from this
16  * software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  *
30  * Author: Daniel A. Jiménez
31  * Adapted to gem5 by: Javier Bueno Hedo
32  *
33  */
34 
35 /*
36  * Multiperspective Perceptron Predictor with TAGE (by Daniel A. Jiménez)
37  */
38 
40 
41 #include "base/random.hh"
42 
43 namespace gem5
44 {
45 
46 namespace branch_prediction
47 {
48 
49 void
51 {
52  assert(tunedHistoryLengths.size() == (nHistoryTables+1));
53  for (int i = 0; i <= nHistoryTables; i += 1) {
55  }
56 }
57 
58 void
59 MPP_TAGE::handleTAGEUpdate(Addr branch_pc, bool taken,
61 {
62  if (bi->hitBank > 0) {
63  if (abs (2 * gtable[bi->hitBank][bi->hitBankIndex].ctr + 1) == 1) {
64  if (bi->longestMatchPred != taken) {
65  // acts as a protection
66  if (bi->altBank > 0) {
67  ctrUpdate(gtable[bi->altBank][bi->altBankIndex].ctr, taken,
69  }
70  if (bi->altBank == 0){
71  baseUpdate(branch_pc, taken, bi);
72  }
73  }
74  }
75 
76  ctrUpdate(gtable[bi->hitBank][bi->hitBankIndex].ctr, taken,
78 
79  //sign changes: no way it can have been useful
80  if (abs (2 * gtable[bi->hitBank][bi->hitBankIndex].ctr + 1) == 1) {
81  gtable[bi->hitBank][bi->hitBankIndex].u = 0;
82  }
83  } else {
84  baseUpdate(branch_pc, taken, bi);
85  }
86 
87  if ((bi->longestMatchPred != bi->altTaken) &&
88  (bi->longestMatchPred == taken) &&
89  (gtable[bi->hitBank][bi->hitBankIndex].u < (1 << tagTableUBits) -1)) {
90  gtable[bi->hitBank][bi->hitBankIndex].u++;
91  }
92 }
93 
94 void
95 MPP_TAGE::handleAllocAndUReset(bool alloc, bool taken,
96  TAGEBase::BranchInfo* bi, int nrand)
97 {
98  if (!alloc) {
99  return;
100  }
101 
102  int a = 1;
103 
104  if ((random_mt.random<int>() & 127) < 32) {
105  a = 2;
106  }
107  int dep = bi->hitBank + a;
108 
109  int penalty = 0;
110  int numAllocated = 0;
111  int T = 1;
112 
113  for (int i = dep; i <= nHistoryTables; i += 1) {
114  if (noSkip[i]) {
115  if (gtable[i][bi->tableIndices[i]].u == 0) {
116  gtable[i][bi->tableIndices[i]].tag = bi->tableTags[i];
117  gtable[i][bi->tableIndices[i]].ctr = taken ? 0 : -1;
118  numAllocated++;
119  if (T <= 0) {
120  break;
121  }
122  i += 1;
123  T -= 1;
124  } else {
125  penalty++;
126  }
127  } else { assert(false); }
128  }
129 
130  tCounter += (penalty - numAllocated);
131 
132  handleUReset();
133 }
134 
135 void
137 {
138  //just the best formula for the Championship:
139  //In practice when one out of two entries are useful
140  if (tCounter < 0) {
141  tCounter = 0;
142  }
143 
144  if (tCounter >= ((1ULL << logUResetPeriod))) {
145  // Update the u bits for the short tags table
146  for (int i = 1; i <= nHistoryTables; i++) {
147  for (int j = 0; j < (1ULL << logTagTableSizes[i]); j++) {
148  resetUctr(gtable[i][j].u);
149  }
150  }
151 
152  tCounter = 0;
153  }
154 }
155 
156 void
158 {
159  // On real HW it should be u >>= 1 instead of if > 0 then u--
160  if (u > 0) {
161  u--;
162  }
163 }
164 
165 
166 int
167 MPP_TAGE::bindex(Addr pc_in) const
168 {
169  uint32_t pc = (uint32_t) pc_in;
170  return ((pc ^ (pc >> 4)) & ((1ULL << (logTagTableSizes[0])) - 1));
171 }
172 
173 unsigned
175 {
176  uint32_t hpc = ((uint32_t) branch_pc);
177  hpc = (hpc ^(hpc >> 4));
178  return 2 * ((hpc & ((numUseAltOnNa/2)-1)) ^ bi->longestMatchPred) +
179  ((bi->hitBank > (nHistoryTables / 3)) ? 1 : 0);
180 }
181 
182 void
183 MPP_TAGE::adjustAlloc(bool & alloc, bool taken, bool pred_taken)
184 {
185  // Do not allocate too often if the prediction is ok
186  if ((taken == pred_taken) && ((random_mt.random<int>() & 31) != 0)) {
187  alloc = false;
188  }
189 }
190 
191 void
193  ThreadID tid, Addr branch_pc, bool taken, TAGEBase::BranchInfo* b,
194  bool speculative, const StaticInstPtr &inst, Addr target)
195 {
196  if (speculative != speculativeHistUpdate) {
197  return;
198  }
199  // speculation is not implemented
200  assert(! speculative);
201 
202  ThreadHistory& tHist = threadHistory[tid];
203 
204  int brtype = inst->isDirectCtrl() ? 0 : 2;
205  if (! inst->isUncondCtrl()) {
206  ++brtype;
207  }
208  updatePathAndGlobalHistory(tHist, brtype, taken, branch_pc, target);
209 }
210 
211 void
213  ThreadHistory& tHist, int brtype, bool taken, Addr branch_pc, Addr target)
214 {
215  // TAGE update
216  int tmp = (branch_pc << 1) + taken;
217  int path = branch_pc;
218 
219  int maxt = (brtype & 1) ? 1 : 4;
220 
221  for (int t = 0; t < maxt; t++) {
222  bool dir = (tmp & 1);
223  tmp >>= 1;
224  int pathbit = (path & 127);
225  path >>= 1;
226  updateGHist(tHist.gHist, dir, tHist.globalHistory, tHist.ptGhist);
227  tHist.pathHist = (tHist.pathHist << 1) ^ pathbit;
228  for (int i = 1; i <= nHistoryTables; i++) {
229  tHist.computeIndices[i].update(tHist.gHist);
230  tHist.computeTags[0][i].update(tHist.gHist);
231  tHist.computeTags[1][i].update(tHist.gHist);
232  }
233  }
234 }
235 
236 bool
238 {
239  if (bi->hitBank > 0) {
240  return (abs(2 * gtable[bi->hitBank][bi->hitBankIndex].ctr + 1)) >=
241  ((1 << tagTableCounterBits) - 1);
242  } else {
243  int bim = (btablePrediction[bi->bimodalIndex] << 1)
244  + btableHysteresis[bi->bimodalIndex >> logRatioBiModalHystEntries];
245  return (bim == 0) || (bim == 3);
246  }
247 
248 }
249 
250 bool
252 {
253  return LoopPredictor::calcConf(index) ||
255 }
256 
257 bool
259 {
260  return ((random_mt.random<int>() & 7) == 0);
261 }
262 
264  const MPP_StatisticalCorrectorParams &p) : StatisticalCorrector(p),
265  thirdH(0), pnb(p.pnb), logPnb(p.logPnb), pm(p.pm), gnb(p.gnb),
266  logGnb(p.logGnb), gm(p.gm)
267 {
268  initGEHLTable(pnb, pm, pgehl, logPnb, wp, -1);
269  initGEHLTable(gnb, gm, ggehl, logGnb, wg, -1);
270 
271  for (int8_t &pos : wl) {
272  pos = -1;
273  }
274 }
275 
276 void
278 {
279  for (int j = 0; j < (1 << logBias); j++) {
280  if (j & 1) {
281  bias[j] = 15;
282  biasSK[j] = 15;
283  } else {
284  bias[j] = -16;
285  biasSK[j] = -16;
286  }
287  }
288 }
289 
290 unsigned
292  StatisticalCorrector::BranchInfo* bi, bool bias) const
293 {
294  unsigned int truncated_pc = branch_pc;
295  return ((truncated_pc << 1) + bi->predBeforeSC) & ((1 << logBias) - 1);
296 }
297 
298 unsigned
301 {
302  return (((branch_pc ^ (branch_pc >> (logBias - 1))) << 1)
303  + bi->predBeforeSC) & ((1 << logBias) - 1);
304 }
305 
306 unsigned
308  StatisticalCorrector::BranchInfo* bi, int hitBank, int altBank) const
309 {
310  return 0;
311 }
312 
313 int
315 {
316  return (i >= (nbr - 2)) ? 1 : 0;
317 }
318 
319 unsigned
321 {
322  return ((branch_pc ^ (branch_pc >> 4)) & ((1 << (logSizeUp)) - 1));
323 }
324 
325 void
326 MPP_StatisticalCorrector::gUpdate(Addr branch_pc, bool taken, int64_t hist,
327  std::vector<int> & length, std::vector<int8_t> * tab,
328  int nbr, int logs, std::vector<int8_t> & w,
330 {
331  int percsum = 0;
332  for (int i = 0; i < nbr; i++) {
333  int64_t bhist = hist & ((int64_t) ((1 << length[i]) - 1));
334  int64_t index = gIndex(branch_pc, bhist, logs, nbr, i);
335  percsum += (2 * tab[i][index] + 1);
336  ctrUpdate(tab[i][index], taken, scCountersWidth - (i < (nbr - 1)));
337  }
338 }
339 
340 bool
342  bool cond_branch, StatisticalCorrector::BranchInfo* bi,
343  bool prev_pred_taken, bool bias_bit, bool use_conf_ctr,
344  int8_t conf_ctr, unsigned conf_bits, int hitBank, int altBank,
345  int64_t phist, int init_lsum)
346 {
347  bool pred_taken = prev_pred_taken;
348  if (cond_branch) {
349 
350  bi->predBeforeSC = prev_pred_taken;
351 
352  int lsum = init_lsum;
353 
354  getBiasLSUM(branch_pc, bi, lsum);
355 
356  int thres = gPredictions(tid, branch_pc, bi, lsum, phist);
357 
358  // These will be needed at update time
359  bi->lsum = lsum;
360  bi->thres = thres;
361  bi->scPred = (lsum >= 0);
362 
363  if (pred_taken != bi->scPred) {
364  pred_taken = bi->scPred;
365 
366  if (bi->highConf /* comes from tage prediction */) {
367  if ((abs(lsum) < thres / 3))
368  pred_taken = (firstH < 0) ? bi->scPred : prev_pred_taken;
369  else if ((abs(lsum) < 2 * thres / 3))
370  pred_taken = (secondH < 0) ? bi->scPred : prev_pred_taken;
371  else if ((abs(lsum) < thres))
372  pred_taken = (thirdH < 0) ? bi->scPred : prev_pred_taken;
373  }
374  }
375  }
376 
377  return pred_taken;
378 }
379 
381  const MultiperspectivePerceptronTAGEParams &p)
382  : MultiperspectivePerceptron(p), tage(p.tage),
383  loopPredictor(p.loop_predictor),
384  statisticalCorrector(p.statistical_corrector)
385 {
387  "Speculative updates support is not implemented");
388 }
389 
390 void
392 {
393  tage->init();
394  int numBitsTage = tage->getSizeInBits();
395  int numBitsLoopPred = loopPredictor->getSizeInBits();
396  int numBitsStatisticalCorrector = statisticalCorrector->getSizeInBits();
397 
398  setExtraBits(numBitsTage + numBitsLoopPred + numBitsStatisticalCorrector);
400 }
401 
402 
403 unsigned int
405  const HistorySpec &spec, int index) const
406 {
407  // get the hash for the feature
408  unsigned int g = spec.getHash(tid, bi.getPC(), bi.getPC() >> 2, index);
409  // shift it and xor it with the hashed PC
410  unsigned long long int h = g;
411  h <<= 20;
412  h ^= (bi.getPC() ^ (bi.getPC() >> 2));
413 
414  // maybe xor in an IMLI counter
415  if ((1ull << index) & imli_mask1) {
416  h += threadData[tid]->imli_counter[0];
417  }
418  if ((1ull << index) & imli_mask4) {
419  h += threadData[tid]->imli_counter[3];
420  }
421 
422  // return it modulo the table size
423  return h % table_sizes[index];
424 }
425 
426 
427 int
429  MPPTAGEBranchInfo &bi) const
430 {
431  int yout = 0;
432  for (int i = 0; i < specs.size(); i += 1) {
433  yout += specs[i]->coeff *
434  threadData[tid]->tables[i][getIndex(tid, bi, *specs[i], i)];
435  }
436  return yout;
437 }
438 
439 void
442  bool taken)
443 {
444  // update tables
445  for (int i = 0; i < specs.size(); i += 1) {
446  unsigned int idx = getIndex(tid, bi, *specs[i], i);
447  short int *c =
448  &threadData[tid]->tables[i][idx];
449  short int max_weight = (1 << (specs[i]->width - 1)) - 1;
450  short int min_weight = -(1 << (specs[i]->width - 1));
451  if (taken) {
452  if (*c < max_weight) {
453  *c += 1;
454  }
455  } else {
456  if (*c > min_weight) {
457  *c -= 1;
458  }
459  }
460  }
461 }
462 
463 void
466  bool taken)
467 {
468  unsigned int hpc = (bi.getPC() ^ (bi.getPC() >> 2));
469  unsigned int pc = bi.getPC();
470 
471  // update recency stack
472  unsigned short recency_pc = pc >> 2;
473  threadData[tid]->insertRecency(recency_pc, assoc);
474 
475  // update acyclic history
476  threadData[tid]->updateAcyclic(taken, hpc);
477 
478  // update modpath histories
479  for (int ii = 0; ii < modpath_indices.size(); ii +=1) {
480  int i = modpath_indices[ii];
481  if (hpc % (i + 2) == 0) {
482  memmove(&threadData[tid]->modpath_histories[i][1],
483  &threadData[tid]->modpath_histories[i][0],
484  sizeof(unsigned short int) * (modpath_lengths[ii] - 1));
485  threadData[tid]->modpath_histories[i][0] = hpc;
486  }
487  }
488 
489  // update modulo histories
490  for (int ii = 0; ii < modhist_indices.size(); ii += 1) {
491  int i = modhist_indices[ii];
492  if (hpc % (i + 2) == 0) {
493  for (int j = modhist_lengths[ii] - 1; j > 0; j -= 1) {
494  threadData[tid]->mod_histories[i][j] =
495  threadData[tid]->mod_histories[i][j-1];
496  }
497  threadData[tid]->mod_histories[i][0] = taken;
498  }
499  }
500 
501  // update blurry history
502  std::vector<std::vector<unsigned int>> &blurrypath_histories =
503  threadData[tid]->blurrypath_histories;
504  for (int i = 0; i < blurrypath_histories.size(); i += 1)
505  {
506  if (blurrypath_histories[i].size() > 0) {
507  unsigned int z = pc >> i;
508  if (blurrypath_histories[i][0] != z) {
509  memmove(&blurrypath_histories[i][1],
510  &blurrypath_histories[i][0],
511  sizeof(unsigned int) *
512  (blurrypath_histories[i].size() - 1));
513  blurrypath_histories[i][0] = z;
514  }
515  }
516  }
517 }
518 
519 bool
521  void * &bp_history)
522 {
524  new MPPTAGEBranchInfo(instPC, pcshift, true, *tage, *loopPredictor,
526  bp_history = (void *)bi;
527  bool pred_taken = tage->tagePredict(tid, instPC, true, bi->tageBranchInfo);
528 
529  pred_taken = loopPredictor->loopPredict(tid, instPC, true,
530  bi->lpBranchInfo, pred_taken, instShiftAmt);
531 
532  bi->scBranchInfo->highConf = tage->isHighConfidence(bi->tageBranchInfo);
533 
534  int init_lsum = 22;
535  if (!pred_taken) {
536  init_lsum = -init_lsum;
537  }
538  init_lsum += computePartialSum(tid, *bi);
539 
540  pred_taken = statisticalCorrector->scPredict(tid, instPC, true,
541  bi->scBranchInfo, pred_taken, false /* bias_bit: unused */,
542  false /* use_tage_ctr: unused */, 0 /* conf_ctr: unused */,
543  0 /* conf_bits: unused */, 0 /* hitBank: unused */,
544  0 /* altBank: unused */, tage->getPathHist(tid), init_lsum);
545  bi->predictedTaken = pred_taken;
546  bi->lpBranchInfo->predTaken = pred_taken;
547  return pred_taken;
548 }
549 
550 
551 void
553  bool taken, StatisticalCorrector::BranchInfo *bi, Addr corrTarget,
554  bool bias_bit, int hitBank, int altBank, int64_t phist)
555 {
556  bool scPred = (bi->lsum >= 0);
557 
558  if (bi->predBeforeSC != scPred) {
559  if (abs(bi->lsum) < bi->thres) {
560  if (bi->highConf) {
561  if (abs(bi->lsum) < bi->thres / 3) {
562  ctrUpdate(firstH, (bi->predBeforeSC == taken),
564  } else if (abs(bi->lsum) < 2 * bi->thres / 3) {
565  ctrUpdate(secondH, (bi->predBeforeSC == taken),
567  } else if (abs(bi->lsum) < bi->thres) {
568  ctrUpdate(thirdH, (bi->predBeforeSC == taken),
570  }
571  }
572  }
573  }
574 
575  if ((scPred != taken) || ((abs(bi->lsum) < bi->thres))) {
576 
577  ctrUpdate(pUpdateThreshold[getIndUpd(branch_pc)], (scPred != taken),
578  pUpdateThresholdWidth + 1); //+1 because the sign is ignored
579  if (pUpdateThreshold[getIndUpd(branch_pc)] < 0)
580  pUpdateThreshold[getIndUpd(branch_pc)] = 0;
581 
582  unsigned indBias = getIndBias(branch_pc, bi, false);
583  unsigned indBiasSK = getIndBiasSK(branch_pc, bi);
584 
585  ctrUpdate(bias[indBias], taken, scCountersWidth);
586  ctrUpdate(biasSK[indBiasSK], taken, scCountersWidth);
587 
588  gUpdates(tid, branch_pc, taken, bi, phist);
589  }
590 }
591 
592 void
594  void *bp_history, bool squashed,
595  const StaticInstPtr & inst,
596  Addr corrTarget)
597 {
598  assert(bp_history);
599  MPPTAGEBranchInfo *bi = static_cast<MPPTAGEBranchInfo*>(bp_history);
600 
601  if (squashed) {
603  // This restores the global history, then update it
604  // and recomputes the folded histories.
605  tage->squash(tid, taken, bi->tageBranchInfo, corrTarget);
606  if (bi->tageBranchInfo->condBranch) {
607  loopPredictor->squashLoop(bi->lpBranchInfo);
608  }
609  }
610  return;
611  }
612 
613  if (bi->isUnconditional()) {
614  statisticalCorrector->scHistoryUpdate(instPC, inst, taken,
615  bi->scBranchInfo, corrTarget);
616  tage->updateHistories(tid, instPC, taken, bi->tageBranchInfo, false,
617  inst, corrTarget);
618  } else {
619  tage->updateStats(taken, bi->tageBranchInfo);
620  loopPredictor->updateStats(taken, bi->lpBranchInfo);
621  statisticalCorrector->updateStats(taken, bi->scBranchInfo);
622 
623  loopPredictor->condBranchUpdate(tid, instPC, taken,
624  bi->tageBranchInfo->tagePred, bi->lpBranchInfo, instShiftAmt);
625 
626  bool scPred = (bi->scBranchInfo->lsum >= 0);
627  if ((scPred != taken) ||
628  ((abs(bi->scBranchInfo->lsum) < bi->scBranchInfo->thres))) {
629  updatePartial(tid, *bi, taken);
630  }
631  statisticalCorrector->condBranchUpdate(tid, instPC, taken,
632  bi->scBranchInfo, corrTarget, false /* bias_bit: unused */,
633  0 /* hitBank: unused */, 0 /* altBank: unused*/,
634  tage->getPathHist(tid));
635 
636  tage->condBranchUpdate(tid, instPC, taken, bi->tageBranchInfo,
637  random_mt.random<int>(), corrTarget,
638  bi->predictedTaken, true);
639 
640  updateHistories(tid, *bi, taken);
641 
643  if (inst->isCondCtrl() && inst->isDirectCtrl()
644  && !inst->isCall() && !inst->isReturn()) {
645  uint32_t truncated_target = corrTarget;
646  uint32_t truncated_pc = instPC;
647  if (truncated_target < truncated_pc) {
648  if (!taken) {
649  threadData[tid]->imli_counter[0] = 0;
650  } else {
651  threadData[tid]->imli_counter[0] += 1;
652  }
653  } else {
654  if (taken) {
655  threadData[tid]->imli_counter[3] = 0;
656  } else {
657  threadData[tid]->imli_counter[3] += 1;
658  }
659  }
660  }
661 
662  statisticalCorrector->scHistoryUpdate(instPC, inst, taken,
663  bi->scBranchInfo, corrTarget);
664 
665  tage->updateHistories(tid, instPC, taken, bi->tageBranchInfo,
666  false, inst, corrTarget);
667  }
668  }
669  delete bi;
670 }
671 
672 void
674  void * &bp_history)
675 {
679  bp_history = (void *) bi;
680 }
681 
682 void
684 {
685  assert(bp_history);
686  MPPTAGEBranchInfo *bi = static_cast<MPPTAGEBranchInfo*>(bp_history);
687  delete bi;
688 }
689 
690 } // namespace branch_prediction
691 } // namespace gem5
gem5::branch_prediction::MultiperspectivePerceptronTAGE::statisticalCorrector
StatisticalCorrector * statisticalCorrector
Definition: multiperspective_perceptron_tage.hh:197
gem5::branch_prediction::MPP_StatisticalCorrector::condBranchUpdate
void condBranchUpdate(ThreadID tid, Addr branch_pc, bool taken, StatisticalCorrector::BranchInfo *bi, Addr corrTarget, bool b, int hitBank, int altBank, int64_t phist) override
Definition: multiperspective_perceptron_tage.cc:552
gem5::branch_prediction::TAGEBase::getSizeInBits
size_t getSizeInBits() const
Definition: tage_base.cc:792
gem5::branch_prediction::StatisticalCorrector::scHistoryUpdate
virtual void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken, BranchInfo *tage_bi, Addr corrTarget)
Definition: statistical_corrector.cc:295
gem5::branch_prediction::MultiperspectivePerceptronTAGE::computePartialSum
int computePartialSum(ThreadID tid, MPPTAGEBranchInfo &bi) const
Definition: multiperspective_perceptron_tage.cc:428
gem5::branch_prediction::TAGEBase::speculativeHistUpdate
const bool speculativeHistUpdate
Definition: tage_base.hh:488
gem5::branch_prediction::TAGEBase::squash
virtual void squash(ThreadID tid, bool taken, BranchInfo *bi, Addr target)
Restores speculatively updated path and direction histories.
Definition: tage_base.cc:629
gem5::branch_prediction::MultiperspectivePerceptron::modhist_indices
std::vector< int > modhist_indices
Definition: multiperspective_perceptron.hh:376
gem5::branch_prediction::MPP_StatisticalCorrector::getIndBias
unsigned getIndBias(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, bool bias) const override
Definition: multiperspective_perceptron_tage.cc:291
gem5::branch_prediction::MPP_LoopPredictor::optionalAgeInc
bool optionalAgeInc() const override
Definition: multiperspective_perceptron_tage.cc:258
gem5::branch_prediction::TAGEBase::tagTableUBits
const unsigned tagTableUBits
Definition: tage_base.hh:427
gem5::branch_prediction::TAGEBase::threadHistory
std::vector< ThreadHistory > threadHistory
Definition: tage_base.hh:464
gem5::branch_prediction::MultiperspectivePerceptronTAGE::updatePartial
void updatePartial(ThreadID tid, MPPTAGEBranchInfo &bi, bool taken)
Definition: multiperspective_perceptron_tage.cc:440
gem5::branch_prediction::MPP_TAGE::updateHistories
void updateHistories(ThreadID tid, Addr branch_pc, bool taken, TAGEBase::BranchInfo *b, bool speculative, const StaticInstPtr &inst, Addr target) override
(Speculatively) updates global histories (path and direction).
Definition: multiperspective_perceptron_tage.cc:192
gem5::branch_prediction::MultiperspectivePerceptronTAGE::lookup
bool lookup(ThreadID tid, Addr instPC, void *&bp_history) override
Looks up a given PC in the BP to see if it is taken or not taken.
Definition: multiperspective_perceptron_tage.cc:520
gem5::branch_prediction::TAGEBase::ThreadHistory::globalHistory
uint8_t * globalHistory
Definition: tage_base.hh:451
gem5::MipsISA::w
Bitfield< 0 > w
Definition: pra_constants.hh:281
gem5::branch_prediction::TAGEBase::ThreadHistory::computeIndices
FoldedHistory * computeIndices
Definition: tage_base.hh:460
gem5::branch_prediction::TAGEBase::isSpeculativeUpdateEnabled
bool isSpeculativeUpdateEnabled() const
Definition: tage_base.cc:786
gem5::branch_prediction::MPP_TAGE::tunedHistoryLengths
std::vector< unsigned int > tunedHistoryLengths
Definition: multiperspective_perceptron_tage.hh:59
gem5::branch_prediction::MultiperspectivePerceptron::imli_mask1
const unsigned long long int imli_mask1
Definition: multiperspective_perceptron.hh:277
gem5::MipsISA::index
Bitfield< 30, 0 > index
Definition: pra_constants.hh:47
gem5::branch_prediction::MultiperspectivePerceptronTAGE::MPPTAGEBranchInfo
Branch information data type.
Definition: multiperspective_perceptron_tage.hh:202
gem5::branch_prediction::MultiperspectivePerceptron::modpath_lengths
std::vector< int > modpath_lengths
Definition: multiperspective_perceptron.hh:379
gem5::Serializable::path
static std::stack< std::string > path
Definition: serialize.hh:315
gem5::branch_prediction::TAGEBase::ThreadHistory::pathHist
int pathHist
Definition: tage_base.hh:446
gem5::branch_prediction::StatisticalCorrector::biasSK
std::vector< int8_t > biasSK
Definition: statistical_corrector.hh:170
gem5::branch_prediction::MultiperspectivePerceptron::assoc
int assoc
Definition: multiperspective_perceptron.hh:368
gem5::branch_prediction::LoopPredictor::squashLoop
void squashLoop(BranchInfo *bi)
Definition: loop_predictor.cc:310
gem5::branch_prediction::StatisticalCorrector::wl
std::vector< int8_t > wl
Definition: statistical_corrector.hh:160
gem5::branch_prediction::MPP_StatisticalCorrector::logGnb
const unsigned logGnb
Definition: multiperspective_perceptron_tage.hh:116
gem5::branch_prediction::TAGEBase::updateStats
virtual void updateStats(bool taken, BranchInfo *bi)
Update the stats.
Definition: tage_base.cc:662
gem5::branch_prediction::MPP_StatisticalCorrector::thirdH
int8_t thirdH
Definition: multiperspective_perceptron_tage.hh:106
gem5::branch_prediction::MultiperspectivePerceptron::imli_mask4
const unsigned long long int imli_mask4
Definition: multiperspective_perceptron.hh:278
gem5::branch_prediction::TAGEBase::isHighConfidence
virtual bool isHighConfidence(BranchInfo *bi) const
Definition: tage_base.hh:410
random.hh
gem5::ArmISA::a
Bitfield< 8 > a
Definition: misc_types.hh:65
gem5::branch_prediction::MultiperspectivePerceptronTAGE::squash
void squash(ThreadID tid, void *bp_history) override
Definition: multiperspective_perceptron_tage.cc:683
gem5::branch_prediction::LoopPredictor::LoopEntry::confidence
uint8_t confidence
Definition: loop_predictor.hh:70
gem5::branch_prediction::StatisticalCorrector::firstH
int8_t firstH
Definition: statistical_corrector.hh:189
gem5::StaticInst::isCondCtrl
bool isCondCtrl() const
Definition: static_inst.hh:187
gem5::branch_prediction::MPP_TAGE::handleUReset
void handleUReset() override
Handles the U bits reset.
Definition: multiperspective_perceptron_tage.cc:136
gem5::branch_prediction::StatisticalCorrector
Definition: statistical_corrector.hh:58
gem5::branch_prediction::MPP_TAGE::getUseAltIdx
unsigned getUseAltIdx(TAGEBase::BranchInfo *bi, Addr branch_pc) override
Calculation of the index for useAltPredForNewlyAllocated On this base TAGE implementation it is alway...
Definition: multiperspective_perceptron_tage.cc:174
std::vector< int >
gem5::branch_prediction::LoopPredictor::loopPredict
bool loopPredict(ThreadID tid, Addr branch_pc, bool cond_branch, BranchInfo *bi, bool prev_pred_taken, unsigned instShiftAmt)
Get the loop prediction.
Definition: loop_predictor.cc:277
gem5::branch_prediction::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:261
gem5::branch_prediction::LoopPredictor::getSizeInBits
size_t getSizeInBits() const
Definition: loop_predictor.cc:367
gem5::branch_prediction::StatisticalCorrector::initGEHLTable
void initGEHLTable(unsigned numLenghts, std::vector< int > lengths, std::vector< int8_t > *&table, unsigned logNumEntries, std::vector< int8_t > &w, int8_t wInitValue)
Definition: statistical_corrector.cc:134
gem5::ArmISA::i
Bitfield< 7 > i
Definition: misc_types.hh:66
gem5::branch_prediction::TAGEBase::noSkip
std::vector< bool > noSkip
Definition: tage_base.hh:486
gem5::PowerISA::bi
Bitfield< 20, 16 > bi
Definition: types.hh:80
gem5::branch_prediction::TAGEBase::logRatioBiModalHystEntries
const unsigned logRatioBiModalHystEntries
Definition: tage_base.hh:424
gem5::branch_prediction::TAGEBase::tagTableCounterBits
const unsigned tagTableCounterBits
Definition: tage_base.hh:426
gem5::branch_prediction::TAGEBase::BranchInfo
Definition: tage_base.hh:128
gem5::branch_prediction::TAGEBase::gtable
TageEntry ** gtable
Definition: tage_base.hh:438
gem5::branch_prediction::StatisticalCorrector::gPredictions
virtual int gPredictions(ThreadID tid, Addr branch_pc, BranchInfo *bi, int &lsum, int64_t phist)=0
gem5::RefCountingPtr< StaticInst >
gem5::branch_prediction::StatisticalCorrector::ctrUpdate
void ctrUpdate(T &ctr, bool taken, int nbits)
Definition: statistical_corrector.hh:62
gem5::branch_prediction::TAGEBase::logUResetPeriod
uint64_t logUResetPeriod
Definition: tage_base.hh:477
gem5::branch_prediction::MPP_TAGE::calculateParameters
void calculateParameters() override
Calculates the history lengths and some other paramters in derived classes.
Definition: multiperspective_perceptron_tage.cc:50
gem5::branch_prediction::MPP_StatisticalCorrector::gnb
const unsigned gnb
Definition: multiperspective_perceptron_tage.hh:115
gem5::branch_prediction::MultiperspectivePerceptronTAGE::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: multiperspective_perceptron_tage.cc:391
gem5::branch_prediction::MultiperspectivePerceptronTAGE::update
void update(ThreadID tid, Addr instPC, bool taken, void *bp_history, bool squashed, const StaticInstPtr &inst, Addr corrTarget) override
Updates the BP with taken/not taken information.
Definition: multiperspective_perceptron_tage.cc:593
gem5::branch_prediction::TAGEBase::baseUpdate
void baseUpdate(Addr pc, bool taken, BranchInfo *bi)
Updates the bimodal predictor.
Definition: tage_base.cc:302
gem5::branch_prediction::MultiperspectivePerceptron
Definition: multiperspective_perceptron.hh:54
gem5::ArmISA::j
Bitfield< 24 > j
Definition: misc_types.hh:57
gem5::StaticInst::isReturn
bool isReturn() const
Definition: static_inst.hh:184
gem5::branch_prediction::TAGEBase::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: tage_base.cc:87
gem5::branch_prediction::TAGEBase::btablePrediction
std::vector< bool > btablePrediction
Definition: tage_base.hh:436
gem5::branch_prediction::MPP_StatisticalCorrector::getIndBiasSK
unsigned getIndBiasSK(Addr branch_pc, StatisticalCorrector::BranchInfo *bi) const override
Definition: multiperspective_perceptron_tage.cc:299
gem5::branch_prediction::StatisticalCorrector::logSizeUp
const unsigned logSizeUp
Definition: statistical_corrector.hh:143
gem5::ArmISA::b
Bitfield< 7 > b
Definition: misc_types.hh:381
gem5::ArmISA::z
Bitfield< 11 > z
Definition: misc_types.hh:374
gem5::branch_prediction::StatisticalCorrector::logBias
const unsigned logBias
Definition: statistical_corrector.hh:141
gem5::Random::random
std::enable_if_t< std::is_integral< T >::value, T > random()
Use the SFINAE idiom to choose an implementation based on whether the type is integral or floating po...
Definition: random.hh:90
gem5::branch_prediction::MPP_StatisticalCorrector::wg
std::vector< int8_t > wg
Definition: multiperspective_perceptron_tage.hh:119
gem5::branch_prediction::StatisticalCorrector::scCountersWidth
const unsigned scCountersWidth
Definition: statistical_corrector.hh:187
gem5::branch_prediction::MPP_StatisticalCorrector::MPP_StatisticalCorrector
MPP_StatisticalCorrector(const MPP_StatisticalCorrectorParams &p)
Definition: multiperspective_perceptron_tage.cc:263
multiperspective_perceptron_tage.hh
gem5::branch_prediction::TAGEBase::ThreadHistory::gHist
uint8_t * gHist
Definition: tage_base.hh:454
gem5::branch_prediction::LoopPredictor::ltable
LoopEntry * ltable
Definition: loop_predictor.hh:79
gem5::branch_prediction::MPP_StatisticalCorrector::scPredict
bool scPredict(ThreadID tid, Addr branch_pc, bool cond_branch, StatisticalCorrector::BranchInfo *bi, bool prev_pred_taken, bool bias_bit, bool use_conf_ctr, int8_t conf_ctr, unsigned conf_bits, int hitBank, int altBank, int64_t phist, int init_lsum) override
Definition: multiperspective_perceptron_tage.cc:341
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
gem5::branch_prediction::StatisticalCorrector::pUpdateThreshold
std::vector< int > pUpdateThreshold
Definition: statistical_corrector.hh:176
gem5::branch_prediction::TAGEBase::nHistoryTables
const unsigned nHistoryTables
Definition: tage_base.hh:425
gem5::branch_prediction::StatisticalCorrector::pUpdateThresholdWidth
const unsigned pUpdateThresholdWidth
Definition: statistical_corrector.hh:183
gem5::branch_prediction::MultiperspectivePerceptron::setExtraBits
void setExtraBits(int bits)
Sets the starting number of storage bits to compute the number of table entries.
Definition: multiperspective_perceptron.cc:140
gem5::branch_prediction::MultiperspectivePerceptron::specs
std::vector< HistorySpec * > specs
Predictor tables.
Definition: multiperspective_perceptron.hh:362
gem5::branch_prediction::MPP_TAGE::resetUctr
void resetUctr(uint8_t &u) override
Algorithm for resetting a single U counter.
Definition: multiperspective_perceptron_tage.cc:157
gem5::branch_prediction::MultiperspectivePerceptronTAGE::getIndex
unsigned int getIndex(ThreadID tid, MPPTAGEBranchInfo &bi, const HistorySpec &spec, int index) const
Definition: multiperspective_perceptron_tage.cc:404
gem5::branch_prediction::MPP_LoopPredictor::calcConf
bool calcConf(int index) const override
Definition: multiperspective_perceptron_tage.cc:251
gem5::branch_prediction::MPP_StatisticalCorrector::getBiasLSUM
virtual void getBiasLSUM(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int &lsum) const =0
gem5::branch_prediction::MultiperspectivePerceptron::modhist_lengths
std::vector< int > modhist_lengths
Definition: multiperspective_perceptron.hh:377
gem5::branch_prediction::StatisticalCorrector::gUpdates
virtual void gUpdates(ThreadID tid, Addr pc, bool taken, BranchInfo *bi, int64_t phist)=0
gem5::branch_prediction::StatisticalCorrector::secondH
int8_t secondH
Definition: statistical_corrector.hh:190
gem5::branch_prediction::TAGEBase::ThreadHistory::computeTags
FoldedHistory * computeTags[2]
Definition: tage_base.hh:461
gem5::branch_prediction::MultiperspectivePerceptron::modpath_indices
std::vector< int > modpath_indices
Definition: multiperspective_perceptron.hh:378
gem5::branch_prediction::MPP_TAGE::handleAllocAndUReset
void handleAllocAndUReset(bool alloc, bool taken, TAGEBase::BranchInfo *bi, int nrand) override
Handles Allocation and U bits reset on an update.
Definition: multiperspective_perceptron_tage.cc:95
gem5::branch_prediction::TAGEBase::getPathHist
int getPathHist(ThreadID tid) const
Definition: tage_base.cc:780
gem5::branch_prediction::TAGEBase::FoldedHistory::update
void update(uint8_t *h)
Definition: tage_base.hh:106
gem5::branch_prediction::TAGEBase::btableHysteresis
std::vector< bool > btableHysteresis
Definition: tage_base.hh:437
gem5::branch_prediction::TAGEBase::TageEntry::u
uint8_t u
Definition: tage_base.hh:79
gem5::branch_prediction::TAGEBase::updateHistories
virtual void updateHistories(ThreadID tid, Addr branch_pc, bool taken, BranchInfo *b, bool speculative, const StaticInstPtr &inst=nullStaticInstPtr, Addr target=MaxAddr)
(Speculatively) updates global histories (path and direction).
Definition: tage_base.cc:588
gem5::StaticInst::isDirectCtrl
bool isDirectCtrl() const
Definition: static_inst.hh:185
gem5::branch_prediction::LoopPredictor::condBranchUpdate
void condBranchUpdate(ThreadID tid, Addr branch_pc, bool taken, bool tage_pred, BranchInfo *bi, unsigned instShiftAmt)
Update LTAGE for conditional branches.
Definition: loop_predictor.cc:331
gem5::branch_prediction::MultiperspectivePerceptron::table_sizes
std::vector< int > table_sizes
Definition: multiperspective_perceptron.hh:363
gem5::ArmISA::t
Bitfield< 5 > t
Definition: misc_types.hh:70
gem5::ArmISA::c
Bitfield< 29 > c
Definition: misc_types.hh:53
gem5::branch_prediction::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:514
gem5::branch_prediction::TAGEBase::ThreadHistory
Definition: tage_base.hh:442
gem5::branch_prediction::MPP_StatisticalCorrector::gm
std::vector< int > gm
Definition: multiperspective_perceptron_tage.hh:117
gem5::MipsISA::g
Bitfield< 4 > g
Definition: dt_constants.hh:86
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::branch_prediction::TAGEBase::tCounter
int64_t tCounter
Definition: tage_base.hh:476
gem5::branch_prediction::StatisticalCorrector::BranchInfo
Definition: statistical_corrector.hh:200
gem5::branch_prediction::StatisticalCorrector::scPredict
virtual bool scPredict(ThreadID tid, Addr branch_pc, bool cond_branch, BranchInfo *bi, bool prev_pred_taken, bool bias_bit, bool use_conf_ctr, int8_t conf_ctr, unsigned conf_bits, int hitBank, int altBank, int64_t phist, int init_lsum=0)
Definition: statistical_corrector.cc:230
gem5::branch_prediction::StatisticalCorrector::condBranchUpdate
virtual void condBranchUpdate(ThreadID tid, Addr branch_pc, bool taken, BranchInfo *bi, Addr corrTarget, bool bias_bit, int hitBank, int altBank, int64_t phist)
Definition: statistical_corrector.cc:324
gem5::branch_prediction::MPP_StatisticalCorrector::pnb
const unsigned pnb
Definition: multiperspective_perceptron_tage.hh:108
gem5::branch_prediction::MPP_TAGE::adjustAlloc
void adjustAlloc(bool &alloc, bool taken, bool pred_taken) override
Extra calculation to tell whether TAGE allocaitons may happen or not on an update For this base TAGE ...
Definition: multiperspective_perceptron_tage.cc:183
gem5::branch_prediction::MPP_StatisticalCorrector::pm
std::vector< int > pm
Definition: multiperspective_perceptron_tage.hh:110
gem5::branch_prediction::MultiperspectivePerceptron::pcshift
const int pcshift
Definition: multiperspective_perceptron.hh:268
gem5::branch_prediction::MPP_StatisticalCorrector::getIndUpd
unsigned getIndUpd(Addr branch_pc) const override
Definition: multiperspective_perceptron_tage.cc:320
gem5::ArmISA::u
Bitfield< 22 > u
Definition: misc_types.hh:352
gem5::branch_prediction::BPredUnit::instShiftAmt
const unsigned instShiftAmt
Number of bits to shift instructions by for predictor addresses.
Definition: bpred_unit.hh:320
gem5::branch_prediction::MPP_StatisticalCorrector::getIndBiasBank
unsigned getIndBiasBank(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int hitBank, int altBank) const override
Definition: multiperspective_perceptron_tage.cc:307
gem5::branch_prediction::MPP_StatisticalCorrector::ggehl
std::vector< int8_t > * ggehl
Definition: multiperspective_perceptron_tage.hh:118
gem5::branch_prediction::LoopPredictor::updateStats
void updateStats(bool taken, BranchInfo *bi)
Update the stats.
Definition: loop_predictor.cc:321
gem5::branch_prediction::MPP_StatisticalCorrector::wp
std::vector< int8_t > wp
Definition: multiperspective_perceptron_tage.hh:112
gem5::branch_prediction::TAGEBase::logTagTableSizes
std::vector< int > logTagTableSizes
Definition: tage_base.hh:434
gem5::branch_prediction::MultiperspectivePerceptronTAGE::uncondBranch
void uncondBranch(ThreadID tid, Addr pc, void *&bp_history) override
Definition: multiperspective_perceptron_tage.cc:673
gem5::branch_prediction::StatisticalCorrector::bias
std::vector< int8_t > bias
Definition: statistical_corrector.hh:169
gem5::branch_prediction::LoopPredictor::LoopEntry::numIter
uint16_t numIter
Definition: loop_predictor.hh:67
gem5::MipsISA::pc
Bitfield< 4 > pc
Definition: pra_constants.hh:243
gem5::branch_prediction::MultiperspectivePerceptronTAGE::MultiperspectivePerceptronTAGE
MultiperspectivePerceptronTAGE(const MultiperspectivePerceptronTAGEParams &p)
Definition: multiperspective_perceptron_tage.cc:380
gem5::branch_prediction::MultiperspectivePerceptron::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: multiperspective_perceptron.cc:146
gem5::branch_prediction::MultiperspectivePerceptronTAGE::tage
TAGEBase * tage
Definition: multiperspective_perceptron_tage.hh:195
gem5::branch_prediction::MultiperspectivePerceptron::threadData
std::vector< ThreadData * > threadData
Definition: multiperspective_perceptron.hh:359
gem5::branch_prediction::StatisticalCorrector::getSizeInBits
virtual size_t getSizeInBits() const
Definition: statistical_corrector.cc:400
gem5::branch_prediction::MPP_TAGE::isHighConfidence
bool isHighConfidence(TAGEBase::BranchInfo *bi) const override
Definition: multiperspective_perceptron_tage.cc:237
gem5::StaticInst::isCall
bool isCall() const
Definition: static_inst.hh:183
gem5::branch_prediction::StatisticalCorrector::gIndex
int64_t gIndex(Addr branch_pc, int64_t bhist, int logs, int nbr, int i)
Definition: statistical_corrector.cc:183
gem5::branch_prediction::MPP_TAGE::bindex
int bindex(Addr pc_in) const override
Computes the index used to access the bimodal table.
Definition: multiperspective_perceptron_tage.cc:167
gem5::branch_prediction::TAGEBase::numUseAltOnNa
unsigned numUseAltOnNa
Definition: tage_base.hh:479
gem5::branch_prediction::MPP_StatisticalCorrector::gUpdate
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
Definition: multiperspective_perceptron_tage.cc:326
gem5::branch_prediction::MPP_TAGE::updatePathAndGlobalHistory
void updatePathAndGlobalHistory(ThreadHistory &tHist, int brtype, bool taken, Addr branch_pc, Addr target)
Definition: multiperspective_perceptron_tage.cc:212
gem5::branch_prediction::MPP_TAGE::handleTAGEUpdate
void handleTAGEUpdate(Addr branch_pc, bool taken, TAGEBase::BranchInfo *bi) override
Handles the update of the TAGE entries.
Definition: multiperspective_perceptron_tage.cc:59
gem5::StaticInst::isUncondCtrl
bool isUncondCtrl() const
Definition: static_inst.hh:188
gem5::branch_prediction::MultiperspectivePerceptronTAGE::loopPredictor
LoopPredictor * loopPredictor
Definition: multiperspective_perceptron_tage.hh:196
gem5::branch_prediction::LoopPredictor::calcConf
virtual bool calcConf(int index) const
Definition: loop_predictor.cc:156
gem5::branch_prediction::TAGEBase::histLengths
int * histLengths
Definition: tage_base.hh:471
gem5::branch_prediction::TAGEBase::updateGHist
void updateGHist(uint8_t *&h, bool dir, uint8_t *tab, int &PT)
(Speculatively) updates the global branch history.
Definition: tage_base.cc:322
gem5::branch_prediction::MPP_StatisticalCorrector::logPnb
const unsigned logPnb
Definition: multiperspective_perceptron_tage.hh:109
fatal_if
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Definition: logging.hh:225
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::branch_prediction::TAGEBase::ThreadHistory::ptGhist
int ptGhist
Definition: tage_base.hh:457
gem5::random_mt
Random random_mt
Definition: random.cc:99
gem5::branch_prediction::MPP_StatisticalCorrector::pgehl
std::vector< int8_t > * pgehl
Definition: multiperspective_perceptron_tage.hh:111
gem5::branch_prediction::TAGEBase::TageEntry::tag
uint16_t tag
Definition: tage_base.hh:78
gem5::branch_prediction::StatisticalCorrector::chooserConfWidth
const unsigned chooserConfWidth
Definition: statistical_corrector.hh:180
gem5::branch_prediction::TAGEBase::TageEntry::ctr
int8_t ctr
Definition: tage_base.hh:77
gem5::branch_prediction::MPP_StatisticalCorrector::gIndexLogsSubstr
int gIndexLogsSubstr(int nbr, int i) override
Definition: multiperspective_perceptron_tage.cc:314
gem5::branch_prediction::StatisticalCorrector::updateStats
void updateStats(bool taken, BranchInfo *bi)
Definition: statistical_corrector.cc:383
gem5::branch_prediction::MultiperspectivePerceptronTAGE::updateHistories
void updateHistories(ThreadID tid, MPPTAGEBranchInfo &bi, bool taken)
Definition: multiperspective_perceptron_tage.cc:464
gem5::ThreadID
int16_t ThreadID
Thread index/ID type.
Definition: types.hh:242
gem5::branch_prediction::MultiperspectivePerceptron::HistorySpec
Base class to implement the predictor tables.
Definition: multiperspective_perceptron.hh:225
gem5::branch_prediction::MultiperspectivePerceptron::HistorySpec::getHash
virtual unsigned int getHash(ThreadID tid, Addr pc, Addr pc2, int t) const =0
Gets the hash to index the table, using the pc of the branch, and the index of the table.
gem5::branch_prediction::MPP_StatisticalCorrector::initBias
void initBias() override
Definition: multiperspective_perceptron_tage.cc:277
gem5::branch_prediction::TAGEBase::tagePredict
bool tagePredict(ThreadID tid, Addr branch_pc, bool cond_branch, BranchInfo *bi)
TAGE prediction called from TAGE::predict.
Definition: tage_base.cc:360

Generated on Tue Sep 21 2021 12:25:05 for gem5 by doxygen 1.8.17