gem5  v20.1.0.0
Public Member Functions | Public Attributes | Protected Attributes | Private Attributes | List of all members
SectorBlk Class Reference

A Basic Sector block. More...

#include <sector_blk.hh>

Inheritance diagram for SectorBlk:
ReplaceableEntry SuperBlk

Public Member Functions

 SectorBlk ()
 
 SectorBlk (const SectorBlk &)=delete
 
SectorBlkoperator= (const SectorBlk &)=delete
 
 ~SectorBlk ()
 
bool isValid () const
 Checks that a sector block is valid. More...
 
uint8_t getNumValid () const
 Get the number of sub-blocks that have been validated. More...
 
bool isSecure () const
 Checks that a sector block is secure. More...
 
void setTag (const Addr tag)
 Set tag associated to this block. More...
 
Addr getTag () const
 Get tag associated to this block. More...
 
void validateSubBlk ()
 Increase the number of valid sub-blocks. More...
 
void invalidateSubBlk ()
 Decrease the number of valid sub-blocks. More...
 
void setSecure ()
 Set secure bit. More...
 
void setPosition (const uint32_t set, const uint32_t way) override
 Sets the position of the sub-entries, besides its own. More...
 
- Public Member Functions inherited from ReplaceableEntry
 ReplaceableEntry ()=default
 
virtual ~ReplaceableEntry ()=default
 
uint32_t getSet () const
 Get set number. More...
 
uint32_t getWay () const
 Get way number. More...
 
virtual std::string print () const
 Prints relevant information about this entry. More...
 

Public Attributes

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

Protected Attributes

Addr _tag
 Sector tag value. More...
 
bool _secureBit
 Whether sector blk is in secure-space or not. 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...
 

Private Attributes

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

Detailed Description

A Basic Sector block.

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

Definition at line 143 of file sector_blk.hh.

Constructor & Destructor Documentation

◆ SectorBlk() [1/2]

SectorBlk::SectorBlk ( )

Definition at line 116 of file sector_blk.cc.

◆ SectorBlk() [2/2]

SectorBlk::SectorBlk ( const SectorBlk )
delete

◆ ~SectorBlk()

SectorBlk::~SectorBlk ( )
inline

Definition at line 167 of file sector_blk.hh.

Member Function Documentation

◆ getNumValid()

uint8_t SectorBlk::getNumValid ( ) const

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

Returns
The number of valid sub-blocks.

Definition at line 129 of file sector_blk.cc.

References _validCounter.

◆ getTag()

Addr SectorBlk::getTag ( ) const

Get tag associated to this block.

Returns
The tag value.

Definition at line 148 of file sector_blk.cc.

References _tag.

Referenced by CompressedTags::findVictim(), SectorTags::findVictim(), SectorSubBlk::getTag(), and SectorSubBlk::insert().

◆ invalidateSubBlk()

void SectorBlk::invalidateSubBlk ( )

Decrease the number of valid sub-blocks.

Definition at line 160 of file sector_blk.cc.

References _secureBit, and _validCounter.

Referenced by SectorSubBlk::invalidate().

◆ isSecure()

bool SectorBlk::isSecure ( ) const

Checks that a sector block is secure.

A single secure block suffices to imply that the whole sector is secure, as the insertion proccess asserts that different secure spaces can't coexist in the same sector.

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

Definition at line 135 of file sector_blk.cc.

References _secureBit.

Referenced by CompressedTags::findVictim(), SectorTags::findVictim(), and SectorSubBlk::insert().

◆ isValid()

bool SectorBlk::isValid ( ) const

Checks that a sector block is valid.

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

Definition at line 122 of file sector_blk.cc.

References _validCounter.

Referenced by CompressedTags::findVictim(), SectorTags::findVictim(), SectorSubBlk::insert(), SectorTags::insertBlock(), and SectorTags::invalidate().

◆ operator=()

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

◆ setPosition()

void 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 ReplaceableEntry.

Definition at line 176 of file sector_blk.cc.

References blks, and ReplaceableEntry::setPosition().

◆ setSecure()

void SectorBlk::setSecure ( )

Set secure bit.

Definition at line 170 of file sector_blk.cc.

References _secureBit.

Referenced by SectorSubBlk::setSecure().

◆ setTag()

void SectorBlk::setTag ( const Addr  tag)

Set tag associated to this block.

Parameters
Thetag value.

Definition at line 142 of file sector_blk.cc.

References _tag.

Referenced by SectorSubBlk::insert().

◆ validateSubBlk()

void SectorBlk::validateSubBlk ( )

Increase the number of valid sub-blocks.

Definition at line 154 of file sector_blk.cc.

References _validCounter.

Referenced by SectorSubBlk::setValid().

Member Data Documentation

◆ _secureBit

bool SectorBlk::_secureBit
protected

Whether sector blk is in secure-space or not.

Definition at line 161 of file sector_blk.hh.

Referenced by invalidateSubBlk(), isSecure(), and setSecure().

◆ _tag

Addr SectorBlk::_tag
protected

Sector tag value.

A sector's tag is the tag of all its sub-blocks.

Definition at line 156 of file sector_blk.hh.

Referenced by getTag(), and setTag().

◆ _validCounter

uint8_t 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 150 of file sector_blk.hh.

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

◆ blks

std::vector<SectorSubBlk*> SectorBlk::blks

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

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