gem5 v24.1.0.1
|
A CacheEntry is an entry containing a tag. More...
#include <cache_entry.hh>
Public Types | |
using | IndexingPolicy = BaseIndexingPolicy |
using | KeyType = Addr |
using | TagExtractor = std::function< Addr(Addr)> |
Public Member Functions | |
CacheEntry (TagExtractor ext) | |
~CacheEntry ()=default | |
virtual bool | isValid () const |
Checks if the entry is valid. | |
virtual Addr | getTag () const |
Get tag associated to this block. | |
virtual bool | match (const Addr addr) const |
Checks if the given tag information corresponds to this entry's. | |
virtual void | insert (const Addr addr) |
Insert the block by assigning it a tag and marking it valid. | |
virtual 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. | |
Protected Member Functions | |
virtual void | setTag (Addr _tag) |
Set tag associated to this block. | |
virtual void | setValid () |
Set valid bit. | |
Private Attributes | |
TagExtractor | extractTag |
Callback used to extract the tag from the entry. | |
bool | valid |
Valid bit. | |
Addr | tag |
The entry's tag. | |
Additional Inherited Members | |
Public Attributes inherited from gem5::ReplaceableEntry | |
std::shared_ptr< replacement_policy::ReplacementData > | replacementData |
Replacement data associated to this entry. | |
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. | |
A CacheEntry is an entry containing a tag.
A tagged entry's contents are only relevant if it is marked as valid.
Definition at line 59 of file cache_entry.hh.
Definition at line 62 of file cache_entry.hh.
using gem5::CacheEntry::KeyType = Addr |
Definition at line 63 of file cache_entry.hh.
using gem5::CacheEntry::TagExtractor = std::function<Addr(Addr)> |
Definition at line 64 of file cache_entry.hh.
|
inline |
Definition at line 66 of file cache_entry.hh.
|
default |
|
inlinevirtual |
Get tag associated to this block.
Definition at line 83 of file cache_entry.hh.
References tag.
|
inlinevirtual |
Insert the block by assigning it a tag and marking it valid.
Touches block if it hadn't been touched previously.
addr | The address value. |
Definition at line 104 of file cache_entry.hh.
References gem5::X86ISA::addr, extractTag, setTag(), and setValid().
|
inlinevirtual |
Invalidate the block.
Its contents are no longer valid.
Reimplemented in gem5::compression::FrequentValues::VFTEntry, and gem5::prefetch::DeltaCorrelatingPredictionTables::DCPTEntry.
Definition at line 112 of file cache_entry.hh.
References gem5::MaxAddr, setTag(), and valid.
Referenced by gem5::compression::FrequentValues::VFTEntry::invalidate(), and gem5::prefetch::DeltaCorrelatingPredictionTables::DCPTEntry::invalidate().
|
inlinevirtual |
Checks if the entry is valid.
Definition at line 76 of file cache_entry.hh.
References valid.
Referenced by match(), print(), and setValid().
|
inlinevirtual |
Checks if the given tag information corresponds to this entry's.
addr | The address value to be compared before tag is extracted |
Definition at line 92 of file cache_entry.hh.
References gem5::X86ISA::addr, extractTag, getTag(), and isValid().
|
inlineoverridevirtual |
Prints relevant information about this entry.
Reimplemented from gem5::ReplaceableEntry.
Definition at line 119 of file cache_entry.hh.
References gem5::csprintf(), getTag(), isValid(), and gem5::ReplaceableEntry::print().
|
inlineprotectedvirtual |
Set tag associated to this block.
tag | The tag value. |
Definition at line 131 of file cache_entry.hh.
References tag.
Referenced by insert(), and invalidate().
|
inlineprotectedvirtual |
Set valid bit.
The block must be invalid beforehand.
Definition at line 135 of file cache_entry.hh.
References isValid(), and valid.
Referenced by insert().
|
private |
Callback used to extract the tag from the entry.
Definition at line 143 of file cache_entry.hh.
|
private |
The entry's tag.
Definition at line 153 of file cache_entry.hh.
|
private |
Valid bit.
The contents of this entry are only valid if this bit is set.
Definition at line 150 of file cache_entry.hh.
Referenced by invalidate(), isValid(), and setValid().