|
gem5
v20.1.0.5
|
A superblock is composed of sub-blocks, and each sub-block has information regarding its superblock and a pointer to its superblock tag. More...
#include <super_blk.hh>
Public Member Functions | |
| CompressionBlk () | |
| CompressionBlk (const CompressionBlk &)=delete | |
| CompressionBlk & | operator= (const CompressionBlk &)=delete |
| ~CompressionBlk () | |
| bool | isCompressed () const |
| Check if this block holds compressed data. More... | |
| void | setCompressed () |
| Set compression bit. More... | |
| void | setUncompressed () |
| Clear compression bit. More... | |
| std::size_t | getSizeBits () const |
| void | setSizeBits (const std::size_t size) |
| Set size, in bits, of this compressed block's data. More... | |
| Cycles | getDecompressionLatency () const |
| Get number of cycles needed to decompress this block. More... | |
| void | setDecompressionLatency (const Cycles lat) |
| Set number of cycles needed to decompress this block. More... | |
| std::string | print () const override |
| Pretty-print sector offset and other CacheBlk information. More... | |
Public Member Functions inherited from SectorSubBlk | |
| SectorSubBlk () | |
| SectorSubBlk (const SectorSubBlk &)=delete | |
| SectorSubBlk & | operator= (const SectorSubBlk &)=delete |
| ~SectorSubBlk () | |
| void | setSectorBlock (SectorBlk *sector_blk) |
| Set sector block associated to this block. More... | |
| const SectorBlk * | getSectorBlock () const |
| Get sector block associated to this block. More... | |
| void | setSectorOffset (const int sector_offset) |
| Set offset of this sub-block within the sector. More... | |
| int | getSectorOffset () const |
| Get offset of this sub-block within the sector. More... | |
| Addr | getTag () const |
| Get tag associated to this block. More... | |
| void | setValid () override |
| Set valid bit and inform sector block. More... | |
| void | setSecure () override |
| Set secure bit and inform sector block. More... | |
| void | invalidate () override |
| Invalidate the block and inform sector block. More... | |
| void | insert (const Addr tag, const bool is_secure, const int src_requestor_ID, const uint32_t task_ID) override |
| Set member variables when a block insertion occurs. More... | |
Public Member Functions inherited from CacheBlk | |
| CacheBlk () | |
| CacheBlk (const CacheBlk &)=delete | |
| CacheBlk & | operator= (const CacheBlk &)=delete |
| virtual | ~CacheBlk () |
| bool | isWritable () const |
| Checks the write permissions of this block. More... | |
| bool | isReadable () const |
| Checks the read permissions of this block. More... | |
| bool | isValid () const |
| Checks that a block is valid. More... | |
| bool | isDirty () const |
| Check to see if a block has been written. More... | |
| bool | wasPrefetched () const |
| Check if this block was the result of a hardware prefetch, yet to be touched. More... | |
| bool | isSecure () const |
| Check if this block holds data from the secure memory space. More... | |
| Tick | getWhenReady () const |
| Get tick at which block's data will be available for access. More... | |
| void | setWhenReady (const Tick tick) |
| Set tick at which block's data will be available for access. More... | |
| void | trackLoadLocked (PacketPtr pkt) |
| Track the fact that a local locked was issued to the block. More... | |
| void | clearLoadLocks (const RequestPtr &req) |
| Clear the any load lock that intersect the request, and is from a different context. More... | |
| bool | checkWrite (PacketPtr pkt) |
| Handle interaction of load-locked operations and stores. More... | |
Public Member Functions inherited from ReplaceableEntry | |
| ReplaceableEntry ()=default | |
| virtual | ~ReplaceableEntry ()=default |
| virtual void | setPosition (const uint32_t set, const uint32_t way) |
| Set both the set and way. More... | |
| uint32_t | getSet () const |
| Get set number. More... | |
| uint32_t | getWay () const |
| Get way number. More... | |
Private Attributes | |
| std::size_t | _size |
| Set size, in bits, of this compressed block's data. More... | |
| Cycles | _decompressionLatency |
| Number of cycles needed to decompress this block. More... | |
Additional Inherited Members | |
Public Types inherited from CacheBlk | |
| typedef unsigned | State |
| block state: OR of CacheBlkStatusBit More... | |
Public Attributes inherited from CacheBlk | |
| uint32_t | task_id |
| Task Id associated with this block. More... | |
| Addr | tag |
| Data block tag value. More... | |
| uint8_t * | data |
| Contains a copy of the data in this block for easy access. More... | |
| State | status |
| The current status of this block. More... | |
| Tick | whenReady |
| Which curTick() will this block be accessible. More... | |
| unsigned | refCount |
| Number of references to this block since it was brought in. More... | |
| int | srcRequestorId |
| holds the source requestor ID for this block. More... | |
| Tick | tickInserted |
| Tick on which the block was inserted in the cache. More... | |
Public Attributes inherited from ReplaceableEntry | |
| std::shared_ptr< ReplacementData > | replacementData |
| Replacement data associated to this entry. More... | |
Protected Attributes inherited from SectorSubBlk | |
| SectorBlk * | _sectorBlk |
| Sector block associated to this block. More... | |
| int | _sectorOffset |
| The offset of this sub-block in the sector. More... | |
Protected Attributes inherited from CacheBlk | |
| std::list< Lock > | lockList |
| List of thread contexts that have performed a load-locked (LL) on the block since the last store. 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 superblock is composed of sub-blocks, and each sub-block has information regarding its superblock and a pointer to its superblock tag.
A superblock can be seen as a variation of a sector block, and therefore we use a sector nomenclature.
Definition at line 48 of file super_blk.hh.
| CompressionBlk::CompressionBlk | ( | ) |
Definition at line 39 of file super_blk.cc.
|
delete |
|
inline |
Definition at line 66 of file super_blk.hh.
| Cycles CompressionBlk::getDecompressionLatency | ( | ) | const |
Get number of cycles needed to decompress this block.
Definition at line 75 of file super_blk.cc.
References _decompressionLatency.
Referenced by Compressor::Base::getDecompressionLatency(), and print().
| std::size_t CompressionBlk::getSizeBits | ( | ) | const |
Definition at line 63 of file super_blk.cc.
References _size.
Referenced by CompressedTags::insertBlock(), print(), and BaseCache::updateCompressionData().
| bool CompressionBlk::isCompressed | ( | ) | const |
Check if this block holds compressed data.
Definition at line 45 of file super_blk.cc.
References BlkCompressed, and CacheBlk::status.
Referenced by Compressor::Base::getDecompressionLatency(), print(), and BaseCache::updateCompressionData().
|
delete |
|
overridevirtual |
Pretty-print sector offset and other CacheBlk information.
Reimplemented from SectorSubBlk.
Definition at line 87 of file super_blk.cc.
References csprintf(), getDecompressionLatency(), getSizeBits(), isCompressed(), and SectorSubBlk::print().
Referenced by Compressor::Base::getDecompressionLatency().
| void CompressionBlk::setCompressed | ( | ) |
Set compression bit.
Definition at line 51 of file super_blk.cc.
References BlkCompressed, and CacheBlk::status.
Referenced by CompressedTags::insertBlock(), and BaseCache::updateCompressionData().
| void CompressionBlk::setDecompressionLatency | ( | const Cycles | lat | ) |
Set number of cycles needed to decompress this block.
| Decompression | latency. |
Definition at line 81 of file super_blk.cc.
References _decompressionLatency.
Referenced by BaseCache::updateCompressionData().
| void CompressionBlk::setSizeBits | ( | const std::size_t | size | ) |
Set size, in bits, of this compressed block's data.
| The | compressed size. |
Definition at line 69 of file super_blk.cc.
References _size.
Referenced by BaseCache::updateCompressionData().
| void CompressionBlk::setUncompressed | ( | ) |
Clear compression bit.
Definition at line 57 of file super_blk.cc.
References BlkCompressed, and CacheBlk::status.
Referenced by CompressedTags::insertBlock(), and BaseCache::updateCompressionData().
|
private |
Number of cycles needed to decompress this block.
We store it to avoid doing decompressions.
Definition at line 60 of file super_blk.hh.
Referenced by getDecompressionLatency(), and setDecompressionLatency().
|
private |
Set size, in bits, of this compressed block's data.
Definition at line 54 of file super_blk.hh.
Referenced by getSizeBits(), and setSizeBits().