52 #ifndef __CPU_PRED_LTAGE
53 #define __CPU_PRED_LTAGE
59 #include "params/LTAGE.hh"
71 bool squashed)
override;
120 void init(
int original_length,
int compressed_length)
125 outpoint = original_length % compressed_length;
229 int F(
int phist,
int size,
int bank)
const;
247 void ctrUpdate(int8_t & ctr,
bool taken,
int nbits);
293 void updateGHist(uint8_t * &h,
bool dir, uint8_t * tab,
int &PT);
408 #endif // __CPU_PRED_LTAGE
void updateHistories(ThreadID tid, Addr branch_pc, bool taken, void *b)
(Speculatively) updates global histories (path and direction).
LTAGE(const LTAGEParams *params)
void init(int original_length, int compressed_length)
const unsigned nHistoryTables
int lindex(Addr pc_in) const
Computes the index used to access the loop predictor.
void baseUpdate(Addr pc, bool taken, BranchInfo *bi)
Updates the bimodal predictor.
const unsigned minTagWidth
const Params * params() const
void btbUpdate(ThreadID tid, Addr branch_addr, void *&bp_history) override
If a branch is not taken, because the BTB address is invalid or missing, this function sets the appro...
unsigned getGHR(ThreadID tid, void *bp_history) const override
int8_t useAltPredForNewlyAllocated
void uncondBranch(ThreadID tid, Addr br_pc, void *&bp_history) override
std::vector< ThreadHistory > threadHistory
const unsigned logSizeLoopPred
void squash(ThreadID tid, void *bp_history) override
int gindex(ThreadID tid, Addr pc, int bank) const
Computes the index used to access a partially tagged table.
void loopUpdate(Addr pc, bool Taken, BranchInfo *bi)
Updates the loop predictor.
int bindex(Addr pc_in) const
Computes the index used to access the bimodal table.
bool getBimodePred(Addr pc, BranchInfo *bi) const
Get a branch prediction from the bimodal predictor.
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define ULL(N)
uint64_t constant
FoldedHistory * computeIndices
const unsigned tagTableCounterBits
FoldedHistory * computeTags[2]
Basically a wrapper class to hold both the branch predictor and the BTB.
int16_t ThreadID
Thread index/ID type.
const unsigned logSizeBiMP
bool predict(ThreadID tid, Addr branch_pc, bool cond_branch, void *&b)
Get a branch prediction from L-TAGE.
const unsigned histBufferSize
int F(int phist, int size, int bank) const
Utility function to shuffle the path history depending on which tagged table we are accessing...
const unsigned logSizeTagTables
uint16_t gtag(ThreadID tid, Addr pc, int bank) const
Computes the partial tag of a tagged table.
bool getLoop(Addr pc, BranchInfo *bi) const
Get a branch prediction from the loop predictor.
void updateGHist(uint8_t *&h, bool dir, uint8_t *tab, int &PT)
(Speculatively) updates the global branch history.
void specLoopUpdate(Addr pc, bool taken, BranchInfo *bi)
Speculatively updates the loop predictor iteration count.
bool lookup(ThreadID tid, Addr branch_addr, void *&bp_history) override
Looks up a given PC in the BP to see if it is taken or not taken.
void ctrUpdate(int8_t &ctr, bool taken, int nbits)
Updates a direction counter based on the actual branch outcome.
void update(ThreadID tid, Addr branch_addr, bool taken, void *bp_history, bool squashed) override
Updates the BP with taken/not taken information.