gem5  v22.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 
46 namespace gem5
47 {
48 
49 namespace branch_prediction
50 {
51 
53 {
56 
57  // Second local history GEHL
58  const unsigned snb;
59  const unsigned logSnb;
63 
64  // Third local history GEHL
65  const unsigned tnb;
66  const unsigned logTnb;
70 
72  int gPredictions(ThreadID tid, Addr branch_pc,
73  StatisticalCorrector::BranchInfo* bi, int &lsum, int64_t phist)
74  override;
75  void getBiasLSUM(Addr branch_pc,
76  StatisticalCorrector::BranchInfo *bi, int &lsum) const override;
77  void gUpdates(ThreadID tid, Addr pc, bool taken,
78  StatisticalCorrector::BranchInfo* bi, int64_t phist) override;
79  void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken,
80  StatisticalCorrector::BranchInfo *bi, Addr corrTarget) override;
81  public:
83  const MPP_StatisticalCorrector_64KBParams &p);
84  size_t getSizeInBits() const override;
85 };
86 
89  void createSpecs() override;
90  public:
92  const MultiperspectivePerceptronTAGE64KBParams &p);
93 };
94 
95 } // namespace branch_prediction
96 } // namespace gem5
97 
98 #endif // __CPU_PRED_MULTIPERSPECTIVE_PERCEPTRON_TAGE_64KB_HH__
void getBiasLSUM(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int &lsum) const override
StatisticalCorrector::SCThreadHistory * makeThreadHistory() override
void gUpdates(ThreadID tid, Addr pc, bool taken, StatisticalCorrector::BranchInfo *bi, int64_t phist) override
MPP_StatisticalCorrector_64KB(const MPP_StatisticalCorrector_64KBParams &p)
void scHistoryUpdate(Addr branch_pc, const StaticInstPtr &inst, bool taken, StatisticalCorrector::BranchInfo *bi, Addr corrTarget) override
int gPredictions(ThreadID tid, Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int &lsum, int64_t phist) override
MultiperspectivePerceptronTAGE64KB(const MultiperspectivePerceptronTAGE64KBParams &p)
Bitfield< 4 > pc
Bitfield< 20, 16 > bi
Definition: types.hh:80
Bitfield< 54 > p
Definition: pagetable.hh:70
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
int16_t ThreadID
Thread index/ID type.
Definition: types.hh:235
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147

Generated on Wed Dec 21 2022 10:22:31 for gem5 by doxygen 1.9.1