gem5 v24.1.0.1
|
Special instance of CacheBlk for use with tempBlk that deals with its block address regeneration. More...
#include <cache_blk.hh>
Public Member Functions | |
TempCacheBlk (unsigned size, TagExtractor ext) | |
Creates a temporary cache block, with its own storage. | |
TempCacheBlk (const TempCacheBlk &)=delete | |
TempCacheBlk & | operator= (const TempCacheBlk &)=delete |
~TempCacheBlk () | |
void | invalidate () override |
Invalidate the block and clear all state. | |
void | insert (const KeyType &tag) override |
Insert the block by assigning it a tag and marking it valid. | |
Addr | getAddr () const |
Get block's address. | |
CacheBlk & | operator= (const CacheBlk &)=delete |
virtual CacheBlk & | operator= (CacheBlk &&other) |
Move assignment operator. | |
![]() | |
CacheBlk () | |
CacheBlk (const CacheBlk &)=delete | |
CacheBlk & | operator= (const CacheBlk &)=delete |
CacheBlk (const CacheBlk &&)=delete | |
virtual | ~CacheBlk () |
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 KeyType &tag, 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. | |
std::string | print () const override |
Pretty-print tag, set and way, and interpret state bits to readable form including mapping to a MOESI state. | |
bool | checkWrite (PacketPtr pkt) |
Handle interaction of load-locked operations and stores. | |
![]() | |
TaggedEntry () | |
~TaggedEntry ()=default | |
void | registerTagExtractor (TagExtractor ext) |
virtual bool | isValid () const |
Checks if the entry is valid. | |
bool | isSecure () const |
Check if this block holds data from the secure memory space. | |
virtual Addr | getTag () const |
Get tag associated to this block. | |
bool | match (const KeyType &key) const |
Checks if the given tag information corresponds to this entry's. | |
std::string | print () const override |
Prints relevant information about this entry. | |
![]() | |
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. | |
Private Attributes | |
Addr | _addr |
Copy of the block's address, used to regenerate tempBlock's address. | |
Additional Inherited Members | |
![]() | |
enum | CoherenceBits : unsigned { WritableBit = 0x02 , ReadableBit = 0x04 , DirtyBit = 0x08 , AllBits = 0x0E } |
Cache block's enum listing the supported coherence bits. More... | |
![]() | |
using | KeyType = TaggedTypes::KeyType |
using | IndexingPolicy = TaggedIndexingPolicy |
using | TagExtractor = std::function< Addr(Addr)> |
![]() | |
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. | |
![]() | |
std::shared_ptr< replacement_policy::ReplacementData > | replacementData |
Replacement data associated to this entry. | |
![]() | |
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. | |
![]() | |
virtual void | setTag (Addr tag) |
Set tag associated to this block. | |
virtual void | setSecure () |
Set secure bit. | |
void | clearSecure () |
Clear secure bit. | |
virtual void | setValid () |
Set valid bit. | |
![]() | |
std::list< Lock > | lockList |
List of thread contexts that have performed a load-locked (LL) on the block since the last store. | |
unsigned | coherence = 0 |
The current coherence status of this block. | |
![]() | |
TagExtractor | extractTag |
Callback used to extract the tag from the entry. | |
![]() | |
uint32_t | _set |
Set to which this entry belongs. | |
uint32_t | _way |
Way (relative position within the set) to which this entry belongs. | |
Special instance of CacheBlk for use with tempBlk that deals with its block address regeneration.
Definition at line 516 of file cache_blk.hh.
|
inline |
Creates a temporary cache block, with its own storage.
size | The size (in bytes) of this cache block. |
Definition at line 529 of file cache_blk.hh.
References gem5::CacheBlk::data, gem5::ArmISA::ext, and gem5::TaggedEntry::registerTagExtractor().
|
delete |
|
inline |
Definition at line 537 of file cache_blk.hh.
References gem5::CacheBlk::data.
|
inline |
Get block's address.
Definition at line 560 of file cache_blk.hh.
References _addr.
Referenced by gem5::BaseCache::regenerateBlkAddr().
|
inlineoverridevirtual |
Insert the block by assigning it a tag and marking it valid.
Touches block if it hadn't been touched previously.
tag | The tag value. |
Reimplemented from gem5::CacheBlk.
Definition at line 549 of file cache_blk.hh.
References _addr, gem5::TaggedTypes::KeyType::address, and gem5::CacheBlk::insert().
Referenced by gem5::BaseCache::handleFill().
|
inlineoverridevirtual |
Invalidate the block and clear all state.
Reimplemented from gem5::CacheBlk.
Definition at line 542 of file cache_blk.hh.
References _addr, gem5::CacheBlk::invalidate(), and gem5::MaxAddr.
Referenced by gem5::BaseCache::invalidateBlock().
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.
|
delete |
|
private |
Copy of the block's address, used to regenerate tempBlock's address.
Definition at line 522 of file cache_blk.hh.
Referenced by getAddr(), insert(), and invalidate().