Go to the documentation of this file.
39 #ifndef __CPU_PRED_MULTIPERSPECTIVE_PERCEPTRON_TAGE_HH__
40 #define __CPU_PRED_MULTIPERSPECTIVE_PERCEPTRON_TAGE_HH__
46 #include "params/MPP_LoopPredictor.hh"
47 #include "params/MPP_StatisticalCorrector.hh"
48 #include "params/MPP_TAGE.hh"
49 #include "params/MultiperspectivePerceptronTAGE.hh"
76 void adjustAlloc(
bool & alloc,
bool taken,
bool pred_taken)
override;
82 bool taken,
Addr branch_pc,
Addr target);
127 unsigned int truncated_target = target;
130 (truncated_target >> 5) ^ taken);
153 bool bias)
const override;
158 int altBank)
const override;
164 bool bias_bit,
bool use_conf_ctr, int8_t conf_ctr,
165 unsigned conf_bits,
int hitBank,
int altBank, int64_t phist,
166 int init_lsum)
override;
170 Addr corrTarget,
bool b,
int hitBank,
int altBank,
171 int64_t phist)
override;
215 const HistorySpec &spec,
int index)
const;
222 const MultiperspectivePerceptronTAGEParams *
p);
224 void init()
override;
229 void *bp_history,
bool squashed,
231 Addr corrTarget)
override;
236 #endif//__CPU_PRED_MULTIPERSPECTIVE_PERCEPTRON_TAGE_HH__
std::vector< int64_t > historyStack
void updateHistoryStack(Addr target, bool taken, bool is_call, bool is_return)
Branch information data type.
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
unsigned getIndBiasSK(Addr branch_pc, StatisticalCorrector::BranchInfo *bi) const override
MultiperspectivePerceptronTAGE(const MultiperspectivePerceptronTAGEParams *p)
unsigned getIndBias(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, bool bias) const override
int16_t ThreadID
Thread index/ID type.
std::vector< int8_t > bias
std::vector< unsigned int > tunedHistoryLengths
int gIndexLogsSubstr(int nbr, int i) override
unsigned int historyStackPointer
BranchInfo(TAGEBase &tage)
int64_t getHistoryStackEntry() const
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
virtual void getBiasLSUM(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int &lsum) const =0
void updatePartial(ThreadID tid, MPPTAGEBranchInfo &bi, bool taken)
unsigned getIndBiasBank(Addr branch_pc, StatisticalCorrector::BranchInfo *bi, int hitBank, int altBank) const override
unsigned getUseAltIdx(TAGEBase::BranchInfo *bi, Addr branch_pc) override
Calculation of the index for useAltPredForNewlyAllocated On this base TAGE implementation it is alway...
LoopPredictor::BranchInfo * lpBranchInfo
void uncondBranch(ThreadID tid, Addr pc, void *&bp_history) override
unsigned int getIndex(ThreadID tid, MPPTAGEBranchInfo &bi, const HistorySpec &spec, int index) const
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 ...
int bindex(Addr pc_in) const override
Computes the index used to access the bimodal table.
void squash(ThreadID tid, void *bp_history) override
int computePartialSum(ThreadID tid, MPPTAGEBranchInfo &bi) const
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).
void handleTAGEUpdate(Addr branch_pc, bool taken, TAGEBase::BranchInfo *bi) override
Handles the update of the TAGE entries.
void resetUctr(uint8_t &u) override
Algorithm for resetting a single U counter.
void updatePathAndGlobalHistory(ThreadHistory &tHist, int brtype, bool taken, Addr branch_pc, Addr target)
void condBranchUpdate(ThreadID tid, Addr branch_pc, bool taken, StatisticalCorrector::BranchInfo *bi, Addr corrTarget, bool b, int hitBank, int altBank, int64_t phist) override
void handleAllocAndUReset(bool alloc, bool taken, TAGEBase::BranchInfo *bi, int nrand) override
Handles Allocation and U bits reset on an 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.
bool optionalAgeInc() const override
std::vector< int8_t > * pgehl
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
unsigned int getPointer() const
MPP_LoopPredictor(MPP_LoopPredictorParams *p)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
StatisticalCorrector * statisticalCorrector
std::vector< int8_t > * ggehl
void updateHistories(ThreadID tid, MPPTAGEBranchInfo &bi, bool taken)
const unsigned int pc
pc of the branch
MPP_TAGE(const MPP_TAGEParams *p)
TAGEBase::BranchInfo * tageBranchInfo
StatisticalCorrector::BranchInfo * scBranchInfo
void calculateParameters() override
Calculates the history lengths and some other paramters in derived classes.
unsigned getIndUpd(Addr branch_pc) const override
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.
LoopPredictor * loopPredictor
bool isHighConfidence(TAGEBase::BranchInfo *bi) const override
MPP_StatisticalCorrector(const MPP_StatisticalCorrectorParams *p)
void handleUReset() override
Handles the U bits reset.
bool calcConf(int index) const override
MPPTAGEBranchInfo(Addr pc, int pcshift, bool cond, TAGEBase &tage, LoopPredictor &loopPredictor, StatisticalCorrector &statisticalCorrector)
virtual ~MPPTAGEBranchInfo()
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17