45#ifndef __CPU_PRED_BI_MODE_PRED_HH__
46#define __CPU_PRED_BI_MODE_PRED_HH__
50#include "params/BiModeBP.hh"
55namespace branch_prediction
78 Addr target,
void * &bp_history)
override;
81 void * &bp_history,
bool squashed,
Basically a wrapper class to hold both the branch predictor and the BTB.
Implements a bi-mode branch predictor.
void updateHistories(ThreadID tid, Addr pc, bool uncond, bool taken, Addr target, void *&bp_history) override
Ones done with the prediction this function updates the path and global history.
unsigned globalHistoryBits
std::vector< unsigned > globalHistoryReg
std::vector< SatCounter8 > notTakenCounters
void updateGlobalHistReg(ThreadID tid, bool taken)
void uncondBranch(ThreadID tid, Addr pc, void *&bp_history)
unsigned globalHistoryMask
void squash(ThreadID tid, void *&bp_history) override
std::vector< SatCounter8 > takenCounters
unsigned historyRegisterMask
void update(ThreadID tid, Addr pc, bool taken, void *&bp_history, bool squashed, const StaticInstPtr &inst, Addr target) override
Updates the BP with taken/not taken information.
std::vector< SatCounter8 > choiceCounters
unsigned choiceHistoryMask
unsigned globalPredictorSize
unsigned notTakenThreshold
bool lookup(ThreadID tid, Addr pc, void *&bp_history) override
Looks up a given conditional branch PC of in the BP to see if it is taken or not taken.
unsigned choicePredictorSize
BiModeBP(const BiModeBPParams ¶ms)
const Params & params() const
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria 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.
unsigned globalHistoryReg