gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::CacheEntry Class Reference

A CacheEntry is an entry containing a tag. More...

#include <cache_entry.hh>

Inheritance diagram for gem5::CacheEntry:
gem5::ReplaceableEntry gem5::TaggedEntry gem5::compression::FrequentValues::VFTEntry gem5::prefetch::DeltaCorrelatingPredictionTables::DCPTEntry gem5::CacheBlk gem5::SectorBlk gem5::prefetch::AccessMapPatternMatching::AccessMapEntry gem5::prefetch::IndirectMemory::IndirectPatternDetectorEntry gem5::prefetch::IndirectMemory::PrefetchTableEntry gem5::prefetch::IrregularStreamBuffer::AddressMappingEntry gem5::prefetch::IrregularStreamBuffer::TrainingUnitEntry gem5::prefetch::PIF::IndexEntry gem5::prefetch::STeMS::ActiveGenerationTableEntry gem5::prefetch::SignaturePath::PatternEntry gem5::prefetch::SignaturePath::SignatureEntry gem5::prefetch::SignaturePathV2::GlobalHistoryEntry gem5::prefetch::Stride::StrideEntry

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.
 
- 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

bool valid {false}
 Valid bit.
 
Addr tag {MaxAddr}
 The entry's tag.
 

Additional Inherited Members

- Public Attributes inherited from gem5::ReplaceableEntry
std::shared_ptr< replacement_policy::ReplacementDatareplacementData
 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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CacheEntry()

gem5::CacheEntry::CacheEntry ( )
default

◆ ~CacheEntry()

gem5::CacheEntry::~CacheEntry ( )
default

Member Function Documentation

◆ getTag()

◆ insert()

virtual void gem5::CacheEntry::insert ( const Addr tag)
inlinevirtual

Insert the block by assigning it a tag and marking it valid.

Touches block if it hadn't been touched previously.

Parameters
tagThe tag value.

Reimplemented in gem5::CacheBlk, and gem5::TaggedEntry.

Definition at line 85 of file cache_entry.hh.

References setTag(), setValid(), and tag.

◆ invalidate()

◆ isValid()

virtual bool gem5::CacheEntry::isValid ( ) const
inlinevirtual

Checks if the entry is valid.

Returns
True 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().

◆ matchTag()

virtual bool gem5::CacheEntry::matchTag ( const Addr tag) const
inlinevirtual

Checks if the given tag information corresponds to this entry's.

Parameters
tagThe tag value to compare to.
Returns
True if the tag information match this entry's.

Reimplemented in gem5::TaggedEntry.

Definition at line 73 of file cache_entry.hh.

References getTag(), isValid(), and tag.

◆ print()

std::string gem5::CacheEntry::print ( ) const
inlineoverridevirtual

Prints relevant information about this entry.

Returns
A string containg the contents of 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().

◆ setTag()

virtual void gem5::CacheEntry::setTag ( Addr _tag)
inlineprotectedvirtual

Set tag associated to this block.

Parameters
tagThe tag value.

Definition at line 112 of file cache_entry.hh.

References tag.

Referenced by insert(), gem5::TaggedEntry::insert(), and invalidate().

◆ setValid()

virtual void gem5::CacheEntry::setValid ( )
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().

Member Data Documentation

◆ tag

◆ valid

bool gem5::CacheEntry::valid {false}
private

Valid bit.

The contents of this entry are only valid if this bit is set.

See also
invalidate()
insert()

Definition at line 128 of file cache_entry.hh.

Referenced by invalidate(), isValid(), and setValid().


The documentation for this class was generated from the following file:

Generated on Tue Jun 18 2024 16:24:10 for gem5 by doxygen 1.11.0