gem5  v20.1.0.0
Public Member Functions | Public Attributes | List of all members
FALRUBlk Class Reference

A fully associative cache block. More...

#include <fa_lru.hh>

Inheritance diagram for FALRUBlk:
CacheBlk ReplaceableEntry

Public Member Functions

 FALRUBlk ()
 
std::string print () const override
 Pretty-print inCachesMask and other CacheBlk information. More...
 
- Public Member Functions inherited from CacheBlk
 CacheBlk ()
 
 CacheBlk (const CacheBlk &)=delete
 
CacheBlkoperator= (const CacheBlk &)=delete
 
virtual ~CacheBlk ()
 
bool isWritable () const
 Checks the write permissions of this block. More...
 
bool isReadable () const
 Checks the read permissions of this block. More...
 
bool isValid () const
 Checks that a block is valid. More...
 
virtual void invalidate ()
 Invalidate the block and clear all state. More...
 
bool isDirty () const
 Check to see if a block has been written. More...
 
bool wasPrefetched () const
 Check if this block was the result of a hardware prefetch, yet to be touched. More...
 
bool isSecure () const
 Check if this block holds data from the secure memory space. More...
 
virtual void setValid ()
 Set valid bit. More...
 
virtual void setSecure ()
 Set secure bit. More...
 
Tick getWhenReady () const
 Get tick at which block's data will be available for access. More...
 
void setWhenReady (const Tick tick)
 Set tick at which block's data will be available for access. More...
 
virtual void insert (const Addr tag, const bool is_secure, const int src_requestor_ID, const uint32_t task_ID)
 Set member variables when a block insertion occurs. More...
 
void trackLoadLocked (PacketPtr pkt)
 Track the fact that a local locked was issued to the block. More...
 
void clearLoadLocks (const RequestPtr &req)
 Clear the any load lock that intersect the request, and is from a different context. More...
 
bool checkWrite (PacketPtr pkt)
 Handle interaction of load-locked operations and stores. More...
 
- Public Member Functions inherited from ReplaceableEntry
 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...
 

Public Attributes

FALRUBlkprev
 The previous block in LRU order. More...
 
FALRUBlknext
 The next block in LRU order. More...
 
CachesMask inCachesMask
 A bit mask of the caches that fit this block. More...
 
- Public Attributes inherited from CacheBlk
uint32_t task_id
 Task Id associated with this block. More...
 
Addr tag
 Data block tag value. More...
 
uint8_t * data
 Contains a copy of the data in this block for easy access. More...
 
State status
 The current status of this block. More...
 
Tick whenReady
 Which curTick() will this block be accessible. More...
 
unsigned refCount
 Number of references to this block since it was brought in. More...
 
int srcRequestorId
 holds the source requestor ID for this block. More...
 
Tick tickInserted
 Tick on which the block was inserted in the cache. More...
 
- Public Attributes inherited from ReplaceableEntry
std::shared_ptr< ReplacementDatareplacementData
 Replacement data associated to this entry. More...
 

Additional Inherited Members

- Public Types inherited from CacheBlk
typedef unsigned State
 block state: OR of CacheBlkStatusBit More...
 
- Protected Attributes inherited from CacheBlk
std::list< LocklockList
 List of thread contexts that have performed a load-locked (LL) on the block since the last store. More...
 
- Protected Attributes inherited from ReplaceableEntry
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...
 

Detailed Description

A fully associative cache block.

Definition at line 81 of file fa_lru.hh.

Constructor & Destructor Documentation

◆ FALRUBlk()

FALRUBlk::FALRUBlk ( )
inline

Definition at line 84 of file fa_lru.hh.

Member Function Documentation

◆ print()

std::string FALRUBlk::print ( ) const
overridevirtual

Pretty-print inCachesMask and other CacheBlk information.

Returns
string with basic state information

Reimplemented from CacheBlk.

Definition at line 58 of file fa_lru.cc.

References csprintf(), inCachesMask, and CacheBlk::print().

Member Data Documentation

◆ inCachesMask

CachesMask FALRUBlk::inCachesMask

◆ next

FALRUBlk* FALRUBlk::next

◆ prev

FALRUBlk* FALRUBlk::prev

The previous block in LRU order.

Definition at line 87 of file fa_lru.hh.

Referenced by FALRU::CacheTracking::moveBlockToHead(), FALRU::moveToHead(), FALRU::moveToTail(), and FALRU::tagsInit().


The documentation for this class was generated from the following files:

Generated on Wed Sep 30 2020 14:02:24 for gem5 by doxygen 1.8.17