|
gem5
v19.0.0.0
|
A basic compression superblock. More...
#include <super_blk.hh>
Public Member Functions | |
| SuperBlk () | |
| SuperBlk (const SuperBlk &)=delete | |
| SuperBlk & | operator= (const SuperBlk &)=delete |
| ~SuperBlk () | |
| bool | isCompressed (const CompressionBlk *ignored_blk=nullptr) const |
| Returns whether the superblock contains compressed blocks or not. More... | |
| bool | canCoAllocate (const std::size_t compressed_size) const |
| Checks whether a superblock can co-allocate given compressed data block. More... | |
| void | setBlkSize (const std::size_t blk_size) |
| Set block size. More... | |
Public Member Functions inherited from SectorBlk | |
| 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... | |
Protected Attributes | |
| std::size_t | blkSize |
| Block size, in bytes. More... | |
Protected Attributes inherited from SectorBlk | |
| 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... | |
Additional Inherited Members | |
Public Attributes inherited from SectorBlk | |
| 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... | |
A basic compression superblock.
Contains the tag and a list of blocks associated to this superblock.
Definition at line 127 of file super_blk.hh.
|
inline |
Definition at line 134 of file super_blk.hh.
References CompressionBlk::operator=().
|
delete |
|
inline |
Definition at line 137 of file super_blk.hh.
References CompressionBlk::isCompressed().
| bool SuperBlk::canCoAllocate | ( | const std::size_t | compressed_size | ) | const |
Checks whether a superblock can co-allocate given compressed data block.
| compressed_size | Size, in bits, of new block to allocate. |
Definition at line 110 of file super_blk.cc.
Referenced by CompressedTags::findVictim(), CompressedTags::insertBlock(), and BaseCache::updateCompressionData().
| bool SuperBlk::isCompressed | ( | const CompressionBlk * | ignored_blk = nullptr | ) | const |
Returns whether the superblock contains compressed blocks or not.
By default, if not blocks are valid, the superblock is compressible.
| ignored_blk | If provided don't consider the given block. |
Definition at line 97 of file super_blk.cc.
References CompressionBlk::isCompressed().
Referenced by CompressedTags::findVictim(), CompressedTags::insertBlock(), and BaseCache::updateCompressionData().
| void SuperBlk::setBlkSize | ( | const std::size_t | blk_size | ) |
Set block size.
Should be called only once, when initializing blocks.
| blk_size | The uncompressed block size. |
Definition at line 119 of file super_blk.cc.
Referenced by CompressedTags::tagsInit().
|
protected |
Block size, in bytes.
Definition at line 131 of file super_blk.hh.