gem5  v21.1.0.2
Public Member Functions | Public Attributes | Protected Attributes | List of all members
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::ruby::AbstractCacheEntry gem5::TaggedEntry gem5::CacheBlk 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::SignaturePath::PatternEntry gem5::prefetch::SignaturePath::SignatureEntry gem5::prefetch::SignaturePathV2::GlobalHistoryEntry gem5::prefetch::STeMS::ActiveGenerationTableEntry gem5::prefetch::Stride::StrideEntry gem5::SectorBlk

Public Member Functions

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

Public Attributes

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

Protected Attributes

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 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 63 of file replaceable_entry.hh.

Constructor & Destructor Documentation

◆ ReplaceableEntry()

gem5::ReplaceableEntry::ReplaceableEntry ( )
default

◆ ~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 104 of file replaceable_entry.hh.

References _set.

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

◆ getWay()

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

Get way number.

Returns
The way to which this entry belongs.

Definition at line 111 of file replaceable_entry.hh.

References _way.

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

◆ 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::SuperBlk, gem5::SectorBlk, gem5::CompressionBlk, gem5::SectorSubBlk, gem5::TaggedEntry, and gem5::FALRUBlk.

Definition at line 119 of file replaceable_entry.hh.

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

Referenced by 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 93 of file replaceable_entry.hh.

References _set, and _way.

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

Member Data Documentation

◆ _set

uint32_t gem5::ReplaceableEntry::_set
protected

Set to which this entry belongs.

Definition at line 69 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 74 of file replaceable_entry.hh.

Referenced by getWay(), and setPosition().

◆ replacementData

std::shared_ptr<replacement_policy::ReplacementData> gem5::ReplaceableEntry::replacementData

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

Generated on Tue Sep 21 2021 12:28:04 for gem5 by doxygen 1.8.17