|
gem5 [DEVELOP-FOR-25.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. | |
| 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 | |
| void | registerTagExtractor (TagExtractor ext) |
| bool | isSecure () const |
| Check if this block holds data from the secure memory space. | |
| virtual Addr | getTag () const |
| Get tag associated to this block. | |
| bool | match (const KeyType &key) const |
| Checks if the given tag information corresponds to this entry's. | |
| virtual void | insert (const KeyType &key) |
| Insert the block by assigning it a tag and marking it valid. | |
| virtual void | invalidate () |
| Invalidate the block. | |
| std::string | print () const override |
| Prints relevant information about this entry. | |
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::ReplacementData > | replacementData |
| Replacement data associated to this entry. | |
Private Attributes | |
| uint8_t | _validCounter |
| Counter of the number of valid sub-blocks. | |
Additional Inherited Members | |
Public Types inherited from gem5::TaggedEntry | |
| using | KeyType = TaggedTypes::KeyType |
| using | IndexingPolicy = TaggedIndexingPolicy |
| using | TagExtractor = std::function<Addr(Addr)> |
Protected Member Functions inherited from gem5::TaggedEntry | |
| virtual void | setTag (Addr tag) |
| Set tag associated to this block. | |
| virtual void | setSecure () |
| Set secure bit. | |
| void | clearSecure () |
| Clear secure bit. | |
| virtual void | setValid () |
| Set valid bit. | |
Protected Attributes inherited from gem5::TaggedEntry | |
| TagExtractor | extractTag |
| Callback used to extract the tag from the entry. | |
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. | |
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.
| gem5::SectorBlk::SectorBlk | ( | ) |
Definition at line 114 of file sector_blk.cc.
References _validCounter, and gem5::TaggedEntry::TaggedEntry().
Referenced by operator=(), SectorBlk(), and gem5::SuperBlk::SuperBlk().
|
delete |
References SectorBlk().
|
inline |
Definition at line 148 of file sector_blk.hh.
| uint8_t gem5::SectorBlk::getNumValid | ( | ) | const |
Get the number of sub-blocks that have been validated.
Definition at line 127 of file sector_blk.cc.
References _validCounter.
Referenced by gem5::SuperBlk::canCoAllocate(), print(), gem5::SuperBlk::setCompressionFactor(), and gem5::CompressionBlk::setSizeBits().
| 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().
|
overridevirtual |
Checks that a sector block is valid.
Reimplemented from gem5::TaggedEntry.
Definition at line 120 of file sector_blk.cc.
References _validCounter.
Referenced by gem5::SectorTags::insertBlock(), gem5::SectorTags::invalidate(), and gem5::SectorTags::moveBlock().
References SectorBlk().
|
overridevirtual |
Print relevant information for this sector block and its sub-blocks.
Reimplemented from gem5::ReplaceableEntry.
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().
|
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 gem5::ReplaceableEntry.
Definition at line 149 of file sector_blk.cc.
References blks, gem5::ArmISA::set, and gem5::ReplaceableEntry::setPosition().
| void gem5::SectorBlk::validateSubBlk | ( | ) |
Increase the number of valid sub-blocks.
Definition at line 133 of file sector_blk.cc.
References _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(), SectorBlk(), and validateSubBlk().
| std::vector<SectorSubBlk*> gem5::SectorBlk::blks |
List of blocks associated to this sector.
Definition at line 151 of file sector_blk.hh.
Referenced by gem5::SuperBlk::calculateCompressionFactor(), gem5::CompressedTags::findVictim(), gem5::SectorTags::findVictim(), gem5::SuperBlk::isCompressed(), print(), setPosition(), gem5::CompressedTags::tagsInit(), gem5::SectorTags::tagsInit(), and gem5::BaseCache::updateCompressionData().