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

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

#include <tagged_entry.hh>

Inheritance diagram for gem5::TaggedEntry:
gem5::CacheEntry 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 Member Functions

 TaggedEntry ()
 
 ~TaggedEntry ()=default
 
bool isSecure () const
 Check if this block holds data from the secure memory space.
 
virtual bool matchTag (Addr tag, bool is_secure) const
 Checks if the given tag information corresponds to this entry's.
 
virtual void insert (const Addr tag, const bool is_secure)
 Insert the block by assigning it a tag and marking it valid.
 
void invalidate () override
 Invalidate the block.
 
std::string print () const override
 Prints relevant information about this entry.
 
bool matchTag (const Addr tag) const override
 Checks if the given tag information corresponds to this entry's.
 
void insert (const Addr tag) override
 Insert the block by assigning it a tag and marking it valid.
 
- Public Member Functions inherited from gem5::CacheEntry
 CacheEntry ()=default
 
 ~CacheEntry ()=default
 
virtual bool isValid () const
 Checks if the entry is valid.
 
virtual Addr getTag () const
 Get tag associated to this block.
 
- 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 setSecure ()
 Set secure bit.
 
- Protected Member Functions inherited from gem5::CacheEntry
virtual void setTag (Addr _tag)
 Set tag associated to this block.
 
virtual void setValid ()
 Set valid bit.
 

Private Member Functions

void clearSecure ()
 Clear secure bit.
 

Private Attributes

bool _secure
 Secure bit.
 

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

Constructor & Destructor Documentation

◆ TaggedEntry()

gem5::TaggedEntry::TaggedEntry ( )
inline

Definition at line 51 of file tagged_entry.hh.

◆ ~TaggedEntry()

gem5::TaggedEntry::~TaggedEntry ( )
default

Member Function Documentation

◆ clearSecure()

void gem5::TaggedEntry::clearSecure ( )
inlineprivate

Clear secure bit.

Should be only used by the invalidation function.

Definition at line 130 of file tagged_entry.hh.

References _secure.

Referenced by invalidate().

◆ insert() [1/2]

void gem5::TaggedEntry::insert ( const Addr tag)
inlineoverridevirtual

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 from gem5::CacheEntry.

Definition at line 113 of file tagged_entry.hh.

References panic.

◆ insert() [2/2]

virtual void gem5::TaggedEntry::insert ( const Addr tag,
const bool is_secure )
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::SectorSubBlk, and gem5::TempCacheBlk.

Definition at line 81 of file tagged_entry.hh.

References setSecure(), gem5::CacheEntry::setTag(), gem5::CacheEntry::setValid(), and gem5::CacheEntry::tag.

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

◆ invalidate()

◆ isSecure()

◆ matchTag() [1/2]

virtual bool gem5::TaggedEntry::matchTag ( Addr tag,
bool is_secure ) const
inlinevirtual

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

References gem5::CacheEntry::getTag(), isSecure(), gem5::CacheEntry::isValid(), and gem5::CacheEntry::tag.

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

◆ matchTag() [2/2]

bool gem5::TaggedEntry::matchTag ( const Addr tag) const
inlineoverridevirtual

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 from gem5::CacheEntry.

Definition at line 106 of file tagged_entry.hh.

References panic.

◆ 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::CacheEntry.

Definition at line 99 of file tagged_entry.hh.

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

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

◆ setSecure()

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

Set secure bit.

Definition at line 120 of file tagged_entry.hh.

References _secure.

Referenced by insert().

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

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


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

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