gem5
v20.1.0.0
|
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement functionality. More...
#include <replaceable_entry.hh>
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< ReplacementData > | replacementData |
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... | |
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.
Definition at line 53 of file replaceable_entry.hh.
|
default |
|
virtualdefault |
|
inline |
Get set number.
Definition at line 94 of file replaceable_entry.hh.
References _set.
Referenced by CacheMemory::deallocate(), print(), SetAssociative::regenerateAddr(), and SkewedAssociative::regenerateAddr().
|
inline |
Get way number.
Definition at line 101 of file replaceable_entry.hh.
References _way.
Referenced by CacheMemory::deallocate(), print(), and SkewedAssociative::regenerateAddr().
|
inlinevirtual |
Prints relevant information about 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().
|
inlinevirtual |
Set both the set and way.
Should be called only once.
set | The set of this entry. |
way | The way of this entry. |
Reimplemented in SectorBlk.
Definition at line 83 of file replaceable_entry.hh.
Referenced by BaseIndexingPolicy::setEntry(), SectorBlk::setPosition(), and FALRU::tagsInit().
|
protected |
Set to which this entry belongs.
Definition at line 59 of file replaceable_entry.hh.
Referenced by getSet(), and setPosition().
|
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().
std::shared_ptr<ReplacementData> ReplaceableEntry::replacementData |
Replacement data associated to this entry.
It must be instantiated by the replacement policy before being used.
Definition at line 74 of file replaceable_entry.hh.
Referenced by BaseSetAssoc::accessBlock(), SectorTags::accessBlock(), CacheMemory::allocate(), CacheMemory::deallocate(), LRURP::getVictim(), MRURP::getVictim(), FIFORP::getVictim(), LFURP::getVictim(), WeightedLRUPolicy::getVictim(), SecondChanceRP::getVictim(), BRRIPRP::getVictim(), SectorTags::insertBlock(), BaseSetAssoc::insertBlock(), BaseSetAssoc::invalidate(), SectorTags::invalidate(), CacheMemory::setMRU(), CompressedTags::tagsInit(), BaseSetAssoc::tagsInit(), SectorTags::tagsInit(), CacheMemory::testCacheAccess(), and CacheMemory::tryCacheAccess().