gem5
v20.1.0.0
|
A Basic Sector block. More...
#include <sector_blk.hh>
Public Member Functions | |
SectorBlk () | |
SectorBlk (const SectorBlk &)=delete | |
SectorBlk & | operator= (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< ReplacementData > | replacementData |
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... | |
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.
SectorBlk::SectorBlk | ( | ) |
Definition at line 116 of file sector_blk.cc.
|
delete |
|
inline |
Definition at line 167 of file sector_blk.hh.
uint8_t SectorBlk::getNumValid | ( | ) | const |
Get the number of sub-blocks that have been validated.
Definition at line 129 of file sector_blk.cc.
References _validCounter.
Addr SectorBlk::getTag | ( | ) | const |
Get tag associated to this block.
Definition at line 148 of file sector_blk.cc.
References _tag.
Referenced by CompressedTags::findVictim(), SectorTags::findVictim(), SectorSubBlk::getTag(), and SectorSubBlk::insert().
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().
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.
Definition at line 135 of file sector_blk.cc.
References _secureBit.
Referenced by CompressedTags::findVictim(), SectorTags::findVictim(), and SectorSubBlk::insert().
bool SectorBlk::isValid | ( | ) | const |
Checks that a sector block 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().
|
overridevirtual |
Sets the position of the sub-entries, besides its own.
set | The set of this entry and sub-entries. |
way | The way of this entry and sub-entries. |
Reimplemented from ReplaceableEntry.
Definition at line 176 of file sector_blk.cc.
References blks, and ReplaceableEntry::setPosition().
void SectorBlk::setSecure | ( | ) |
Set secure bit.
Definition at line 170 of file sector_blk.cc.
References _secureBit.
Referenced by SectorSubBlk::setSecure().
void SectorBlk::setTag | ( | const Addr | tag | ) |
Set tag associated to this block.
The | tag value. |
Definition at line 142 of file sector_blk.cc.
References _tag.
Referenced by SectorSubBlk::insert().
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().
|
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().
|
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.
|
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().
std::vector<SectorSubBlk*> SectorBlk::blks |
List of blocks associated to this sector.
Definition at line 167 of file sector_blk.hh.
Referenced by SuperBlk::canCoAllocate(), CompressedTags::findVictim(), SectorTags::findVictim(), SuperBlk::isCompressed(), setPosition(), CompressedTags::tagsInit(), SectorTags::tagsInit(), and BaseCache::updateCompressionData().