|
gem5
v21.0.1.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 override |
| Checks that a sector block is valid. More... | |
| uint8_t | getNumValid () const |
| Get the number of sub-blocks that have been validated. More... | |
| void | validateSubBlk () |
| Increase the number of valid sub-blocks. More... | |
| void | invalidateSubBlk () |
| Decrease the number of valid sub-blocks. More... | |
| void | setPosition (const uint32_t set, const uint32_t way) override |
| Sets the position of the sub-entries, besides its own. More... | |
| std::string | print () const override |
| Print relevant information for this sector block and its sub-blocks. More... | |
Public Member Functions inherited from TaggedEntry | |
| TaggedEntry () | |
| ~TaggedEntry ()=default | |
| 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... | |
| virtual void | insert (const Addr tag, const bool is_secure) |
| Insert the block by assigning it a tag and marking it valid. More... | |
| virtual void | invalidate () |
| Invalidate the block. More... | |
| std::string | print () const override |
| Prints relevant information about this entry. 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... | |
Public Attributes | |
| std::vector< SectorSubBlk * > | blks |
| List of blocks associated to this sector. More... | |
Public Attributes inherited from ReplaceableEntry | |
| std::shared_ptr< ReplacementPolicy::ReplacementData > | replacementData |
| Replacement data associated to this entry. More... | |
Private Attributes | |
| uint8_t | _validCounter |
| Counter of the number of valid sub-blocks. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from 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 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... | |
A Basic Sector block.
Contains the tag and a list of blocks associated to this sector.
Definition at line 131 of file sector_blk.hh.
| SectorBlk::SectorBlk | ( | ) |
Definition at line 111 of file sector_blk.cc.
|
delete |
|
inline |
Definition at line 144 of file sector_blk.hh.
| uint8_t SectorBlk::getNumValid | ( | ) | const |
Get the number of sub-blocks that have been validated.
Definition at line 124 of file sector_blk.cc.
References _validCounter.
Referenced by SuperBlk::canCoAllocate(), print(), SuperBlk::setCompressionFactor(), and CompressionBlk::setSizeBits().
| void SectorBlk::invalidateSubBlk | ( | ) |
Decrease the number of valid sub-blocks.
Definition at line 136 of file sector_blk.cc.
References _validCounter, and TaggedEntry::invalidate().
Referenced by SectorSubBlk::invalidate().
|
overridevirtual |
Checks that a sector block is valid.
Reimplemented from TaggedEntry.
Definition at line 117 of file sector_blk.cc.
References _validCounter.
Referenced by SectorSubBlk::insert(), SectorTags::insertBlock(), SectorTags::invalidate(), and SectorTags::moveBlock().
|
overridevirtual |
Print relevant information for this sector block and its sub-blocks.
Reimplemented from ReplaceableEntry.
Reimplemented in SuperBlk.
Definition at line 155 of file sector_blk.cc.
References blks, csprintf(), getNumValid(), and TaggedEntry::print().
Referenced by SuperBlk::print().
|
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 146 of file sector_blk.cc.
References blks, and ReplaceableEntry::setPosition().
| void SectorBlk::validateSubBlk | ( | ) |
Increase the number of valid sub-blocks.
Definition at line 130 of file sector_blk.cc.
References _validCounter.
Referenced by SectorSubBlk::setValid().
|
private |
Counter of the number of valid sub-blocks.
The sector is valid if any of its sub-blocks is valid.
Definition at line 138 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 144 of file sector_blk.hh.
Referenced by SuperBlk::calculateCompressionFactor(), CompressedTags::findVictim(), SectorTags::findVictim(), SuperBlk::isCompressed(), print(), setPosition(), CompressedTags::tagsInit(), SectorTags::tagsInit(), and BaseCache::updateCompressionData().