gem5  v20.1.0.0
multiperspective_perceptron_tage_64KB.hh
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  * 64 KB version
38  */
39 #ifndef __CPU_PRED_MULTIPERSPECTIVE_PERCEPTRON_TAGE_64KB_HH__
40 #define __CPU_PRED_MULTIPERSPECTIVE_PERCEPTRON_TAGE_64KB_HH__
41 
43 #include "params/MPP_StatisticalCorrector_64KB.hh"
44 #include "params/MultiperspectivePerceptronTAGE64KB.hh"
45 
49 
50  // Second local history GEHL
51  const unsigned snb;
52  const unsigned logSnb;
56 
57  // Third local history GEHL
58  const unsigned tnb;
59  const unsigned logTnb;
63 
65  int gPredictions(ThreadID tid, Addr branch_pc,
66  StatisticalCorrector::BranchInfo* bi, int &lsum, int64_t phist)
67  override;
68  void getBiasLSUM(Addr branch_pc,
69  StatisticalCorrector::BranchInfo *bi, int &lsum) const override;
70  void gUpdates(ThreadID tid, Addr pc, bool taken,
71  StatisticalCorrector::BranchInfo* bi, int64_t phist) override;
72  void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken,
73  StatisticalCorrector::BranchInfo *bi, Addr corrTarget) override;
74  public:
76  const MPP_StatisticalCorrector_64KBParams *p);
77  size_t getSizeInBits() const override;
78 };
79 
82  void createSpecs() override;
83  public:
85  const MultiperspectivePerceptronTAGE64KBParams *p);
86 };
87 
88 #endif // __CPU_PRED_MULTIPERSPECTIVE_PERCEPTRON_TAGE_64KB_HH__
MPP_StatisticalCorrector_64KB::logSnb
const unsigned logSnb
Definition: multiperspective_perceptron_tage_64KB.hh:52
ThreadID
int16_t ThreadID
Thread index/ID type.
Definition: types.hh:227
std::vector< int >
MPP_StatisticalCorrector
Definition: multiperspective_perceptron_tage.hh:94
MPP_StatisticalCorrector_64KB::makeThreadHistory
StatisticalCorrector::SCThreadHistory * makeThreadHistory() override
Definition: multiperspective_perceptron_tage_64KB.cc:59
MPP_StatisticalCorrector_64KB::tgehl
std::vector< int8_t > * tgehl
Definition: multiperspective_perceptron_tage_64KB.hh:61
MPP_StatisticalCorrector_64KB::sm
std::vector< int > sm
Definition: multiperspective_perceptron_tage_64KB.hh:53
MPP_StatisticalCorrector_64KB::gUpdates
void gUpdates(ThreadID tid, Addr pc, bool taken, StatisticalCorrector::BranchInfo *bi, int64_t phist) override
Definition: multiperspective_perceptron_tage_64KB.cc:114
MultiperspectivePerceptronTAGE64KB::createSpecs
void createSpecs() override
Creates the tables of the predictor.
Definition: multiperspective_perceptron_tage_64KB.cc:213
MultiperspectivePerceptronTAGE
Definition: multiperspective_perceptron_tage.hh:182
StatisticalCorrector::SCThreadHistory
Definition: statistical_corrector.hh:69
MPP_StatisticalCorrector_64KB::wt
std::vector< int8_t > wt
Definition: multiperspective_perceptron_tage_64KB.hh:62
MPP_StatisticalCorrector_64KB::getBiasLSUM
void getBiasLSUM(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int &lsum) const override
Definition: multiperspective_perceptron_tage_64KB.cc:73
PowerISA::bi
Bitfield< 20, 16 > bi
Definition: types.hh:63
MPP_StatisticalCorrector_64KB::numEntriesThirdLocalHistories
const unsigned numEntriesThirdLocalHistories
Definition: multiperspective_perceptron_tage_64KB.hh:48
MPP_StatisticalCorrector_64KB::sgehl
std::vector< int8_t > * sgehl
Definition: multiperspective_perceptron_tage_64KB.hh:54
multiperspective_perceptron_tage.hh
MipsISA::pc
Bitfield< 4 > pc
Definition: pra_constants.hh:240
MultiperspectivePerceptronTAGE64KB::MultiperspectivePerceptronTAGE64KB
MultiperspectivePerceptronTAGE64KB(const MultiperspectivePerceptronTAGE64KBParams *p)
Definition: multiperspective_perceptron_tage_64KB.cc:206
MPP_StatisticalCorrector_64KB::logTnb
const unsigned logTnb
Definition: multiperspective_perceptron_tage_64KB.hh:59
MPP_StatisticalCorrector_64KB::snb
const unsigned snb
Definition: multiperspective_perceptron_tage_64KB.hh:51
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
MultiperspectivePerceptronTAGE64KB
Definition: multiperspective_perceptron_tage_64KB.hh:80
MPP_StatisticalCorrector_64KB::gPredictions
int gPredictions(ThreadID tid, Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int &lsum, int64_t phist) override
Definition: multiperspective_perceptron_tage_64KB.cc:83
MPP_StatisticalCorrector_64KB::numEntriesSecondLocalHistories
const unsigned numEntriesSecondLocalHistories
Definition: multiperspective_perceptron_tage_64KB.hh:47
MPP_StatisticalCorrector_64KB::getSizeInBits
size_t getSizeInBits() const override
Definition: multiperspective_perceptron_tage_64KB.cc:161
StatisticalCorrector::BranchInfo
Definition: statistical_corrector.hh:192
MPP_StatisticalCorrector_64KB::scHistoryUpdate
void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken, StatisticalCorrector::BranchInfo *bi, Addr corrTarget) override
Definition: multiperspective_perceptron_tage_64KB.cc:136
MPP_StatisticalCorrector_64KB::ws
std::vector< int8_t > ws
Definition: multiperspective_perceptron_tage_64KB.hh:55
MPP_StatisticalCorrector_64KB::MPP_StatisticalCorrector_64KB
MPP_StatisticalCorrector_64KB(const MPP_StatisticalCorrector_64KBParams *p)
Definition: multiperspective_perceptron_tage_64KB.cc:42
RefCountingPtr< StaticInst >
MPP_StatisticalCorrector_64KB
Definition: multiperspective_perceptron_tage_64KB.hh:46
MPP_StatisticalCorrector_64KB::tnb
const unsigned tnb
Definition: multiperspective_perceptron_tage_64KB.hh:58
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
MPP_StatisticalCorrector_64KB::tm
std::vector< int > tm
Definition: multiperspective_perceptron_tage_64KB.hh:60

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