55 fatal(
"Invalid global history predictor size.\n");
73 bp_history =
static_cast<void *
>(history);
81 assert(uncond || bp_history);
106 unsigned globalHistoryIdx =
117 bp_history =
static_cast<void *
>(history);
119 return final_prediction;
140 unsigned globalHistoryIdx =
152 bp_history =
nullptr;
BPredUnit(const Params &p)
Branch Predictor Unit (BPU) interface functions.
const unsigned numThreads
Number of the threads for which the branch history is maintained.
const unsigned instShiftAmt
Number of bits to shift instructions by for predictor addresses.
std::vector< unsigned > globalHistoryReg
void uncondBranch(ThreadID tid, Addr pc, void *&bp_history)
void updateHistories(ThreadID tid, Addr pc, bool uncond, bool taken, Addr target, const StaticInstPtr &inst, void *&bp_history)
unsigned globalPredictorSize
unsigned globalHistoryBits
unsigned globalHistoryMask
unsigned historyRegisterMask
GshareBP(const GshareBPParams ¶ms)
bool lookup(ThreadID tid, Addr pc, void *&bp_history)
void update(ThreadID tid, Addr pc, bool taken, void *&bp_history, bool squashed, const StaticInstPtr &inst, Addr target)
void squash(ThreadID tid, void *&bp_history)
std::vector< SatCounter8 > globalCtrs
void updateGlobalHistReg(ThreadID tid, bool taken)
static constexpr int ceilLog2(const T &n)
static constexpr bool isPowerOf2(const T &n)
#define fatal(...)
This implements a cprintf based fatal() function.
GenericSatCounter< uint8_t > SatCounter8
const Params & params() const
Copyright (c) 2024 Arm Limited All rights reserved.
int16_t ThreadID
Thread index/ID type.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
RefCountingPtr< StaticInst > StaticInstPtr
unsigned globalHistoryReg