gem5  v20.1.0.0
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 TaggedEntry FALRUBlk SectorSubBlk TempCacheBlk SuperBlk Prefetcher::AccessMapPatternMatching::AccessMapEntry Prefetcher::DeltaCorrelatingPredictionTables::DCPTEntry Prefetcher::IndirectMemory::IndirectPatternDetectorEntry Prefetcher::IndirectMemory::PrefetchTableEntry Prefetcher::IrregularStreamBuffer::AddressMappingEntry Prefetcher::IrregularStreamBuffer::TrainingUnitEntry Prefetcher::PIF::IndexEntry Prefetcher::SignaturePath::PatternEntry Prefetcher::SignaturePath::SignatureEntry Prefetcher::SignaturePathV2::GlobalHistoryEntry Prefetcher::STeMS::ActiveGenerationTableEntry Prefetcher::Stride::StrideEntry

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

References _set.

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

◆ getWay()

uint32_t ReplaceableEntry::getWay ( ) const
inline

Get way number.

Returns
The way to which this entry belongs.

Definition at line 101 of file replaceable_entry.hh.

References _way.

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

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

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

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

References _set, and _way.

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

Member Data Documentation

◆ _set

uint32_t ReplaceableEntry::_set
protected

Set to which this entry belongs.

Definition at line 59 of file replaceable_entry.hh.

Referenced by getSet(), and setPosition().

◆ _way

uint32_t ReplaceableEntry::_way
protected

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

Definition at line 64 of file replaceable_entry.hh.

Referenced by getWay(), and setPosition().

◆ replacementData

std::shared_ptr<ReplacementData> ReplaceableEntry::replacementData

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

Generated on Wed Sep 30 2020 14:02:30 for gem5 by doxygen 1.8.17