gem5
v21.1.0.1
|
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< replacement_policy::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 63 of file replaceable_entry.hh.
|
default |
|
virtualdefault |
|
inline |
Get set number.
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().
|
inline |
Get way number.
Definition at line 111 of file replaceable_entry.hh.
References _way.
Referenced by gem5::ruby::CacheMemory::deallocate(), print(), and gem5::SkewedAssociative::regenerateAddr().
|
inlinevirtual |
Prints relevant information about 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().
|
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 gem5::SectorBlk.
Definition at line 93 of file replaceable_entry.hh.
Referenced by gem5::BaseIndexingPolicy::setEntry(), gem5::SectorBlk::setPosition(), and gem5::FALRU::tagsInit().
|
protected |
Set to which this entry belongs.
Definition at line 69 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 74 of file replaceable_entry.hh.
Referenced by getWay(), and setPosition().
std::shared_ptr<replacement_policy::ReplacementData> gem5::ReplaceableEntry::replacementData |
Replacement data associated to this entry.
It must be instantiated by the replacement policy before being used.
Definition at line 84 of file replaceable_entry.hh.
Referenced by gem5::BaseSetAssoc::accessBlock(), gem5::SectorTags::accessBlock(), gem5::ruby::CacheMemory::allocate(), gem5::ruby::CacheMemory::deallocate(), gem5::replacement_policy::WeightedLRU::getVictim(), gem5::replacement_policy::LRU::getVictim(), gem5::replacement_policy::FIFO::getVictim(), gem5::replacement_policy::LFU::getVictim(), gem5::replacement_policy::MRU::getVictim(), gem5::replacement_policy::Dueling::getVictim(), gem5::replacement_policy::SecondChance::getVictim(), gem5::replacement_policy::BRRIP::getVictim(), gem5::SectorTags::insertBlock(), gem5::BaseSetAssoc::insertBlock(), gem5::BaseSetAssoc::invalidate(), gem5::SectorTags::invalidate(), gem5::SectorTags::moveBlock(), gem5::BaseSetAssoc::moveBlock(), gem5::ruby::CacheMemory::setMRU(), gem5::CompressedTags::tagsInit(), gem5::BaseSetAssoc::tagsInit(), gem5::SectorTags::tagsInit(), gem5::ruby::CacheMemory::testCacheAccess(), and gem5::ruby::CacheMemory::tryCacheAccess().