gem5 v24.0.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 () | |
virtual | ~ReplaceableEntry ()=default |
virtual void | setPosition (const uint32_t set, const uint32_t way) |
Set both the set and way. | |
uint32_t | getSet () const |
Get set number. | |
uint32_t | getWay () const |
Get way number. | |
virtual std::string | print () const |
Prints relevant information about this entry. | |
Public Attributes | |
std::shared_ptr< replacement_policy::ReplacementData > | replacementData |
Replacement data associated to this entry. | |
Protected Attributes | |
uint32_t | _set |
Set to which this entry belongs. | |
uint32_t | _way |
Way (relative position within the set) to which this entry belongs. | |
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 62 of file replaceable_entry.hh.
|
inline |
Definition at line 76 of file replaceable_entry.hh.
|
virtualdefault |
|
inline |
Get set number.
Definition at line 103 of file replaceable_entry.hh.
References _set.
Referenced by gem5::ruby::CacheMemory::deallocate(), print(), gem5::SetAssociative::regenerateAddr(), gem5::SkewedAssociative::regenerateAddr(), and TEST().
|
inline |
Get way number.
Definition at line 110 of file replaceable_entry.hh.
References _way.
Referenced by gem5::ruby::CacheMemory::deallocate(), print(), gem5::SkewedAssociative::regenerateAddr(), and TEST().
|
inlinevirtual |
Prints relevant information about this entry.
Reimplemented in gem5::CacheBlk, gem5::CacheEntry, gem5::CompressionBlk, gem5::FALRUBlk, gem5::ruby::AbstractCacheEntry, gem5::SectorBlk, gem5::SectorSubBlk, gem5::SuperBlk, and gem5::TaggedEntry.
Definition at line 118 of file replaceable_entry.hh.
References gem5::csprintf(), getSet(), and getWay().
Referenced by gem5::CacheEntry::print(), and 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 92 of file replaceable_entry.hh.
References _set, _way, and gem5::ArmISA::set.
Referenced by gem5::BaseIndexingPolicy::setEntry(), gem5::SectorBlk::setPosition(), gem5::FALRU::tagsInit(), and TEST().
|
protected |
Set to which this entry belongs.
Definition at line 68 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 73 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 83 of file replaceable_entry.hh.
Referenced by gem5::BaseSetAssoc::accessBlock(), gem5::SectorTags::accessBlock(), gem5::ruby::CacheMemory::allocate(), gem5::ruby::CacheMemory::deallocate(), gem5::replacement_policy::BRRIP::getVictim(), gem5::replacement_policy::FIFO::getVictim(), gem5::replacement_policy::LFU::getVictim(), gem5::replacement_policy::LRU::getVictim(), gem5::replacement_policy::MRU::getVictim(), gem5::replacement_policy::SecondChance::getVictim(), gem5::replacement_policy::WeightedLRU::getVictim(), gem5::BaseSetAssoc::insertBlock(), gem5::SectorTags::insertBlock(), gem5::BaseSetAssoc::invalidate(), gem5::SectorTags::invalidate(), gem5::BaseSetAssoc::moveBlock(), gem5::SectorTags::moveBlock(), gem5::ruby::CacheMemory::setMRU(), gem5::ruby::CacheMemory::setMRU(), gem5::ruby::CacheMemory::setMRU(), gem5::BaseSetAssoc::tagsInit(), gem5::CompressedTags::tagsInit(), gem5::SectorTags::tagsInit(), gem5::ruby::CacheMemory::testCacheAccess(), and gem5::ruby::CacheMemory::tryCacheAccess().