gem5 v24.0.0.0
|
A CacheEntry is an entry containing a tag. More...
#include <cache_entry.hh>
Public Member Functions | |
CacheEntry ()=default | |
~CacheEntry ()=default | |
virtual bool | isValid () const |
Checks if the entry is valid. | |
virtual Addr | getTag () const |
Get tag associated to this block. | |
virtual bool | matchTag (const Addr tag) const |
Checks if the given tag information corresponds to this entry's. | |
virtual void | insert (const Addr tag) |
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. | |
![]() | |
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 | |
bool | valid {false} |
Valid bit. | |
Addr | tag {MaxAddr} |
The entry's tag. | |
Additional Inherited Members | |
![]() | |
std::shared_ptr< replacement_policy::ReplacementData > | replacementData |
Replacement data associated to this entry. | |
![]() | |
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 46 of file cache_entry.hh.
|
default |
|
default |
|
inlinevirtual |
Get tag associated to this block.
Reimplemented in gem5::SectorSubBlk.
Definition at line 64 of file cache_entry.hh.
References tag.
Referenced by gem5::FALRU::findBlock(), gem5::SectorSubBlk::getTag(), gem5::FALRU::insertBlock(), gem5::FALRU::invalidate(), matchTag(), gem5::TaggedEntry::matchTag(), print(), gem5::TaggedEntry::print(), gem5::BaseSetAssoc::regenerateBlkAddr(), gem5::FALRU::regenerateBlkAddr(), gem5::SectorTags::regenerateBlkAddr(), and gem5::prefetch::IndirectMemory::trackMissIndex2().
|
inlinevirtual |
Insert the block by assigning it a tag and marking it valid.
Touches block if it hadn't been touched previously.
tag | The tag value. |
Reimplemented in gem5::CacheBlk, and gem5::TaggedEntry.
Definition at line 85 of file cache_entry.hh.
References setTag(), setValid(), and tag.
|
inlinevirtual |
Invalidate the block.
Its contents are no longer valid.
Reimplemented in gem5::CacheBlk, gem5::compression::FrequentValues::VFTEntry, gem5::CompressionBlk, gem5::prefetch::AccessMapPatternMatching::AccessMapEntry, gem5::prefetch::DeltaCorrelatingPredictionTables::DCPTEntry, gem5::prefetch::IndirectMemory::IndirectPatternDetectorEntry, gem5::prefetch::IndirectMemory::PrefetchTableEntry, gem5::prefetch::IrregularStreamBuffer::AddressMappingEntry, gem5::prefetch::SignaturePath::PatternEntry, gem5::prefetch::STeMS::ActiveGenerationTableEntry, gem5::prefetch::Stride::StrideEntry, gem5::SectorSubBlk, gem5::SuperBlk, gem5::TaggedEntry, and gem5::TempCacheBlk.
Definition at line 93 of file cache_entry.hh.
References gem5::MaxAddr, setTag(), and valid.
Referenced by gem5::compression::FrequentValues::VFTEntry::invalidate(), gem5::prefetch::DeltaCorrelatingPredictionTables::DCPTEntry::invalidate(), gem5::SuperBlk::invalidate(), and gem5::TaggedEntry::invalidate().
|
inlinevirtual |
Checks if the entry is valid.
Reimplemented in gem5::SectorBlk.
Definition at line 57 of file cache_entry.hh.
References valid.
Referenced by gem5::BaseCache::access(), gem5::Cache::access(), gem5::NoncoherentCache::access(), gem5::FALRU::accessBlock(), gem5::Cache::cleanEvictBlk(), gem5::BaseTags::cleanupRefsVisitor(), gem5::BaseTags::computeStatsVisitor(), gem5::Cache::createMissPacket(), gem5::NoncoherentCache::createMissPacket(), gem5::FALRU::findBlock(), gem5::CompressedTags::findVictim(), gem5::SectorTags::findVictim(), gem5::BaseCache::functionalAccess(), gem5::SectorSubBlk::getTag(), gem5::Cache::handleAtomicReqMiss(), gem5::BaseCache::handleFill(), gem5::Cache::handleSnoop(), gem5::BaseCache::handleTimingReqMiss(), gem5::Cache::handleTimingReqMiss(), gem5::NoncoherentCache::handleTimingReqMiss(), gem5::CacheBlk::insert(), gem5::BaseTags::insertBlock(), gem5::BaseTags::invalidate(), gem5::BaseCache::invalidateBlock(), gem5::BaseCache::invalidateVisitor(), gem5::CacheBlk::isSet(), gem5::BaseCache::maintainClusivity(), matchTag(), gem5::TaggedEntry::matchTag(), gem5::BaseTags::moveBlock(), gem5::SectorTags::moveBlock(), gem5::CacheBlk::operator=(), gem5::CacheBlk::print(), gem5::CacheBlkPrintWrapper::print(), print(), gem5::TaggedEntry::print(), gem5::FALRU::CacheTracking::recordAccess(), gem5::BaseCache::recvAtomic(), gem5::BaseCache::recvTimingReq(), gem5::BaseCache::recvTimingResp(), gem5::BaseCache::satisfyRequest(), gem5::Cache::serviceMSHRTargets(), gem5::CacheBlk::setCoherenceBits(), setValid(), gem5::BaseCache::writebackBlk(), and gem5::BaseCache::writebackVisitor().
|
inlinevirtual |
Checks if the given tag information corresponds to this entry's.
tag | The tag value to compare to. |
Reimplemented in gem5::TaggedEntry.
Definition at line 73 of file cache_entry.hh.
|
inlineoverridevirtual |
Prints relevant information about this entry.
Reimplemented from gem5::ReplaceableEntry.
Reimplemented in gem5::CompressionBlk, gem5::FALRUBlk, gem5::SectorBlk, gem5::SectorSubBlk, gem5::SuperBlk, and gem5::TaggedEntry.
Definition at line 100 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 112 of file cache_entry.hh.
References tag.
Referenced by insert(), gem5::TaggedEntry::insert(), and invalidate().
|
inlineprotectedvirtual |
Set valid bit.
The block must be invalid beforehand.
Reimplemented in gem5::SectorSubBlk.
Definition at line 116 of file cache_entry.hh.
References isValid(), and valid.
Referenced by insert(), gem5::TaggedEntry::insert(), and gem5::SectorSubBlk::setValid().
The entry's tag.
Definition at line 131 of file cache_entry.hh.
Referenced by getTag(), gem5::SectorSubBlk::getTag(), gem5::CacheBlk::insert(), insert(), gem5::SectorSubBlk::insert(), gem5::TaggedEntry::insert(), matchTag(), gem5::TaggedEntry::matchTag(), and setTag().
|
private |
Valid bit.
The contents of this entry are only valid if this bit is set.
Definition at line 128 of file cache_entry.hh.
Referenced by invalidate(), isValid(), and setValid().