gem5 v24.1.0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | 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::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 Types

using KeyType = TaggedTypes::KeyType
 
using IndexingPolicy = TaggedIndexingPolicy
 
using TagExtractor = std::function< Addr(Addr)>
 

Public Member Functions

 TaggedEntry ()
 
 ~TaggedEntry ()=default
 
void registerTagExtractor (TagExtractor ext)
 
virtual bool isValid () const
 Checks if the entry is valid.
 
bool isSecure () const
 Check if this block holds data from the secure memory space.
 
virtual Addr getTag () const
 Get tag associated to this block.
 
bool match (const KeyType &key) const
 Checks if the given tag information corresponds to this entry's.
 
virtual void insert (const KeyType &key)
 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 setSecure ()
 Set secure bit.
 
void clearSecure ()
 Clear secure bit.
 
virtual void setValid ()
 Set valid bit.
 

Protected Attributes

TagExtractor extractTag
 Callback used to extract the tag from the 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.
 

Private Attributes

bool _valid
 Valid bit.
 
bool _secure
 Secure bit.
 
Addr _tag
 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.
 

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 110 of file tagged_entry.hh.

Member Typedef Documentation

◆ IndexingPolicy

Definition at line 114 of file tagged_entry.hh.

◆ KeyType

Definition at line 113 of file tagged_entry.hh.

◆ TagExtractor

using gem5::TaggedEntry::TagExtractor = std::function<Addr(Addr)>

Definition at line 115 of file tagged_entry.hh.

Constructor & Destructor Documentation

◆ TaggedEntry()

gem5::TaggedEntry::TaggedEntry ( )
inline

Definition at line 117 of file tagged_entry.hh.

◆ ~TaggedEntry()

gem5::TaggedEntry::~TaggedEntry ( )
default

Member Function Documentation

◆ clearSecure()

void gem5::TaggedEntry::clearSecure ( )
inlineprotected

Clear secure bit.

Should be only used by the invalidation function.

Definition at line 206 of file tagged_entry.hh.

◆ getTag()

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

◆ insert()

virtual void gem5::TaggedEntry::insert ( const KeyType key)
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, gem5::TempCacheBlk, and gem5::SectorSubBlk.

Definition at line 170 of file tagged_entry.hh.

References gem5::TaggedTypes::KeyType::address, and gem5::TaggedTypes::KeyType::secure.

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

◆ invalidate()

virtual void gem5::TaggedEntry::invalidate ( )
inlinevirtual

◆ isSecure()

bool gem5::TaggedEntry::isSecure ( ) const
inline

◆ isValid()

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

Checks if the entry is valid.

Returns
True if the entry is valid.

Reimplemented in gem5::SectorBlk.

Definition at line 133 of file tagged_entry.hh.

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(), gem5::BaseTags::moveBlock(), gem5::SectorTags::moveBlock(), gem5::CacheBlk::operator=(), gem5::CacheBlk::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(), gem5::BaseCache::writebackBlk(), and gem5::BaseCache::writebackVisitor().

◆ match()

bool gem5::TaggedEntry::match ( const KeyType key) const
inline

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

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

Definition at line 157 of file tagged_entry.hh.

References gem5::TaggedTypes::KeyType::address, gem5::ArmISA::isSecure(), and gem5::TaggedTypes::KeyType::secure.

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

◆ print()

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

Prints relevant information about this entry.

Returns
A string containg the contents of this entry.

Reimplemented from gem5::ReplaceableEntry.

Definition at line 188 of file tagged_entry.hh.

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

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

◆ registerTagExtractor()

void gem5::TaggedEntry::registerTagExtractor ( TagExtractor  ext)
inline

◆ setSecure()

virtual void gem5::TaggedEntry::setSecure ( )
inlineprotectedvirtual

Set secure bit.

Definition at line 203 of file tagged_entry.hh.

◆ setTag()

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

Set tag associated to this block.

Parameters
tagThe tag value.

Definition at line 200 of file tagged_entry.hh.

◆ setValid()

virtual void gem5::TaggedEntry::setValid ( )
inlineprotectedvirtual

Set valid bit.

The block must be invalid beforehand.

Reimplemented in gem5::SectorSubBlk.

Definition at line 210 of file tagged_entry.hh.

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

Member Data Documentation

◆ _secure

bool gem5::TaggedEntry::_secure
private

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 231 of file tagged_entry.hh.

◆ _tag

Addr gem5::TaggedEntry::_tag
private

The entry's tag.

Definition at line 234 of file tagged_entry.hh.

◆ _valid

bool gem5::TaggedEntry::_valid
private

Valid bit.

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

See also
invalidate()
insert()

Definition at line 225 of file tagged_entry.hh.

◆ extractTag

TagExtractor gem5::TaggedEntry::extractTag
protected

Callback used to extract the tag from the entry.

Definition at line 217 of file tagged_entry.hh.


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

Generated on Mon Jan 13 2025 04:28:59 for gem5 by doxygen 1.9.8