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

A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement functionality. More...

#include <replaceable_entry.hh>

Inheritance diagram for gem5::ReplaceableEntry:
gem5::CacheEntry gem5::ruby::AbstractCacheEntry 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

 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.
 
virtual std::string print () const
 Prints relevant information about this entry.
 

Public Attributes

std::shared_ptr< replacement_policy::ReplacementDatareplacementData
 Replacement data associated to this entry.
 

Protected Attributes

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 replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement functionality.

This entry is located in a specific row and column of the table (set and way in cache nomenclature), which are stored within the entry itself.

It contains the replacement data pointer, which must be instantiated by the replacement policy before being used.

See also
Replacement Policies

Definition at line 62 of file replaceable_entry.hh.

Constructor & Destructor Documentation

◆ ReplaceableEntry()

gem5::ReplaceableEntry::ReplaceableEntry ( )
inline

Definition at line 76 of file replaceable_entry.hh.

◆ ~ReplaceableEntry()

virtual gem5::ReplaceableEntry::~ReplaceableEntry ( )
virtualdefault

Member Function Documentation

◆ getSet()

uint32_t gem5::ReplaceableEntry::getSet ( ) const
inline

Get set number.

Returns
The set to which this entry belongs.

Definition at line 103 of file replaceable_entry.hh.

References _set.

Referenced by gem5::ruby::CacheMemory::deallocate(), print(), gem5::SetAssociative::regenerateAddr(), gem5::SkewedAssociative::regenerateAddr(), and TEST().

◆ getWay()

uint32_t gem5::ReplaceableEntry::getWay ( ) const
inline

Get way number.

Returns
The way to which this entry belongs.

Definition at line 110 of file replaceable_entry.hh.

References _way.

Referenced by gem5::ruby::CacheMemory::deallocate(), print(), gem5::SkewedAssociative::regenerateAddr(), and TEST().

◆ print()

virtual std::string gem5::ReplaceableEntry::print ( ) const
inlinevirtual

Prints relevant information about this entry.

Returns
A string containg the contents of this entry.

Reimplemented in gem5::CacheBlk, gem5::CacheEntry, gem5::CompressionBlk, gem5::FALRUBlk, gem5::ruby::AbstractCacheEntry, gem5::SectorBlk, gem5::SectorSubBlk, gem5::SuperBlk, and gem5::TaggedEntry.

Definition at line 118 of file replaceable_entry.hh.

References gem5::csprintf(), getSet(), and getWay().

Referenced by gem5::CacheEntry::print(), and gem5::TaggedEntry::print().

◆ setPosition()

virtual void gem5::ReplaceableEntry::setPosition ( const uint32_t set,
const uint32_t way )
inlinevirtual

Set both the set and way.

Should be called only once.

Parameters
setThe set of this entry.
wayThe way of this entry.

Reimplemented in gem5::SectorBlk.

Definition at line 92 of file replaceable_entry.hh.

References _set, _way, and gem5::ArmISA::set.

Referenced by gem5::BaseIndexingPolicy::setEntry(), gem5::SectorBlk::setPosition(), gem5::FALRU::tagsInit(), and TEST().

Member Data Documentation

◆ _set

uint32_t gem5::ReplaceableEntry::_set
protected

Set to which this entry belongs.

Definition at line 68 of file replaceable_entry.hh.

Referenced by getSet(), and setPosition().

◆ _way

uint32_t gem5::ReplaceableEntry::_way
protected

Way (relative position within the set) to which this entry belongs.

Definition at line 73 of file replaceable_entry.hh.

Referenced by getWay(), and setPosition().

◆ replacementData


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

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