gem5  v21.1.0.2
Public Member Functions | Private Attributes | List of all members
gem5::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 gem5::TempCacheBlk:
gem5::CacheBlk gem5::TaggedEntry gem5::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) override
 Insert the block by assigning it a tag and marking it valid. More...
 
Addr getAddr () const
 Get block's address. More...
 
- Public Member Functions inherited from gem5::CacheBlk
 CacheBlk ()
 
 CacheBlk (const CacheBlk &)=delete
 
CacheBlkoperator= (const CacheBlk &)=delete
 
 CacheBlk (const CacheBlk &&)=delete
 
virtual CacheBlkoperator= (CacheBlk &&other)
 Move assignment operator. More...
 
virtual ~CacheBlk ()
 
void setCoherenceBits (unsigned bits)
 Sets the corresponding coherence bits. More...
 
void clearCoherenceBits (unsigned bits)
 Clear the corresponding coherence bits. More...
 
bool isSet (unsigned bits) const
 Checks the given coherence bits are set. More...
 
bool wasPrefetched () const
 Check if this block was the result of a hardware prefetch, yet to be touched. More...
 
void clearPrefetched ()
 Clear the prefetching bit. More...
 
void setPrefetched ()
 Marks this blocks as a recently prefetched block. 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...
 
uint32_t getTaskId () const
 Get the task id associated to this block. More...
 
uint32_t getSrcRequestorId () const
 Get the requestor id associated to this block. More...
 
unsigned getRefCount () const
 Get the number of references to this block since insertion. More...
 
void increaseRefCount ()
 Get the number of references to this block since insertion. More...
 
Tick getAge () const
 Get the block's age, that is, the number of ticks since its insertion. More...
 
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...
 
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...
 
virtual void insert (const Addr tag, const bool is_secure)
 Insert the block by assigning it a tag and marking it valid. More...
 
- Public Member Functions inherited from gem5::TaggedEntry
 TaggedEntry ()
 
 ~TaggedEntry ()=default
 
virtual bool isValid () const
 Checks if the entry is valid. More...
 
bool isSecure () const
 Check if this block holds data from the secure memory space. More...
 
virtual Addr getTag () const
 Get tag associated to this block. More...
 
virtual bool matchTag (Addr tag, bool is_secure) const
 Checks if the given tag information corresponds to this entry's. More...
 
std::string print () const override
 Prints relevant information about this entry. More...
 
- Public Member Functions inherited from gem5::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 gem5::CacheBlk
enum  CoherenceBits : unsigned { WritableBit = 0x02, ReadableBit = 0x04, DirtyBit = 0x08, AllBits = 0x0E }
 Cache block's enum listing the supported coherence bits. More...
 
- Public Attributes inherited from gem5::CacheBlk
uint8_t * data
 Contains a copy of the data in this block for easy access. More...
 
Tick whenReady
 Which curTick() will this block be accessible. More...
 
- Public Attributes inherited from gem5::ReplaceableEntry
std::shared_ptr< replacement_policy::ReplacementDatareplacementData
 Replacement data associated to this entry. More...
 
- Protected Member Functions inherited from gem5::CacheBlk
void setTaskId (const uint32_t task_id)
 Set the task id value. More...
 
void setSrcRequestorId (const uint32_t id)
 Set the source requestor id. More...
 
void setRefCount (const unsigned count)
 Set the number of references to this block since insertion. More...
 
void setTickInserted ()
 Set the current tick as this block's insertion tick. More...
 
- Protected Member Functions inherited from gem5::TaggedEntry
virtual void setTag (Addr tag)
 Set tag associated to this block. More...
 
virtual void setSecure ()
 Set secure bit. More...
 
virtual void setValid ()
 Set valid bit. More...
 
- Protected Attributes inherited from gem5::CacheBlk
std::list< LocklockList
 List of thread contexts that have performed a load-locked (LL) on the block since the last store. More...
 
unsigned coherence
 The current coherence status of this block. More...
 
- Protected Attributes inherited from gem5::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 500 of file cache_blk.hh.

Constructor & Destructor Documentation

◆ TempCacheBlk() [1/2]

gem5::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 513 of file cache_blk.hh.

References gem5::CacheBlk::data.

◆ TempCacheBlk() [2/2]

gem5::TempCacheBlk::TempCacheBlk ( const TempCacheBlk )
delete

◆ ~TempCacheBlk()

gem5::TempCacheBlk::~TempCacheBlk ( )
inline

Definition at line 519 of file cache_blk.hh.

References gem5::CacheBlk::data.

Member Function Documentation

◆ getAddr()

Addr gem5::TempCacheBlk::getAddr ( ) const
inline

Get block's address.

Returns
addr Address value.

Definition at line 542 of file cache_blk.hh.

References _addr.

Referenced by gem5::BaseCache::regenerateBlkAddr().

◆ insert()

void gem5::TempCacheBlk::insert ( const Addr  tag,
const bool  is_secure 
)
inlineoverridevirtual

Insert the block by assigning it a tag and marking it valid.

Touches block if it hadn't been touched previously.

Parameters
tagThe tag value.

Reimplemented from gem5::TaggedEntry.

Definition at line 531 of file cache_blk.hh.

References _addr, gem5::X86ISA::addr, and gem5::CacheBlk::insert().

Referenced by gem5::BaseCache::handleFill().

◆ invalidate()

void gem5::TempCacheBlk::invalidate ( )
inlineoverridevirtual

Invalidate the block and clear all state.

Reimplemented from gem5::CacheBlk.

Definition at line 524 of file cache_blk.hh.

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

Referenced by gem5::BaseCache::invalidateBlock().

◆ operator=()

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

Member Data Documentation

◆ _addr

Addr gem5::TempCacheBlk::_addr
private

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

Definition at line 506 of file cache_blk.hh.

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


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

Generated on Tue Sep 21 2021 12:28:15 for gem5 by doxygen 1.8.17