gem5  v22.1.0.0
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
gem5::TaggedEntry Class Reference

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

#include <tagged_entry.hh>

Inheritance diagram for gem5::TaggedEntry:
gem5::ReplaceableEntry gem5::CacheBlk gem5::SectorBlk gem5::compression::FrequentValues::VFTEntry gem5::prefetch::AccessMapPatternMatching::AccessMapEntry gem5::prefetch::DeltaCorrelatingPredictionTables::DCPTEntry 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

 TaggedEntry ()
 ~TaggedEntry ()=default
virtual bool isValid () const
 Checks if the entry is valid. More...
bool isSecure () const
 Check if this block holds data from the secure memory space. More...
virtual Addr getTag () const
 Get tag associated to this block. More...
virtual bool matchTag (Addr tag, bool is_secure) const
 Checks if the given tag information corresponds to this entry's. More...
virtual void insert (const Addr tag, const bool is_secure)
 Insert the block by assigning it a tag and marking it valid. More...
virtual void invalidate ()
 Invalidate the block. More...
std::string print () const override
 Prints relevant information about this entry. More...
- Public Member Functions inherited from gem5::ReplaceableEntry
 ReplaceableEntry ()=default
virtual ~ReplaceableEntry ()=default
virtual void setPosition (const uint32_t set, const uint32_t way)
 Set both the set and way. More...
uint32_t getSet () const
 Get set number. More...
uint32_t getWay () const
 Get way number. More...

Protected Member Functions

virtual void setTag (Addr tag)
 Set tag associated to this block. More...
virtual void setSecure ()
 Set secure bit. More...
virtual void setValid ()
 Set valid bit. More...

Private Member Functions

void clearSecure ()
 Clear secure bit. More...

Private Attributes

bool _valid
 Valid bit. More...
bool _secure
 Secure bit. More...
Addr _tag
 The entry's tag. More...

Additional Inherited Members

- Public Attributes inherited from gem5::ReplaceableEntry
std::shared_ptr< replacement_policy::ReplacementDatareplacementData
 Replacement data associated to this entry. More...
- Protected Attributes inherited from gem5::ReplaceableEntry
uint32_t _set
 Set to which this entry belongs. More...
uint32_t _way
 Way (relative position within the set) to which this entry belongs. More...

Detailed Description

A tagged entry is an entry containing a tag.

Each tag is accompanied by a secure bit, which informs whether it belongs to a secure address space. A tagged entry's contents are only relevant if it is marked as valid.

Definition at line 46 of file tagged_entry.hh.

Constructor & Destructor Documentation

◆ TaggedEntry()

gem5::TaggedEntry::TaggedEntry ( )

Definition at line 49 of file tagged_entry.hh.

◆ ~TaggedEntry()

gem5::TaggedEntry::~TaggedEntry ( )

Member Function Documentation

◆ clearSecure()

void gem5::TaggedEntry::clearSecure ( )

Clear secure bit.

Should be only used by the invalidation function.

Definition at line 154 of file tagged_entry.hh.

References _secure.

Referenced by invalidate().

◆ getTag()

virtual Addr gem5::TaggedEntry::getTag ( ) const

◆ insert()

virtual void gem5::TaggedEntry::insert ( const Addr  tag,
const bool  is_secure 

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

Touches block if it hadn't been touched previously.

tagThe tag value.

Reimplemented in gem5::SectorSubBlk, and gem5::TempCacheBlk.

Definition at line 93 of file tagged_entry.hh.

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

Referenced by gem5::SectorSubBlk::insert().

◆ invalidate()

virtual void gem5::TaggedEntry::invalidate ( )

◆ isSecure()

bool gem5::TaggedEntry::isSecure ( ) const

◆ isValid()

virtual bool gem5::TaggedEntry::isValid ( ) const

Checks if the entry is valid.

True if the entry is valid.

Reimplemented in gem5::SectorBlk.

Definition at line 57 of file tagged_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::Cache::handleTimingReqMiss(), gem5::NoncoherentCache::handleTimingReqMiss(), gem5::BaseCache::handleTimingReqMiss(), gem5::CacheBlk::insert(), gem5::BaseTags::insertBlock(), gem5::BaseTags::invalidate(), gem5::BaseCache::invalidateBlock(), gem5::BaseCache::invalidateVisitor(), gem5::CacheBlk::isSet(), gem5::BaseCache::maintainClusivity(), matchTag(), gem5::BaseTags::moveBlock(), gem5::SectorTags::moveBlock(), gem5::CacheBlk::operator=(), gem5::CacheBlk::print(), print(), gem5::CacheBlkPrintWrapper::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::TaggedEntry::matchTag ( Addr  tag,
bool  is_secure 
) const

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

tagThe tag value to compare to.
is_secureWhether secure bit is set.
True if the tag information match this entry's.

Definition at line 81 of file tagged_entry.hh.

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

Referenced by gem5::BaseTags::findBlock(), gem5::CompressedTags::findVictim(), gem5::SectorTags::findVictim(), and gem5::SectorSubBlk::insert().

◆ print()

std::string gem5::TaggedEntry::print ( ) const

Prints relevant information about this entry.

A string containg the contents of this entry.

Reimplemented from gem5::ReplaceableEntry.

Definition at line 111 of file tagged_entry.hh.

References gem5::csprintf(), getTag(), isSecure(), isValid(), and gem5::ReplaceableEntry::print().

Referenced by gem5::CacheBlk::print(), and gem5::SectorBlk::print().

◆ setSecure()

virtual void gem5::TaggedEntry::setSecure ( )

Set secure bit.

Definition at line 126 of file tagged_entry.hh.

References _secure.

Referenced by insert().

◆ setTag()

virtual void gem5::TaggedEntry::setTag ( Addr  tag)

Set tag associated to this block.

tagThe tag value.

Definition at line 123 of file tagged_entry.hh.

References _tag.

Referenced by insert(), and invalidate().

◆ setValid()

virtual void gem5::TaggedEntry::setValid ( )

Set valid bit.

The block must be invalid beforehand.

Reimplemented in gem5::SectorSubBlk.

Definition at line 130 of file tagged_entry.hh.

References _valid, and isValid().

Referenced by insert(), and gem5::SectorSubBlk::setValid().

Member Data Documentation

◆ _secure

bool gem5::TaggedEntry::_secure

Secure bit.

Marks whether this entry refers to an address in the secure memory space. Must always be modified along with the tag.

Definition at line 148 of file tagged_entry.hh.

Referenced by clearSecure(), isSecure(), and setSecure().

◆ _tag

Addr gem5::TaggedEntry::_tag

The entry's tag.

Definition at line 151 of file tagged_entry.hh.

Referenced by getTag(), and setTag().

◆ _valid

bool gem5::TaggedEntry::_valid

Valid bit.

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

See also

Definition at line 142 of file tagged_entry.hh.

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

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

Generated on Wed Dec 21 2022 10:23:27 for gem5 by doxygen 1.9.1