gem5  v20.1.0.0
Public Member Functions | Private Attributes | List of all members
TempCacheBlk Class Referencefinal

Special instance of CacheBlk for use with tempBlk that deals with its block address regeneration. More...

#include <cache_blk.hh>

Inheritance diagram for TempCacheBlk:
CacheBlk ReplaceableEntry

Public Member Functions

 TempCacheBlk (unsigned size)
 Creates a temporary cache block, with its own storage. More...
 
 TempCacheBlk (const TempCacheBlk &)=delete
 
TempCacheBlkoperator= (const TempCacheBlk &)=delete
 
 ~TempCacheBlk ()
 
void invalidate () override
 Invalidate the block and clear all state. More...
 
void insert (const Addr addr, const bool is_secure, const int src_requestor_ID=0, const uint32_t task_ID=0) override
 Set member variables when a block insertion occurs. More...
 
Addr getAddr () const
 Get block's address. 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...
 
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...
 
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...
 
std::string print () const override
 Pretty-print tag, set and way, and interpret state bits to readable form including mapping to a MOESI state. 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...
 

Private Attributes

Addr _addr
 Copy of the block's address, used to regenerate tempBlock's address. More...
 

Additional Inherited Members

- Public Types inherited from CacheBlk
typedef unsigned State
 block state: OR of CacheBlkStatusBit 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...
 
- 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

Special instance of CacheBlk for use with tempBlk that deals with its block address regeneration.

See also
Cache

Definition at line 441 of file cache_blk.hh.

Constructor & Destructor Documentation

◆ TempCacheBlk() [1/2]

TempCacheBlk::TempCacheBlk ( unsigned  size)
inline

Creates a temporary cache block, with its own storage.

Parameters
sizeThe size (in bytes) of this cache block.

Definition at line 454 of file cache_blk.hh.

References CacheBlk::data.

◆ TempCacheBlk() [2/2]

TempCacheBlk::TempCacheBlk ( const TempCacheBlk )
delete

◆ ~TempCacheBlk()

TempCacheBlk::~TempCacheBlk ( )
inline

Definition at line 460 of file cache_blk.hh.

References CacheBlk::data.

Member Function Documentation

◆ getAddr()

Addr TempCacheBlk::getAddr ( ) const
inline

Get block's address.

Returns
addr Address value.

Definition at line 495 of file cache_blk.hh.

References _addr.

Referenced by BaseCache::regenerateBlkAddr().

◆ insert()

void TempCacheBlk::insert ( const Addr  tag,
const bool  is_secure,
const int  src_requestor_ID = 0,
const uint32_t  task_ID = 0 
)
inlineoverridevirtual

Set member variables when a block insertion occurs.

Resets reference count to 1 (the insertion counts as a reference), and touch block if it hadn't been touched previously. Sets the insertion tick to the current tick. Marks the block valid.

Parameters
tagBlock address tag.
is_secureWhether the block is in secure space or not.
src_requestor_IDThe source requestor ID.
task_IDThe new task ID.

Reimplemented from CacheBlk.

Definition at line 471 of file cache_blk.hh.

References _addr, addr, CacheBlk::setSecure(), CacheBlk::setValid(), and CacheBlk::status.

Referenced by BaseCache::handleFill().

◆ invalidate()

void TempCacheBlk::invalidate ( )
inlineoverridevirtual

Invalidate the block and clear all state.

Reimplemented from CacheBlk.

Definition at line 465 of file cache_blk.hh.

References _addr, CacheBlk::invalidate(), and MaxAddr.

Referenced by BaseCache::invalidateBlock().

◆ operator=()

TempCacheBlk& TempCacheBlk::operator= ( const TempCacheBlk )
delete

Member Data Documentation

◆ _addr

Addr TempCacheBlk::_addr
private

Copy of the block's address, used to regenerate tempBlock's address.

Definition at line 447 of file cache_blk.hh.

Referenced by getAddr(), insert(), and invalidate().


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

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