gem5
v20.1.0.0
|
#include <tage_base.hh>
Classes | |
struct | BranchInfo |
struct | FoldedHistory |
struct | TAGEBaseStats |
struct | TageEntry |
struct | ThreadHistory |
Public Types | |
enum | { BIMODAL_ONLY = 0, TAGE_LONGEST_MATCH, BIMODAL_ALT_MATCH, TAGE_ALT_MATCH, LAST_TAGE_PROVIDER_TYPE = TAGE_ALT_MATCH } |
Public Types inherited from SimObject | |
typedef SimObjectParams | Params |
Public Member Functions | |
TAGEBase (const TAGEBaseParams *p) | |
void | init () override |
init() is called after all C++ SimObjects have been created and all ports are connected. More... | |
virtual BranchInfo * | makeBranchInfo () |
virtual int | bindex (Addr pc_in) const |
Computes the index used to access the bimodal table. More... | |
virtual int | gindex (ThreadID tid, Addr pc, int bank) const |
Computes the index used to access a partially tagged table. More... | |
virtual int | F (int phist, int size, int bank) const |
Utility function to shuffle the path history depending on which tagged table we are accessing. More... | |
virtual uint16_t | gtag (ThreadID tid, Addr pc, int bank) const |
Computes the partial tag of a tagged table. More... | |
virtual bool | getBimodePred (Addr pc, BranchInfo *bi) const |
Get a branch prediction from the bimodal predictor. More... | |
void | baseUpdate (Addr pc, bool taken, BranchInfo *bi) |
Updates the bimodal predictor. More... | |
void | updateGHist (uint8_t *&h, bool dir, uint8_t *tab, int &PT) |
(Speculatively) updates the global branch history. More... | |
void | update (ThreadID tid, Addr branch_pc, bool taken, BranchInfo *bi) |
Update TAGE. More... | |
virtual void | updateHistories (ThreadID tid, Addr branch_pc, bool taken, BranchInfo *b, bool speculative, const StaticInstPtr &inst=StaticInst::nullStaticInstPtr, Addr target=MaxAddr) |
(Speculatively) updates global histories (path and direction). More... | |
virtual void | squash (ThreadID tid, bool taken, BranchInfo *bi, Addr target) |
Restores speculatively updated path and direction histories. More... | |
virtual void | condBranchUpdate (ThreadID tid, Addr branch_pc, bool taken, BranchInfo *bi, int nrand, Addr corrTarget, bool pred, bool preAdjustAlloc=false) |
Update TAGE for conditional branches. More... | |
bool | tagePredict (ThreadID tid, Addr branch_pc, bool cond_branch, BranchInfo *bi) |
TAGE prediction called from TAGE::predict. More... | |
virtual void | updateStats (bool taken, BranchInfo *bi) |
Update the stats. More... | |
virtual void | buildTageTables () |
Instantiates the TAGE table entries. More... | |
virtual void | calculateParameters () |
Calculates the history lengths and some other paramters in derived classes. More... | |
virtual void | calculateIndicesAndTags (ThreadID tid, Addr branch_pc, BranchInfo *bi) |
On a prediction, calculates the TAGE indices and tags for all the different history lengths. More... | |
virtual unsigned | getUseAltIdx (BranchInfo *bi, Addr branch_pc) |
Calculation of the index for useAltPredForNewlyAllocated On this base TAGE implementation it is always 0. More... | |
virtual void | adjustAlloc (bool &alloc, bool taken, bool pred_taken) |
Extra calculation to tell whether TAGE allocaitons may happen or not on an update For this base TAGE implementation it does nothing. More... | |
virtual void | handleAllocAndUReset (bool alloc, bool taken, BranchInfo *bi, int nrand) |
Handles Allocation and U bits reset on an update. More... | |
virtual void | handleUReset () |
Handles the U bits reset. More... | |
virtual void | handleTAGEUpdate (Addr branch_pc, bool taken, BranchInfo *bi) |
Handles the update of the TAGE entries. More... | |
virtual void | resetUctr (uint8_t &u) |
Algorithm for resetting a single U counter. More... | |
virtual void | extraAltCalc (BranchInfo *bi) |
Extra steps for calculating altTaken For this base TAGE class it does nothing. More... | |
virtual bool | isHighConfidence (BranchInfo *bi) const |
void | btbUpdate (ThreadID tid, Addr branch_addr, BranchInfo *&bi) |
unsigned | getGHR (ThreadID tid, BranchInfo *bi) const |
int8_t | getCtr (int hitBank, int hitBankIndex) const |
unsigned | getTageCtrBits () const |
int | getPathHist (ThreadID tid) const |
bool | isSpeculativeUpdateEnabled () const |
size_t | getSizeInBits () const |
Public Member Functions inherited from SimObject | |
const Params * | params () const |
SimObject (const Params *_params) | |
virtual | ~SimObject () |
virtual const std::string | name () const |
virtual void | loadState (CheckpointIn &cp) |
loadState() is called on each SimObject when restoring from a checkpoint. More... | |
virtual void | initState () |
initState() is called on each SimObject when not restoring from a checkpoint. More... | |
virtual void | regProbePoints () |
Register probe points for this object. More... | |
virtual void | regProbeListeners () |
Register probe listeners for this object. More... | |
ProbeManager * | getProbeManager () |
Get the probe manager for this object. More... | |
virtual Port & | getPort (const std::string &if_name, PortID idx=InvalidPortID) |
Get a port with a given name and index. More... | |
virtual void | startup () |
startup() is the final initialization call before simulation. More... | |
DrainState | drain () override |
Provide a default implementation of the drain interface for objects that don't need draining. More... | |
virtual void | memWriteback () |
Write back dirty buffers to memory using functional writes. More... | |
virtual void | memInvalidate () |
Invalidate the contents of memory buffers. More... | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
Public Member Functions inherited from EventManager | |
EventQueue * | eventQueue () const |
void | schedule (Event &event, Tick when) |
void | deschedule (Event &event) |
void | reschedule (Event &event, Tick when, bool always=false) |
void | schedule (Event *event, Tick when) |
void | deschedule (Event *event) |
void | reschedule (Event *event, Tick when, bool always=false) |
void | wakeupEventQueue (Tick when=(Tick) -1) |
This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. More... | |
void | setCurTick (Tick newVal) |
EventManager (EventManager &em) | |
Event manger manages events in the event queue. More... | |
EventManager (EventManager *em) | |
EventManager (EventQueue *eq) | |
Public Member Functions inherited from Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Member Functions inherited from Drainable | |
DrainState | drainState () const |
Return the current drain state of an object. More... | |
virtual void | notifyFork () |
Notify a child process of a fork. More... | |
Public Member Functions inherited from Stats::Group | |
Group (Group *parent, const char *name=nullptr) | |
Construct a new statistics group. More... | |
virtual | ~Group () |
virtual void | regStats () |
Callback to set stat parameters. More... | |
virtual void | resetStats () |
Callback to reset stats. More... | |
virtual void | preDumpStats () |
Callback before stats are dumped. More... | |
void | addStat (Stats::Info *info) |
Register a stat with this group. More... | |
const std::map< std::string, Group * > & | getStatGroups () const |
Get all child groups associated with this object. More... | |
const std::vector< Info * > & | getStats () const |
Get all stats associated with this object. More... | |
void | addStatGroup (const char *name, Group *block) |
Add a stat block as a child of this block. More... | |
const Info * | resolveStat (std::string name) const |
Resolve a stat by its name within this group. More... | |
Group ()=delete | |
Group (const Group &)=delete | |
Group & | operator= (const Group &)=delete |
Static Public Member Functions | |
template<typename T > | |
static void | ctrUpdate (T &ctr, bool taken, int nbits) |
Updates a direction counter based on the actual branch outcome. More... | |
static void | unsignedCtrUpdate (uint8_t &ctr, bool up, unsigned nbits) |
Updates an unsigned counter based on up/down parameter. More... | |
Static Public Member Functions inherited from SimObject | |
static void | serializeAll (CheckpointOut &cp) |
Serialize all SimObjects in the system. More... | |
static SimObject * | find (const char *name) |
Find the SimObject with the given name and return a pointer to it. More... | |
Static Public Member Functions inherited from Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
Serializes all the SimObjects. More... | |
static void | unserializeGlobals (CheckpointIn &cp) |
Protected Member Functions | |
virtual void | initFoldedHistories (ThreadHistory &history) |
Initialization of the folded histories. More... | |
Protected Member Functions inherited from Drainable | |
Drainable () | |
virtual | ~Drainable () |
virtual void | drainResume () |
Resume execution after a successful drain. More... | |
void | signalDrainDone () const |
Signal that an object is drained. More... | |
Definition at line 58 of file tage_base.hh.
anonymous enum |
Enumerator | |
---|---|
BIMODAL_ONLY | |
TAGE_LONGEST_MATCH | |
BIMODAL_ALT_MATCH | |
TAGE_ALT_MATCH | |
LAST_TAGE_PROVIDER_TYPE |
Definition at line 111 of file tage_base.hh.
TAGEBase::TAGEBase | ( | const TAGEBaseParams * | p | ) |
Definition at line 45 of file tage_base.cc.
References nHistoryTables, and noSkip.
|
virtual |
Extra calculation to tell whether TAGE allocaitons may happen or not on an update For this base TAGE implementation it does nothing.
Reimplemented in TAGE_SC_L_TAGE, and MPP_TAGE.
Definition at line 432 of file tage_base.cc.
Referenced by condBranchUpdate().
void TAGEBase::baseUpdate | ( | Addr | pc, |
bool | taken, | ||
BranchInfo * | bi | ||
) |
Updates the bimodal predictor.
pc | The unshifted branch PC. |
taken | The actual branch outcome. |
bi | Pointer to information on the prediction recorded at prediction time. |
Definition at line 296 of file tage_base.cc.
References PowerISA::bi, btableHysteresis, btablePrediction, DPRINTF, logRatioBiModalHystEntries, and MipsISA::pc.
Referenced by TAGE_SC_L_TAGE_8KB::handleTAGEUpdate(), TAGE_SC_L_TAGE_64KB::handleTAGEUpdate(), MPP_TAGE::handleTAGEUpdate(), and handleTAGEUpdate().
|
virtual |
Computes the index used to access the bimodal table.
pc_in | The unshifted branch PC. |
Reimplemented in TAGE_SC_L_TAGE, and MPP_TAGE.
Definition at line 201 of file tage_base.cc.
References instShiftAmt, logTagTableSizes, and ULL.
Referenced by tagePredict().
void TAGEBase::btbUpdate | ( | ThreadID | tid, |
Addr | branch_addr, | ||
BranchInfo *& | bi | ||
) |
Definition at line 182 of file tage_base.cc.
References PowerISA::bi, TAGEBase::FoldedHistory::comp, TAGEBase::ThreadHistory::computeIndices, TAGEBase::ThreadHistory::computeTags, DPRINTF, TAGEBase::ThreadHistory::gHist, TAGEBase::ThreadHistory::globalHistory, ArmISA::i, nHistoryTables, TAGEBase::ThreadHistory::ptGhist, speculativeHistUpdate, threadHistory, and TAGEBase::FoldedHistory::update().
Referenced by TAGE::btbUpdate().
|
virtual |
Instantiates the TAGE table entries.
Reimplemented in TAGE_SC_L_TAGE.
Definition at line 160 of file tage_base.cc.
References gtable, ArmISA::i, logTagTableSizes, and nHistoryTables.
Referenced by init().
|
virtual |
On a prediction, calculates the TAGE indices and tags for all the different history lengths.
Reimplemented in TAGE_SC_L_TAGE.
Definition at line 334 of file tage_base.cc.
References PowerISA::bi, gindex(), gtag(), ArmISA::i, nHistoryTables, tableIndices, and tableTags.
Referenced by tagePredict().
|
virtual |
Calculates the history lengths and some other paramters in derived classes.
Reimplemented in TAGE_SC_L_TAGE, and MPP_TAGE.
Definition at line 168 of file tage_base.cc.
References histLengths, ArmISA::i, maxHist, minHist, and nHistoryTables.
Referenced by init().
|
virtual |
Update TAGE for conditional branches.
branch_pc | The unshifted branch PC. |
taken | Actual branch outcome. |
bi | Pointer to information on the prediction recorded at prediction time. @nrand Random int number from 0 to 3 |
corrTarget | The correct branch target |
pred | Final prediction for this branch |
preAdjustAlloc | call adjustAlloc before checking pseudo newly allocated entries |
Definition at line 508 of file tage_base.cc.
References adjustAlloc(), PowerISA::bi, ctrUpdate(), getUseAltIdx(), handleAllocAndUReset(), handleTAGEUpdate(), nHistoryTables, useAltOnNaBits, and useAltPredForNewlyAllocated.
Referenced by LTAGE::update(), TAGE::update(), TAGE_SC_L::update(), and MultiperspectivePerceptronTAGE::update().
|
static |
Updates a direction counter based on the actual branch outcome.
ctr | Reference to counter to update. |
taken | Actual branch outcome. |
nbits | Counter width. |
Definition at line 255 of file tage_base.cc.
Referenced by condBranchUpdate(), TAGE_SC_L_TAGE_8KB::handleTAGEUpdate(), TAGE_SC_L_TAGE_64KB::handleTAGEUpdate(), MPP_TAGE::handleTAGEUpdate(), and handleTAGEUpdate().
|
virtual |
Extra steps for calculating altTaken For this base TAGE class it does nothing.
Reimplemented in TAGE_SC_L_TAGE.
Definition at line 649 of file tage_base.cc.
Referenced by tagePredict().
|
virtual |
Utility function to shuffle the path history depending on which tagged table we are accessing.
phist | The path history. |
size | Number of path history bits to use. |
bank | The partially tagged table to access. |
Reimplemented in TAGE_SC_L_TAGE.
Definition at line 207 of file tage_base.cc.
References logTagTableSizes, and ULL.
Referenced by gindex().
|
virtual |
Get a branch prediction from the bimodal predictor.
pc | The unshifted branch PC. |
bi | Pointer to information on the prediction. |
Reimplemented in TAGE_SC_L_TAGE.
Definition at line 287 of file tage_base.cc.
References PowerISA::bi, and btablePrediction.
Referenced by TAGE_SC_L_TAGE::getBimodePred(), and tagePredict().
int8_t TAGEBase::getCtr | ( | int | hitBank, |
int | hitBankIndex | ||
) | const |
Definition at line 754 of file tage_base.cc.
References TAGEBase::TageEntry::ctr, and gtable.
Referenced by TAGE_SC_L::predict().
unsigned TAGEBase::getGHR | ( | ThreadID | tid, |
BranchInfo * | bi | ||
) | const |
Definition at line 705 of file tage_base.cc.
References PowerISA::bi, histBufferSize, ArmISA::i, threadHistory, and X86ISA::val.
int TAGEBase::getPathHist | ( | ThreadID | tid | ) | const |
Definition at line 766 of file tage_base.cc.
References threadHistory.
Referenced by MultiperspectivePerceptronTAGE::lookup(), TAGE_SC_L::predict(), TAGE_SC_L::update(), and MultiperspectivePerceptronTAGE::update().
size_t TAGEBase::getSizeInBits | ( | ) | const |
Definition at line 778 of file tage_base.cc.
References bits(), histLengths, ArmISA::i, logRatioBiModalHystEntries, logTagTableSizes, logUResetPeriod, nHistoryTables, numUseAltOnNa, pathHistBits, tagTableCounterBits, tagTableTagWidths, tagTableUBits, ULL, and useAltOnNaBits.
Referenced by MultiperspectivePerceptronTAGE::init().
unsigned TAGEBase::getTageCtrBits | ( | ) | const |
Definition at line 760 of file tage_base.cc.
References tagTableCounterBits.
Referenced by TAGE_SC_L::predict().
|
virtual |
Calculation of the index for useAltPredForNewlyAllocated On this base TAGE implementation it is always 0.
Reimplemented in TAGE_SC_L_TAGE, and MPP_TAGE.
Definition at line 347 of file tage_base.cc.
Referenced by condBranchUpdate(), and tagePredict().
Computes the index used to access a partially tagged table.
tid | The thread ID used to select the global histories to use. |
pc | The unshifted branch PC. |
bank | The partially tagged table to access. |
Reimplemented in TAGE_SC_L_TAGE.
Definition at line 224 of file tage_base.cc.
References F(), histLengths, MipsISA::index, instShiftAmt, logTagTableSizes, pathHistBits, MipsISA::pc, threadHistory, and ULL.
Referenced by calculateIndicesAndTags().
Computes the partial tag of a tagged table.
tid | the thread ID used to select the global histories to use. |
pc | The unshifted branch PC. |
bank | The partially tagged table to access. |
Reimplemented in TAGE_SC_L_TAGE, TAGE_SC_L_TAGE_64KB, and TAGE_SC_L_TAGE_8KB.
Definition at line 242 of file tage_base.cc.
References instShiftAmt, MipsISA::pc, tagTableTagWidths, threadHistory, and ULL.
Referenced by calculateIndicesAndTags().
|
virtual |
Handles Allocation and U bits reset on an update.
Reimplemented in TAGE_SC_L_TAGE, MPP_TAGE, TAGE_SC_L_TAGE_64KB, and TAGE_SC_L_TAGE_8KB.
Definition at line 438 of file tage_base.cc.
References PowerISA::bi, TAGEBase::TageEntry::ctr, gtable, handleUReset(), ArmISA::i, maxNumAlloc, nHistoryTables, TAGEBase::TageEntry::tag, tCounter, TAGEBase::TageEntry::u, ULL, and X86ISA::X.
Referenced by condBranchUpdate().
|
virtual |
Handles the update of the TAGE entries.
Reimplemented in TAGE_SC_L_TAGE, MPP_TAGE, TAGE_SC_L_TAGE_64KB, and TAGE_SC_L_TAGE_8KB.
Definition at line 549 of file tage_base.cc.
References baseUpdate(), PowerISA::bi, TAGEBase::TageEntry::ctr, ctrUpdate(), DPRINTF, gtable, tagTableCounterBits, tagTableUBits, TAGEBase::TageEntry::u, and unsignedCtrUpdate().
Referenced by condBranchUpdate().
|
virtual |
Handles the U bits reset.
Reimplemented in TAGE_SC_L_TAGE, and MPP_TAGE.
Definition at line 487 of file tage_base.cc.
References gtable, ArmISA::i, ArmISA::j, logTagTableSizes, logUResetPeriod, nHistoryTables, resetUctr(), tCounter, ArmISA::u, and ULL.
Referenced by handleAllocAndUReset().
|
overridevirtual |
init() is called after all C++ SimObjects have been created and all ports are connected.
Initializations that are independent of unserialization but rely on a fully instantiated and connected SimObject graph should be done here.
Reimplemented from SimObject.
Definition at line 81 of file tage_base.cc.
References btableHysteresis, btablePrediction, buildTageTables(), calculateParameters(), gtable, histBufferSize, histLengths, initFoldedHistories(), initialized, initialTCounterValue, logRatioBiModalHystEntries, logTagTableSizes, logUResetPeriod, maxHist, nHistoryTables, numUseAltOnNa, pathHistBits, tableIndices, tableTags, tagTableTagWidths, tagTableUBits, tCounter, threadHistory, ULL, and useAltPredForNewlyAllocated.
Referenced by MultiperspectivePerceptronTAGE::init().
|
protectedvirtual |
Initialization of the folded histories.
Reimplemented in TAGE_SC_L_TAGE_8KB.
Definition at line 145 of file tage_base.cc.
References TAGEBase::ThreadHistory::computeIndices, TAGEBase::ThreadHistory::computeTags, DPRINTF, histLengths, ArmISA::i, TAGEBase::FoldedHistory::init(), logTagTableSizes, nHistoryTables, TAGEBase::FoldedHistory::origLength, and tagTableTagWidths.
Referenced by init().
|
inlinevirtual |
Reimplemented in MPP_TAGE.
Definition at line 402 of file tage_base.hh.
Referenced by MultiperspectivePerceptronTAGE::lookup().
bool TAGEBase::isSpeculativeUpdateEnabled | ( | ) | const |
Definition at line 772 of file tage_base.cc.
References speculativeHistUpdate.
Referenced by MultiperspectivePerceptronTAGE::MultiperspectivePerceptronTAGE(), LTAGE::update(), TAGE_SC_L::update(), and MultiperspectivePerceptronTAGE::update().
|
virtual |
Reimplemented in TAGE_SC_L_TAGE.
Definition at line 76 of file tage_base.cc.
|
virtual |
Algorithm for resetting a single U counter.
Reimplemented in MPP_TAGE, and TAGE_SC_L_TAGE_8KB.
Definition at line 502 of file tage_base.cc.
References ArmISA::u.
Referenced by TAGE_SC_L_TAGE::handleUReset(), and handleUReset().
|
virtual |
Restores speculatively updated path and direction histories.
Also recomputes compressed (folded) histories based on the correct branch outcome. This version of squash() is called once on a branch misprediction.
tid | The Thread ID to select the histories to rollback. |
taken | The correct branch outcome. |
bp_history | Wrapping pointer to BranchInfo (to allow storing derived class prediction information in the base class). |
target | The correct branch target |
Reimplemented in TAGE_SC_L_TAGE.
Definition at line 623 of file tage_base.cc.
References PowerISA::bi, TAGEBase::FoldedHistory::comp, TAGEBase::ThreadHistory::computeIndices, TAGEBase::ThreadHistory::computeTags, DPRINTF, TAGEBase::ThreadHistory::gHist, TAGEBase::ThreadHistory::globalHistory, ArmISA::i, nHistoryTables, TAGEBase::ThreadHistory::pathHist, TAGEBase::ThreadHistory::ptGhist, speculativeHistUpdate, threadHistory, and TAGEBase::FoldedHistory::update().
Referenced by LTAGE::update(), TAGE::update(), TAGE_SC_L::update(), and MultiperspectivePerceptronTAGE::update().
bool TAGEBase::tagePredict | ( | ThreadID | tid, |
Addr | branch_pc, | ||
bool | cond_branch, | ||
BranchInfo * | bi | ||
) |
TAGE prediction called from TAGE::predict.
tid | The thread ID to select the global histories to use. |
branch_pc | The unshifted branch PC. |
cond_branch | True if the branch is conditional. |
bi | Pointer to the BranchInfo |
Definition at line 354 of file tage_base.cc.
References PowerISA::bi, BIMODAL_ALT_MATCH, BIMODAL_ONLY, bindex(), calculateIndicesAndTags(), TAGEBase::TageEntry::ctr, DPRINTF, extraAltCalc(), getBimodePred(), getUseAltIdx(), gtable, ArmISA::i, nHistoryTables, noSkip, MipsISA::pc, tableIndices, tableTags, TAGE_ALT_MATCH, TAGE_LONGEST_MATCH, and useAltPredForNewlyAllocated.
Referenced by MultiperspectivePerceptronTAGE::lookup(), TAGE::predict(), LTAGE::predict(), and TAGE_SC_L::predict().
|
static |
Updates an unsigned counter based on up/down parameter.
ctr | Reference to counter to update. |
up | Boolean indicating if the counter is incremented/decremented If true it is incremented, if false it is decremented |
nbits | Counter width. |
Definition at line 273 of file tage_base.cc.
References ArmISA::up.
Referenced by handleTAGEUpdate().
void TAGEBase::update | ( | ThreadID | tid, |
Addr | branch_pc, | ||
bool | taken, | ||
BranchInfo * | bi | ||
) |
Update TAGE.
Called at execute to repair histories on a misprediction and at commit to update the tables.
tid | The thread ID to select the global histories to use. |
branch_pc | The unshifted branch PC. |
taken | Actual branch outcome. |
bi | Pointer to information on the prediction recorded at prediction time. |
void TAGEBase::updateGHist | ( | uint8_t *& | h, |
bool | dir, | ||
uint8_t * | tab, | ||
int & | PT | ||
) |
(Speculatively) updates the global branch history.
h | Reference to pointer to global branch history. |
dir | (Predicted) outcome to update the histories with. |
tab | |
PT | Reference to path history. |
Definition at line 316 of file tage_base.cc.
References DPRINTF, histBufferSize, ArmISA::i, and maxHist.
Referenced by updateHistories(), MPP_TAGE::updatePathAndGlobalHistory(), and TAGE_SC_L_TAGE::updatePathAndGlobalHistory().
|
virtual |
(Speculatively) updates global histories (path and direction).
Also recomputes compressed (folded) histories based on the branch direction.
tid | The thread ID to select the histories to update. |
branch_pc | The unshifted branch PC. |
taken | (Predicted) branch direction. |
b | Wrapping pointer to BranchInfo (to allow storing derived class prediction information in the base class). |
Reimplemented in TAGE_SC_L_TAGE, and MPP_TAGE.
Definition at line 582 of file tage_base.cc.
References PowerISA::bi, TAGEBase::FoldedHistory::comp, TAGEBase::ThreadHistory::computeIndices, TAGEBase::ThreadHistory::computeTags, DPRINTF, TAGEBase::ThreadHistory::gHist, TAGEBase::ThreadHistory::globalHistory, ArmISA::i, instShiftAmt, nHistoryTables, TAGEBase::ThreadHistory::pathHist, pathHistBits, TAGEBase::ThreadHistory::ptGhist, speculativeHistUpdate, threadHistory, ULL, TAGEBase::FoldedHistory::update(), and updateGHist().
Referenced by TAGE::lookup(), TAGE::uncondBranch(), LTAGE::update(), TAGE::update(), TAGE_SC_L::update(), and MultiperspectivePerceptronTAGE::update().
|
virtual |
Update the stats.
taken | Actual branch outcome |
bi | Pointer to information on the prediction recorded at prediction time. |
Definition at line 656 of file tage_base.cc.
References TAGEBase::TAGEBaseStats::altMatchProvider, TAGEBase::TAGEBaseStats::altMatchProviderCorrect, TAGEBase::TAGEBaseStats::altMatchProviderWouldHaveHit, TAGEBase::TAGEBaseStats::altMatchProviderWrong, PowerISA::bi, BIMODAL_ALT_MATCH, BIMODAL_ONLY, TAGEBase::TAGEBaseStats::bimodalAltMatchProviderCorrect, TAGEBase::TAGEBaseStats::bimodalAltMatchProviderWrong, TAGEBase::TAGEBaseStats::bimodalProviderCorrect, TAGEBase::TAGEBaseStats::bimodalProviderWrong, TAGEBase::TAGEBaseStats::longestMatchProvider, TAGEBase::TAGEBaseStats::longestMatchProviderCorrect, TAGEBase::TAGEBaseStats::longestMatchProviderWouldHaveHit, TAGEBase::TAGEBaseStats::longestMatchProviderWrong, stats, TAGE_ALT_MATCH, and TAGE_LONGEST_MATCH.
Referenced by LTAGE::update(), TAGE::update(), TAGE_SC_L::update(), and MultiperspectivePerceptronTAGE::update().
|
protected |
Definition at line 429 of file tage_base.hh.
Referenced by baseUpdate(), TAGE_SC_L_TAGE::getBimodePred(), init(), and MPP_TAGE::isHighConfidence().
|
protected |
Definition at line 428 of file tage_base.hh.
Referenced by baseUpdate(), TAGE_SC_L_TAGE::getBimodePred(), getBimodePred(), init(), and MPP_TAGE::isHighConfidence().
|
protected |
Definition at line 430 of file tage_base.hh.
Referenced by TAGE_SC_L_TAGE::buildTageTables(), buildTageTables(), TAGE_SC_L_TAGE::extraAltCalc(), getCtr(), TAGE_SC_L_TAGE_8KB::handleAllocAndUReset(), TAGE_SC_L_TAGE_64KB::handleAllocAndUReset(), MPP_TAGE::handleAllocAndUReset(), handleAllocAndUReset(), TAGE_SC_L_TAGE_8KB::handleTAGEUpdate(), TAGE_SC_L_TAGE_64KB::handleTAGEUpdate(), MPP_TAGE::handleTAGEUpdate(), handleTAGEUpdate(), MPP_TAGE::handleUReset(), TAGE_SC_L_TAGE::handleUReset(), handleUReset(), init(), MPP_TAGE::isHighConfidence(), and tagePredict().
|
protected |
Definition at line 420 of file tage_base.hh.
Referenced by getGHR(), init(), and updateGHist().
|
protected |
Definition at line 462 of file tage_base.hh.
Referenced by TAGE_SC_L_TAGE::calculateIndicesAndTags(), MPP_TAGE::calculateParameters(), TAGE_SC_L_TAGE::calculateParameters(), calculateParameters(), getSizeInBits(), TAGE_SC_L_TAGE::gindex(), gindex(), TAGE_SC_L_TAGE_8KB::gtag(), init(), TAGE_SC_L_TAGE_8KB::initFoldedHistories(), and initFoldedHistories().
|
protected |
Definition at line 483 of file tage_base.hh.
Referenced by init().
|
protected |
Definition at line 469 of file tage_base.hh.
Referenced by init().
|
protected |
Definition at line 481 of file tage_base.hh.
Referenced by TAGE_SC_L_TAGE::bindex(), bindex(), gindex(), TAGE_SC_L_TAGE_8KB::gtag(), gtag(), updateHistories(), and TAGE_SC_L_TAGE::updatePathAndGlobalHistory().
|
protected |
Definition at line 416 of file tage_base.hh.
Referenced by baseUpdate(), TAGE_SC_L_TAGE::getBimodePred(), getSizeInBits(), init(), and MPP_TAGE::isHighConfidence().
|
protected |
Definition at line 426 of file tage_base.hh.
Referenced by MPP_TAGE::bindex(), TAGE_SC_L_TAGE::bindex(), bindex(), buildTageTables(), TAGE_SC_L_TAGE::calculateIndicesAndTags(), TAGE_SC_L_TAGE::calculateParameters(), TAGE_SC_L_TAGE::F(), F(), getSizeInBits(), TAGE_SC_L_TAGE::gindex(), gindex(), TAGE_SC_L_TAGE_8KB::gindex_ext(), MPP_TAGE::handleUReset(), handleUReset(), init(), TAGE_SC_L_TAGE_8KB::initFoldedHistories(), and initFoldedHistories().
|
protected |
Definition at line 468 of file tage_base.hh.
Referenced by getSizeInBits(), MPP_TAGE::handleUReset(), TAGE_SC_L_TAGE::handleUReset(), handleUReset(), and init().
|
protected |
Definition at line 422 of file tage_base.hh.
Referenced by TAGE_SC_L_TAGE::calculateParameters(), calculateParameters(), init(), and updateGHist().
|
protected |
Definition at line 472 of file tage_base.hh.
Referenced by TAGE_SC_L_TAGE_8KB::handleAllocAndUReset(), TAGE_SC_L_TAGE_64KB::handleAllocAndUReset(), and handleAllocAndUReset().
|
protected |
Definition at line 421 of file tage_base.hh.
Referenced by TAGE_SC_L_TAGE::calculateParameters(), and calculateParameters().
|
protected |
Definition at line 417 of file tage_base.hh.
Referenced by TAGEBase::BranchInfo::BranchInfo(), btbUpdate(), TAGE_SC_L_TAGE::buildTageTables(), buildTageTables(), TAGE_SC_L_TAGE::calculateIndicesAndTags(), calculateIndicesAndTags(), MPP_TAGE::calculateParameters(), TAGE_SC_L_TAGE::calculateParameters(), calculateParameters(), condBranchUpdate(), getSizeInBits(), MPP_TAGE::getUseAltIdx(), TAGE_SC_L_TAGE_8KB::handleAllocAndUReset(), TAGE_SC_L_TAGE_64KB::handleAllocAndUReset(), MPP_TAGE::handleAllocAndUReset(), handleAllocAndUReset(), MPP_TAGE::handleUReset(), handleUReset(), init(), TAGE_SC_L_TAGE_8KB::initFoldedHistories(), initFoldedHistories(), squash(), TAGEBase(), TAGEBase::TAGEBaseStats::TAGEBaseStats(), tagePredict(), updateHistories(), MPP_TAGE::updatePathAndGlobalHistory(), and TAGE_SC_L_TAGE::updatePathAndGlobalHistory().
|
protected |
Definition at line 477 of file tage_base.hh.
Referenced by TAGE_SC_L_TAGE::calculateIndicesAndTags(), TAGE_SC_L_TAGE_8KB::handleAllocAndUReset(), TAGE_SC_L_TAGE_64KB::handleAllocAndUReset(), MPP_TAGE::handleAllocAndUReset(), TAGEBase(), and tagePredict().
|
protected |
Definition at line 470 of file tage_base.hh.
Referenced by getSizeInBits(), MPP_TAGE::getUseAltIdx(), TAGE_SC_L_TAGE::getUseAltIdx(), and init().
|
protected |
Definition at line 423 of file tage_base.hh.
Referenced by getSizeInBits(), TAGE_SC_L_TAGE::gindex(), gindex(), TAGE_SC_L_TAGE_8KB::gtag(), init(), updateHistories(), and TAGE_SC_L_TAGE::updatePathAndGlobalHistory().
|
protected |
Definition at line 479 of file tage_base.hh.
Referenced by btbUpdate(), isSpeculativeUpdateEnabled(), squash(), MPP_TAGE::updateHistories(), TAGE_SC_L_TAGE::updateHistories(), and updateHistories().
|
protected |
Referenced by updateStats().
|
protected |
Definition at line 463 of file tage_base.hh.
Referenced by TAGE_SC_L_TAGE::calculateIndicesAndTags(), calculateIndicesAndTags(), init(), and tagePredict().
|
protected |
Definition at line 464 of file tage_base.hh.
Referenced by TAGE_SC_L_TAGE::calculateIndicesAndTags(), calculateIndicesAndTags(), init(), and tagePredict().
|
protected |
Definition at line 418 of file tage_base.hh.
Referenced by getSizeInBits(), getTageCtrBits(), TAGE_SC_L_TAGE_8KB::handleTAGEUpdate(), TAGE_SC_L_TAGE_64KB::handleTAGEUpdate(), MPP_TAGE::handleTAGEUpdate(), handleTAGEUpdate(), and MPP_TAGE::isHighConfidence().
|
protected |
Definition at line 425 of file tage_base.hh.
Referenced by TAGE_SC_L_TAGE::calculateParameters(), getSizeInBits(), TAGE_SC_L_TAGE_8KB::gtag(), TAGE_SC_L_TAGE_64KB::gtag(), gtag(), init(), TAGE_SC_L_TAGE_8KB::initFoldedHistories(), and initFoldedHistories().
|
protected |
Definition at line 419 of file tage_base.hh.
Referenced by getSizeInBits(), TAGE_SC_L_TAGE_8KB::handleTAGEUpdate(), TAGE_SC_L_TAGE_64KB::handleTAGEUpdate(), MPP_TAGE::handleTAGEUpdate(), handleTAGEUpdate(), and init().
|
protected |
Definition at line 467 of file tage_base.hh.
Referenced by TAGE_SC_L_TAGE_8KB::handleAllocAndUReset(), TAGE_SC_L_TAGE_64KB::handleAllocAndUReset(), MPP_TAGE::handleAllocAndUReset(), handleAllocAndUReset(), MPP_TAGE::handleUReset(), TAGE_SC_L_TAGE::handleUReset(), handleUReset(), and init().
|
protected |
Definition at line 455 of file tage_base.hh.
Referenced by btbUpdate(), TAGE_SC_L_TAGE::calculateIndicesAndTags(), getGHR(), getPathHist(), TAGE_SC_L_TAGE::gindex(), gindex(), TAGE_SC_L_TAGE_8KB::gtag(), TAGE_SC_L_TAGE_64KB::gtag(), gtag(), init(), squash(), MPP_TAGE::updateHistories(), TAGE_SC_L_TAGE::updateHistories(), and updateHistories().
|
protected |
Definition at line 471 of file tage_base.hh.
Referenced by condBranchUpdate(), and getSizeInBits().
|
protected |
Definition at line 466 of file tage_base.hh.
Referenced by condBranchUpdate(), init(), and tagePredict().