gem5 v24.1.0.1
|
Public Types | |
using | IndexingPolicy = gem5::BTBIndexingPolicy |
using | KeyType = gem5::BTBTagType::KeyType |
using | TagExtractor = std::function< Addr(Addr)> |
Public Member Functions | |
BTBEntry (TagExtractor ext) | |
Default constructor. | |
void | update (const PCStateBase &_target, StaticInstPtr _inst) |
Update the target and instruction in the BTB entry. | |
bool | match (const KeyType &key) const |
Checks if the given tag information corresponds to this entry's. | |
void | insert (const KeyType &key) |
Insert the block by assigning it a tag and marking it valid. | |
BTBEntry (const BTBEntry &other) | |
Copy constructor. | |
BTBEntry & | operator= (const BTBEntry &other) |
Assignment operator. | |
bool | isValid () const |
Checks if the entry is valid. | |
KeyType | getTag () const |
Get tag associated to this block. | |
void | invalidate () |
Invalidate the block. | |
std::string | print () const override |
Prints relevant information about this entry. | |
![]() | |
ReplaceableEntry () | |
virtual | ~ReplaceableEntry ()=default |
virtual void | setPosition (const uint32_t set, const uint32_t way) |
Set both the set and way. | |
uint32_t | getSet () const |
Get set number. | |
uint32_t | getWay () const |
Get way number. | |
Public Attributes | |
std::unique_ptr< PCStateBase > | target |
The entry's target. | |
StaticInstPtr | inst |
Pointer to the static branch inst at this address. | |
![]() | |
std::shared_ptr< replacement_policy::ReplacementData > | replacementData |
Replacement data associated to this entry. | |
Protected Member Functions | |
void | setTag (KeyType _tag) |
Set tag associated to this block. | |
void | setValid () |
Set valid bit. | |
Private Attributes | |
TagExtractor | extractTag |
Callback used to extract the tag from the entry. | |
bool | valid |
Valid bit. | |
KeyType | tag |
The entry's tag. | |
Additional Inherited Members | |
![]() | |
uint32_t | _set |
Set to which this entry belongs. | |
uint32_t | _way |
Way (relative position within the set) to which this entry belongs. | |
Definition at line 145 of file btb_entry.hh.
Definition at line 148 of file btb_entry.hh.
Definition at line 149 of file btb_entry.hh.
using gem5::branch_prediction::BTBEntry::TagExtractor = std::function<Addr(Addr)> |
Definition at line 150 of file btb_entry.hh.
|
inline |
|
inline |
Copy constructor.
Definition at line 190 of file btb_entry.hh.
References extractTag, inst, gem5::ArmISA::set, tag, target, and valid.
|
inline |
Get tag associated to this block.
Definition at line 219 of file btb_entry.hh.
|
inline |
Insert the block by assigning it a tag and marking it valid.
Touches block if it hadn't been touched previously.
Definition at line 183 of file btb_entry.hh.
References gem5::BTBTagType::KeyType::address, and gem5::BTBTagType::KeyType::tid.
|
inline |
Invalidate the block.
Its contents are no longer valid.
Definition at line 223 of file btb_entry.hh.
References gem5::MaxAddr.
|
inline |
Checks if the entry is valid.
Definition at line 214 of file btb_entry.hh.
|
inline |
Checks if the given tag information corresponds to this entry's.
Definition at line 172 of file btb_entry.hh.
References gem5::BTBTagType::KeyType::address, and gem5::BTBTagType::KeyType::tid.
Assignment operator.
Definition at line 200 of file btb_entry.hh.
References extractTag, inst, gem5::ArmISA::set, tag, target, and valid.
|
inlineoverridevirtual |
Prints relevant information about this entry.
Reimplemented from gem5::ReplaceableEntry.
Definition at line 236 of file btb_entry.hh.
References gem5::csprintf(), and gem5::ReplaceableEntry::print().
|
inlineprotected |
Set tag associated to this block.
Definition at line 246 of file btb_entry.hh.
|
inlineprotected |
|
inline |
Update the target and instruction in the BTB entry.
During insertion, only the tag (key) is updated.
Definition at line 161 of file btb_entry.hh.
References gem5::ArmISA::set.
Referenced by gem5::branch_prediction::SimpleBTB::update().
|
private |
Callback used to extract the tag from the entry.
Definition at line 258 of file btb_entry.hh.
Referenced by BTBEntry(), and operator=().
StaticInstPtr gem5::branch_prediction::BTBEntry::inst |
Pointer to the static branch inst at this address.
Definition at line 233 of file btb_entry.hh.
Referenced by BTBEntry(), gem5::branch_prediction::SimpleBTB::getInst(), and operator=().
|
private |
The entry's tag.
Definition at line 268 of file btb_entry.hh.
Referenced by BTBEntry(), and operator=().
std::unique_ptr<PCStateBase> gem5::branch_prediction::BTBEntry::target |
The entry's target.
Definition at line 230 of file btb_entry.hh.
Referenced by BTBEntry(), gem5::branch_prediction::SimpleBTB::lookup(), and operator=().
|
private |
Valid bit.
The contents of this entry are only valid if this bit is set.
Definition at line 265 of file btb_entry.hh.
Referenced by BTBEntry(), and operator=().