Go to the documentation of this file.
29 #ifndef __CPU_PRED_BTB_HH__
30 #define __CPU_PRED_BTB_HH__
32 #include "arch/types.hh"
35 #include "config/the_isa.hh"
131 #endif // __CPU_PRED_BTB_HH__
int16_t ThreadID
Thread index/ID type.
unsigned log2NumThreads
Log2 NumThreads used for hashing threadid.
unsigned tagBits
The number of tag bits per entry.
unsigned instShiftAmt
Number of bits to shift PC when calculating index.
std::vector< BTBEntry > btb
The actual BTB.
void update(Addr instPC, const TheISA::PCState &targetPC, ThreadID tid)
Updates the BTB with the target of a branch.
bool valid(Addr instPC, ThreadID tid)
Checks if a branch is in the BTB.
DefaultBTB(unsigned numEntries, unsigned tagBits, unsigned instShiftAmt, unsigned numThreads)
Creates a BTB with the given number of entries, number of bits per tag, and instruction offset amount...
unsigned numEntries
The number of entries in the BTB.
unsigned tagShiftAmt
Number of bits to shift PC when calculating tag.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
unsigned tagMask
The tag mask.
Addr getTag(Addr instPC)
Returns the tag bits of a given address.
unsigned getIndex(Addr instPC, ThreadID tid)
Returns the index into the BTB, based on the branch's PC.
GenericISA::DelaySlotPCState< MachInst > PCState
ThreadID tid
The entry's thread id.
TheISA::PCState target
The entry's target.
TheISA::PCState lookup(Addr instPC, ThreadID tid)
Looks up an address in the BTB.
unsigned idxMask
The index mask.
bool valid
Whether or not the entry is valid.
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17