gem5  v21.2.0.0
multiperspective_perceptron_tage_8KB.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  * 8 KB version
38  */
39 
40 #ifndef __CPU_PRED_MULTIPERSPECTIVE_PERCEPTRON_TAGE_8KB_HH__
41 #define __CPU_PRED_MULTIPERSPECTIVE_PERCEPTRON_TAGE_8KB_HH__
42 
44 #include "params/MPP_LoopPredictor_8KB.hh"
45 #include "params/MPP_StatisticalCorrector_8KB.hh"
46 #include "params/MPP_TAGE_8KB.hh"
47 #include "params/MultiperspectivePerceptronTAGE8KB.hh"
48 
49 namespace gem5
50 {
51 
52 namespace branch_prediction
53 {
54 
55 class MPP_TAGE_8KB : public MPP_TAGE
56 {
57  public:
58  MPP_TAGE_8KB(const MPP_TAGE_8KBParams &p) : MPP_TAGE(p) {}
59 };
60 
62 {
63  public:
64  MPP_LoopPredictor_8KB(const MPP_LoopPredictor_8KBParams &p) :
66 };
67 
69 {
71  int gPredictions(ThreadID tid, Addr branch_pc,
72  StatisticalCorrector::BranchInfo* bi, int &lsum, int64_t phist)
73  override;
74  void getBiasLSUM(Addr branch_pc,
75  StatisticalCorrector::BranchInfo *bi, int &lsum) const override;
76  void gUpdates(ThreadID tid, Addr pc, bool taken,
77  StatisticalCorrector::BranchInfo* bi, int64_t phist) override;
78  void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken,
79  StatisticalCorrector::BranchInfo *bi, Addr corrTarget) override;
80  public:
81  MPP_StatisticalCorrector_8KB(const MPP_StatisticalCorrector_8KBParams &p);
82  size_t getSizeInBits() const override;
83 };
84 
87 {
88  void createSpecs() override;
89  public:
91  const MultiperspectivePerceptronTAGE8KBParams &p);
92 };
93 
94 } // namespace branch_prediction
95 } // namespace gem5
96 
97 #endif // __CPU_PRED_MULTIPERSPECTIVE_PERCEPTRON_TAGE_8KB_HH__
gem5::branch_prediction::MPP_StatisticalCorrector_8KB::gUpdates
void gUpdates(ThreadID tid, Addr pc, bool taken, StatisticalCorrector::BranchInfo *bi, int64_t phist) override
Definition: multiperspective_perceptron_tage_8KB.cc:99
gem5::branch_prediction::MPP_LoopPredictor
Definition: multiperspective_perceptron_tage.hh:93
gem5::branch_prediction::MPP_StatisticalCorrector_8KB::getBiasLSUM
void getBiasLSUM(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int &lsum) const override
Definition: multiperspective_perceptron_tage_8KB.cc:66
gem5::branch_prediction::MPP_TAGE
Definition: multiperspective_perceptron_tage.hh:57
gem5::branch_prediction::MPP_LoopPredictor_8KB::MPP_LoopPredictor_8KB
MPP_LoopPredictor_8KB(const MPP_LoopPredictor_8KBParams &p)
Definition: multiperspective_perceptron_tage_8KB.hh:64
gem5::branch_prediction::MPP_LoopPredictor_8KB
Definition: multiperspective_perceptron_tage_8KB.hh:61
gem5::PowerISA::bi
Bitfield< 20, 16 > bi
Definition: types.hh:80
gem5::RefCountingPtr< StaticInst >
gem5::branch_prediction::MPP_StatisticalCorrector
Definition: multiperspective_perceptron_tage.hh:103
gem5::branch_prediction::MultiperspectivePerceptronTAGE8KB
Definition: multiperspective_perceptron_tage_8KB.hh:85
gem5::branch_prediction::MPP_StatisticalCorrector_8KB
Definition: multiperspective_perceptron_tage_8KB.hh:68
multiperspective_perceptron_tage.hh
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
gem5::branch_prediction::MPP_StatisticalCorrector_8KB::makeThreadHistory
StatisticalCorrector::SCThreadHistory * makeThreadHistory() override
Definition: multiperspective_perceptron_tage_8KB.cc:55
gem5::branch_prediction::MPP_StatisticalCorrector_8KB::scHistoryUpdate
void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken, StatisticalCorrector::BranchInfo *bi, Addr corrTarget) override
Definition: multiperspective_perceptron_tage_8KB.cc:115
gem5::branch_prediction::MultiperspectivePerceptronTAGE8KB::MultiperspectivePerceptronTAGE8KB
MultiperspectivePerceptronTAGE8KB(const MultiperspectivePerceptronTAGE8KBParams &p)
Definition: multiperspective_perceptron_tage_8KB.cc:164
gem5::branch_prediction::MPP_StatisticalCorrector_8KB::getSizeInBits
size_t getSizeInBits() const override
Definition: multiperspective_perceptron_tage_8KB.cc:137
gem5::branch_prediction::MPP_StatisticalCorrector_8KB::gPredictions
int gPredictions(ThreadID tid, Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int &lsum, int64_t phist) override
Definition: multiperspective_perceptron_tage_8KB.cc:76
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::StatisticalCorrector::BranchInfo
Definition: statistical_corrector.hh:200
gem5::branch_prediction::MPP_StatisticalCorrector_8KB::MPP_StatisticalCorrector_8KB
MPP_StatisticalCorrector_8KB(const MPP_StatisticalCorrector_8KBParams &p)
Definition: multiperspective_perceptron_tage_8KB.cc:48
gem5::branch_prediction::MPP_TAGE_8KB
Definition: multiperspective_perceptron_tage_8KB.hh:55
gem5::branch_prediction::MultiperspectivePerceptronTAGE
Definition: multiperspective_perceptron_tage.hh:193
gem5::MipsISA::pc
Bitfield< 4 > pc
Definition: pra_constants.hh:243
gem5::branch_prediction::MPP_TAGE_8KB::MPP_TAGE_8KB
MPP_TAGE_8KB(const MPP_TAGE_8KBParams &p)
Definition: multiperspective_perceptron_tage_8KB.hh:58
gem5::branch_prediction::StatisticalCorrector::SCThreadHistory
Definition: statistical_corrector.hh:75
gem5::branch_prediction::MultiperspectivePerceptronTAGE8KB::createSpecs
void createSpecs() override
Creates the tables of the predictor.
Definition: multiperspective_perceptron_tage_8KB.cc:171
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: tlb.cc:60
gem5::ThreadID
int16_t ThreadID
Thread index/ID type.
Definition: types.hh:242

Generated on Tue Dec 21 2021 11:34:26 for gem5 by doxygen 1.8.17