gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | Protected Attributes | List of all members
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 ReplaceableEntry:
AbstractCacheEntry CacheBlk SectorBlk StridePrefetcher::StrideEntry TaggedEntry FALRUBlk SectorSubBlk TempCacheBlk SuperBlk AccessMapPatternMatching::AccessMapEntry DeltaCorrelatingPredictionTables::DCPTEntry IndirectMemoryPrefetcher::IndirectPatternDetectorEntry IndirectMemoryPrefetcher::PrefetchTableEntry IrregularStreamBufferPrefetcher::AddressMappingEntry IrregularStreamBufferPrefetcher::TrainingUnitEntry PIFPrefetcher::IndexEntry SignaturePathPrefetcher::PatternEntry SignaturePathPrefetcher::SignatureEntry SignaturePathPrefetcherV2::GlobalHistoryEntry STeMSPrefetcher::ActiveGenerationTableEntry

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

Constructor & Destructor Documentation

◆ ReplaceableEntry()

ReplaceableEntry::ReplaceableEntry ( )
default

◆ ~ReplaceableEntry()

virtual ReplaceableEntry::~ReplaceableEntry ( )
virtualdefault

Member Function Documentation

◆ getSet()

uint32_t ReplaceableEntry::getSet ( ) const
inline

Get set number.

Returns
The set to which this entry belongs.

Definition at line 96 of file replaceable_entry.hh.

Referenced by StridePrefetcher::PCTable::findVictim(), SetAssociative::regenerateAddr(), SkewedAssociative::regenerateAddr(), and CacheMemory::setMRU().

◆ getWay()

uint32_t ReplaceableEntry::getWay ( ) const
inline

Get way number.

Returns
The way to which this entry belongs.

Definition at line 103 of file replaceable_entry.hh.

Referenced by StridePrefetcher::PCTable::findVictim(), SkewedAssociative::regenerateAddr(), and CacheMemory::setMRU().

◆ print()

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

Prints relevant information about this entry.

Returns
A string containg the contents of this entry.

Reimplemented in CacheBlk, SectorSubBlk, CompressionBlk, and FALRUBlk.

Definition at line 111 of file replaceable_entry.hh.

References csprintf().

Referenced by CacheBlk::print().

◆ setPosition()

virtual void 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 SectorBlk.

Definition at line 85 of file replaceable_entry.hh.

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

Member Data Documentation

◆ _set

uint32_t ReplaceableEntry::_set
protected

Set to which this entry belongs.

Definition at line 61 of file replaceable_entry.hh.

◆ _way

uint32_t ReplaceableEntry::_way
protected

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

Definition at line 66 of file replaceable_entry.hh.

◆ replacementData

std::shared_ptr<ReplacementData> ReplaceableEntry::replacementData

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

Generated on Fri Feb 28 2020 16:27:15 for gem5 by doxygen 1.8.13