|
gem5 [DEVELOP-FOR-25.0]
|
#include <btb_entry.hh>
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. | |
Public Member Functions inherited from gem5::ReplaceableEntry | |
| 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. | |
Public Attributes inherited from gem5::ReplaceableEntry | |
| 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 | |
Protected Attributes inherited from gem5::ReplaceableEntry | |
| 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 |
Default constructor.
Definition at line 153 of file btb_entry.hh.
References gem5::ArmISA::ext, extractTag, inst, gem5::MaxAddr, tag, and valid.
Referenced by BTBEntry(), and operator=().
|
inline |
Copy constructor.
Definition at line 190 of file btb_entry.hh.
References BTBEntry(), extractTag, inst, gem5::ArmISA::set, tag, target, and valid.
|
inline |
|
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, extractTag, setTag(), setValid(), 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, setTag(), and valid.
|
inline |
Checks if the entry is valid.
Definition at line 214 of file btb_entry.hh.
References valid.
Referenced by match(), print(), and setValid().
|
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, extractTag, isValid(), tag, and gem5::BTBTagType::KeyType::tid.
Assignment operator.
Definition at line 200 of file btb_entry.hh.
References BTBEntry(), 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(), isValid(), gem5::ReplaceableEntry::print(), and tag.
|
inlineprotected |
Set tag associated to this block.
Definition at line 246 of file btb_entry.hh.
References tag.
Referenced by insert(), and invalidate().
|
inlineprotected |
Set valid bit.
The block must be invalid beforehand.
Definition at line 250 of file btb_entry.hh.
References isValid(), and valid.
Referenced by insert().
|
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 inst, gem5::ArmISA::set, and target.
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(), BTBEntry(), insert(), match(), 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(), BTBEntry(), gem5::branch_prediction::SimpleBTB::getInst(), operator=(), and update().
|
private |
The entry's tag.
Definition at line 268 of file btb_entry.hh.
Referenced by BTBEntry(), BTBEntry(), getTag(), match(), operator=(), print(), and setTag().
| 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(), operator=(), and update().
|
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(), BTBEntry(), invalidate(), isValid(), operator=(), and setValid().