41#ifndef __CPU_PRED_BTB_HH__
42#define __CPU_PRED_BTB_HH__
49#include "params/BranchTargetBuffer.hh"
55namespace branch_prediction
61 typedef BranchTargetBufferParams
Params;
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
virtual const PCStateBase * lookup(ThreadID tid, Addr instPC, BranchType type=BranchType::NoBranch)=0
Looks up an address in the BTB to get the target of the branch.
virtual bool valid(ThreadID tid, Addr instPC)=0
Checks if a branch address is in the BTB.
const unsigned numThreads
Number of the threads for which the branch history is maintained.
virtual void memInvalidate() override=0
Invalidate the contents of memory buffers.
virtual const StaticInstPtr getInst(ThreadID tid, Addr instPC)=0
Looks up an address in the BTB and return the instruction information if existant.
BranchTargetBuffer(const Params ¶ms)
gem5::branch_prediction::BranchTargetBuffer::BranchTargetBufferStats stats
BranchTargetBufferParams Params
virtual void incorrectTarget(Addr inst_pc, BranchType type=BranchType::NoBranch)
Update BTB statistics.
virtual void update(ThreadID tid, Addr inst_pc, const PCStateBase &target_pc, BranchType type=BranchType::NoBranch, StaticInstPtr inst=nullptr)=0
Updates the BTB with the target of a branch.
enums::BranchType BranchType
This is a simple scalar statistic, like a counter.
A vector of scalar stats.
ClockedObject declaration and implementation.
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.
Declaration of Statistics objects.
statistics::Vector misses
statistics::Vector mispredict
statistics::Vector lookups
statistics::Scalar evictions
statistics::Vector updates
BranchTargetBufferStats(statistics::Group *parent)