gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::SectorBlk Class Reference

A Basic Sector block. More...

#include <sector_blk.hh>

Inheritance diagram for gem5::SectorBlk:
gem5::TaggedEntry gem5::CacheEntry gem5::ReplaceableEntry gem5::SuperBlk

Public Member Functions

 SectorBlk ()
 
 SectorBlk (const SectorBlk &)=delete
 
SectorBlkoperator= (const SectorBlk &)=delete
 
 ~SectorBlk ()
 
bool isValid () const override
 Checks that a sector block is valid.
 
uint8_t getNumValid () const
 Get the number of sub-blocks that have been validated.
 
void validateSubBlk ()
 Increase the number of valid sub-blocks.
 
void invalidateSubBlk ()
 Decrease the number of valid sub-blocks.
 
void setPosition (const uint32_t set, const uint32_t way) override
 Sets the position of the sub-entries, besides its own.
 
std::string print () const override
 Print relevant information for this sector block and its sub-blocks.
 
- 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.
 
virtual void insert (const Addr tag, const bool is_secure)
 Insert the block by assigning it a tag and marking it valid.
 
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 Addr getTag () const
 Get tag associated to this block.
 
- Public Member Functions inherited from gem5::ReplaceableEntry
 ReplaceableEntry ()
 
virtual ~ReplaceableEntry ()=default
 
uint32_t getSet () const
 Get set number.
 
uint32_t getWay () const
 Get way number.
 

Public Attributes

std::vector< SectorSubBlk * > blks
 List of blocks associated to this sector.
 
- Public Attributes inherited from gem5::ReplaceableEntry
std::shared_ptr< replacement_policy::ReplacementDatareplacementData
 Replacement data associated to this entry.
 

Private Attributes

uint8_t _validCounter
 Counter of the number of valid sub-blocks.
 

Additional Inherited Members

- 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::ReplaceableEntry
uint32_t _set
 Set to which this entry belongs.
 
uint32_t _way
 Way (relative position within the set) to which this entry belongs.
 

Detailed Description

A Basic Sector block.

Contains the tag and a list of blocks associated to this sector.

Definition at line 135 of file sector_blk.hh.

Constructor & Destructor Documentation

◆ SectorBlk() [1/2]

gem5::SectorBlk::SectorBlk ( )

Definition at line 114 of file sector_blk.cc.

◆ SectorBlk() [2/2]

gem5::SectorBlk::SectorBlk ( const SectorBlk & )
delete

◆ ~SectorBlk()

gem5::SectorBlk::~SectorBlk ( )
inline

Definition at line 148 of file sector_blk.hh.

Member Function Documentation

◆ getNumValid()

uint8_t gem5::SectorBlk::getNumValid ( ) const

Get the number of sub-blocks that have been validated.

Returns
The number of valid sub-blocks.

Definition at line 127 of file sector_blk.cc.

References _validCounter.

Referenced by gem5::SuperBlk::canCoAllocate(), print(), gem5::SuperBlk::setCompressionFactor(), and gem5::CompressionBlk::setSizeBits().

◆ invalidateSubBlk()

void gem5::SectorBlk::invalidateSubBlk ( )

Decrease the number of valid sub-blocks.

Definition at line 139 of file sector_blk.cc.

References _validCounter, and gem5::TaggedEntry::invalidate().

Referenced by gem5::SectorSubBlk::invalidate().

◆ isValid()

bool gem5::SectorBlk::isValid ( ) const
overridevirtual

Checks that a sector block is valid.

Returns
True if any of the blocks in the sector is valid.

Reimplemented from gem5::CacheEntry.

Definition at line 120 of file sector_blk.cc.

References _validCounter.

Referenced by gem5::SectorSubBlk::insert(), gem5::SectorTags::insertBlock(), gem5::SectorTags::invalidate(), and gem5::SectorTags::moveBlock().

◆ operator=()

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

◆ print()

std::string gem5::SectorBlk::print ( ) const
overridevirtual

Print relevant information for this sector block and its sub-blocks.

Returns
A string with the contents of the sector block.

Reimplemented from gem5::CacheEntry.

Reimplemented in gem5::SuperBlk.

Definition at line 158 of file sector_blk.cc.

References blks, gem5::csprintf(), getNumValid(), and gem5::TaggedEntry::print().

Referenced by gem5::SuperBlk::print().

◆ setPosition()

void gem5::SectorBlk::setPosition ( const uint32_t set,
const uint32_t way )
overridevirtual

Sets the position of the sub-entries, besides its own.

Parameters
setThe set of this entry and sub-entries.
wayThe way of this entry and sub-entries.

Reimplemented from gem5::ReplaceableEntry.

Definition at line 149 of file sector_blk.cc.

References blks, gem5::ArmISA::set, and gem5::ReplaceableEntry::setPosition().

◆ validateSubBlk()

void gem5::SectorBlk::validateSubBlk ( )

Increase the number of valid sub-blocks.

Definition at line 133 of file sector_blk.cc.

References _validCounter.

Referenced by gem5::SectorSubBlk::setValid().

Member Data Documentation

◆ _validCounter

uint8_t gem5::SectorBlk::_validCounter
private

Counter of the number of valid sub-blocks.

The sector is valid if any of its sub-blocks is valid.

Definition at line 142 of file sector_blk.hh.

Referenced by getNumValid(), invalidateSubBlk(), isValid(), and validateSubBlk().

◆ blks


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

Generated on Tue Jun 18 2024 16:24:14 for gem5 by doxygen 1.11.0