gem5 v24.0.0.0
|
A fully associative cache block. More...
#include <fa_lru.hh>
Public Member Functions | |
FALRUBlk () | |
std::string | print () const override |
Pretty-print inCachesMask and other CacheBlk information. | |
CacheBlk & | operator= (const CacheBlk &)=delete |
virtual CacheBlk & | operator= (CacheBlk &&other) |
Move assignment operator. | |
Public Member Functions inherited from gem5::CacheBlk | |
CacheBlk () | |
CacheBlk (const CacheBlk &)=delete | |
CacheBlk & | operator= (const CacheBlk &)=delete |
CacheBlk (const CacheBlk &&)=delete | |
virtual | ~CacheBlk () |
virtual void | invalidate () override |
Invalidate the block and clear all state. | |
void | setCoherenceBits (unsigned bits) |
Sets the corresponding coherence bits. | |
void | clearCoherenceBits (unsigned bits) |
Clear the corresponding coherence bits. | |
bool | isSet (unsigned bits) const |
Checks the given coherence bits are set. | |
bool | wasPrefetched () const |
Check if this block was the result of a hardware prefetch, yet to be touched. | |
void | clearPrefetched () |
Clear the prefetching bit. | |
void | setPrefetched () |
Marks this blocks as a recently prefetched block. | |
Tick | getWhenReady () const |
Get tick at which block's data will be available for access. | |
void | setWhenReady (const Tick tick) |
Set tick at which block's data will be available for access. | |
uint32_t | getTaskId () const |
Get the task id associated to this block. | |
uint32_t | getSrcRequestorId () const |
Get the requestor id associated to this block. | |
uint64_t | getPartitionId () const |
Getter for _partitionId. | |
unsigned | getRefCount () const |
Get the number of references to this block since insertion. | |
void | increaseRefCount () |
Get the number of references to this block since insertion. | |
Tick | getAge () const |
Get the block's age, that is, the number of ticks since its insertion. | |
void | insert (const Addr tag, const bool is_secure, const int src_requestor_ID, const uint32_t task_ID, const uint64_t partition_id) |
Set member variables when a block insertion occurs. | |
void | trackLoadLocked (PacketPtr pkt) |
Track the fact that a local locked was issued to the block. | |
void | clearLoadLocks (const RequestPtr &req) |
Clear the any load lock that intersect the request, and is from a different context. | |
bool | checkWrite (PacketPtr pkt) |
Handle interaction of load-locked operations and stores. | |
virtual void | insert (const Addr tag, const bool is_secure) |
Insert the block by assigning it a tag and marking it valid. | |
void | insert (const Addr tag) override |
Insert the block by assigning it a tag and marking it valid. | |
Public Member Functions inherited from gem5::TaggedEntry | |
TaggedEntry () | |
~TaggedEntry ()=default | |
bool | isSecure () const |
Check if this block holds data from the secure memory space. | |
virtual bool | matchTag (Addr tag, bool is_secure) const |
Checks if the given tag information corresponds to this entry's. | |
void | invalidate () override |
Invalidate the block. | |
std::string | print () const override |
Prints relevant information about this entry. | |
bool | matchTag (const Addr tag) const override |
Checks if the given tag information corresponds to this entry's. | |
void | insert (const Addr tag) override |
Insert the block by assigning it a tag and marking it valid. | |
Public Member Functions inherited from gem5::CacheEntry | |
CacheEntry ()=default | |
~CacheEntry ()=default | |
virtual bool | isValid () const |
Checks if the entry is valid. | |
virtual Addr | getTag () const |
Get tag associated to this block. | |
Public Member Functions inherited from gem5::ReplaceableEntry | |
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. | |
Public Attributes | |
FALRUBlk * | prev |
The previous block in LRU order. | |
FALRUBlk * | next |
The next block in LRU order. | |
CachesMask | inCachesMask |
A bit mask of the caches that fit this block. | |
Public Attributes inherited from gem5::CacheBlk | |
uint8_t * | data = nullptr |
Contains a copy of the data in this block for easy access. | |
Tick | whenReady = 0 |
Which curTick() will this block be accessible. | |
Public Attributes inherited from gem5::ReplaceableEntry | |
std::shared_ptr< replacement_policy::ReplacementData > | replacementData |
Replacement data associated to this entry. | |
Additional Inherited Members | |
Public Types inherited from gem5::CacheBlk | |
enum | CoherenceBits : unsigned { WritableBit = 0x02 , ReadableBit = 0x04 , DirtyBit = 0x08 , AllBits = 0x0E } |
Cache block's enum listing the supported coherence bits. More... | |
Protected Member Functions inherited from gem5::CacheBlk | |
void | setTaskId (const uint32_t task_id) |
Set the task id value. | |
void | setSrcRequestorId (const uint32_t id) |
Set the source requestor id. | |
void | setPartitionId (const uint64_t partitionId) |
Setter for _partitionId. | |
void | setRefCount (const unsigned count) |
Set the number of references to this block since insertion. | |
void | setTickInserted () |
Set the current tick as this block's insertion tick. | |
Protected Member Functions inherited from gem5::TaggedEntry | |
virtual void | setSecure () |
Set secure bit. | |
Protected Member Functions inherited from gem5::CacheEntry | |
virtual void | setTag (Addr _tag) |
Set tag associated to this block. | |
virtual void | setValid () |
Set valid bit. | |
Protected Attributes inherited from gem5::CacheBlk | |
std::list< Lock > | lockList |
List of thread contexts that have performed a load-locked (LL) on the block since the last store. | |
unsigned | coherence |
The current coherence status of this block. | |
Protected Attributes inherited from gem5::ReplaceableEntry | |
uint32_t | _set |
Set to which this entry belongs. | |
uint32_t | _way |
Way (relative position within the set) to which this entry belongs. | |
Move assignment operator.
This should only be used to move an existing valid entry into an invalid one, not to create a new entry. In the end the valid entry will become invalid, and the invalid, valid. All location related variables will remain the same, that is, an entry cannot move its data, just its metadata contents.
Reimplemented from gem5::CacheBlk.
Definition at line 173 of file cache_blk.hh.
|
overridevirtual |
Pretty-print inCachesMask and other CacheBlk information.
Reimplemented from gem5::CacheBlk.
Definition at line 63 of file fa_lru.cc.
References gem5::csprintf(), inCachesMask, and gem5::CacheBlk::print().
CachesMask gem5::FALRUBlk::inCachesMask |
A bit mask of the caches that fit this block.
Definition at line 97 of file fa_lru.hh.
Referenced by gem5::FALRU::accessBlock(), gem5::FALRU::CacheTracking::check(), gem5::FALRU::CacheTracking::init(), gem5::FALRU::insertBlock(), gem5::FALRU::CacheTracking::moveBlockToHead(), gem5::FALRU::CacheTracking::moveBlockToTail(), print(), and gem5::FALRU::CacheTracking::recordAccess().
FALRUBlk* gem5::FALRUBlk::next |
The next block in LRU order.
Definition at line 94 of file fa_lru.hh.
Referenced by gem5::FALRU::CacheTracking::check(), gem5::FALRU::CacheTracking::init(), gem5::FALRU::CacheTracking::moveBlockToTail(), gem5::FALRU::moveToHead(), gem5::FALRU::moveToTail(), and gem5::FALRU::tagsInit().
FALRUBlk* gem5::FALRUBlk::prev |
The previous block in LRU order.
Definition at line 92 of file fa_lru.hh.
Referenced by gem5::FALRU::CacheTracking::moveBlockToHead(), gem5::FALRU::moveToHead(), gem5::FALRU::moveToTail(), and gem5::FALRU::tagsInit().