gem5
v20.1.0.0
|
A sector is composed of sub-blocks, and each sub-block has information regarding its sector and a pointer to its sector tag. More...
#include <sector_blk.hh>
Public Member Functions | |
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... | |
std::string | print () const override |
Pretty-print sector offset and other CacheBlk information. 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... | |
Protected Attributes | |
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... | |
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... | |
A sector is composed of sub-blocks, and each sub-block has information regarding its sector and a pointer to its sector tag.
Definition at line 48 of file sector_blk.hh.
|
inline |
Definition at line 62 of file sector_blk.hh.
|
delete |
|
inline |
Definition at line 65 of file sector_blk.hh.
const SectorBlk * SectorSubBlk::getSectorBlock | ( | ) | const |
Get sector block associated to this block.
Definition at line 49 of file sector_blk.cc.
References _sectorBlk.
Referenced by SectorTags::accessBlock(), CompressedTags::insertBlock(), SectorTags::insertBlock(), SectorTags::invalidate(), SectorTags::regenerateBlkAddr(), and BaseCache::updateCompressionData().
int SectorSubBlk::getSectorOffset | ( | ) | const |
Get offset of this sub-block within the sector.
Definition at line 61 of file sector_blk.cc.
References _sectorOffset.
Referenced by print(), and SectorTags::regenerateBlkAddr().
Addr SectorSubBlk::getTag | ( | ) | const |
Get tag associated to this block.
Definition at line 67 of file sector_blk.cc.
References _sectorBlk, and SectorBlk::getTag().
|
overridevirtual |
Set member variables when a block insertion occurs.
Resets reference count to 1 (the insertion counts as a reference), and touch block if it hadn't been touched previously. Sets the insertion tick to the current tick. Marks the block valid.
tag | Block address tag. |
is_secure | Whether the block is in secure space or not. |
src_requestor_ID | The source requestor ID. |
task_ID | The new task ID. |
Reimplemented from CacheBlk.
Definition at line 94 of file sector_blk.cc.
References _sectorBlk, SectorBlk::getTag(), CacheBlk::insert(), SectorBlk::isSecure(), SectorBlk::isValid(), panic_if, SectorBlk::setTag(), and CacheBlk::tag.
|
overridevirtual |
Invalidate the block and inform sector block.
Reimplemented from CacheBlk.
Definition at line 87 of file sector_blk.cc.
References _sectorBlk, CacheBlk::invalidate(), and SectorBlk::invalidateSubBlk().
|
delete |
|
overridevirtual |
Pretty-print sector offset and other CacheBlk information.
Reimplemented from CacheBlk.
Reimplemented in CompressionBlk.
Definition at line 110 of file sector_blk.cc.
References csprintf(), getSectorOffset(), and CacheBlk::print().
Referenced by CompressionBlk::print().
void SectorSubBlk::setSectorBlock | ( | SectorBlk * | sector_blk | ) |
Set sector block associated to this block.
sector_blk | The sector block pointer. |
Definition at line 42 of file sector_blk.cc.
References _sectorBlk.
Referenced by CompressedTags::tagsInit(), and SectorTags::tagsInit().
void SectorSubBlk::setSectorOffset | ( | const int | sector_offset | ) |
Set offset of this sub-block within the sector.
sector_offset | The block's offset. |
Definition at line 55 of file sector_blk.cc.
References _sectorOffset.
Referenced by CompressedTags::tagsInit(), and SectorTags::tagsInit().
|
overridevirtual |
Set secure bit and inform sector block.
Reimplemented from CacheBlk.
Definition at line 80 of file sector_blk.cc.
References _sectorBlk, SectorBlk::setSecure(), and CacheBlk::setSecure().
|
overridevirtual |
Set valid bit and inform sector block.
Reimplemented from CacheBlk.
Definition at line 73 of file sector_blk.cc.
References _sectorBlk, CacheBlk::setValid(), and SectorBlk::validateSubBlk().
|
protected |
Sector block associated to this block.
Definition at line 54 of file sector_blk.hh.
Referenced by getSectorBlock(), getTag(), insert(), invalidate(), setSectorBlock(), setSecure(), and setValid().
|
protected |
The offset of this sub-block in the sector.
Definition at line 59 of file sector_blk.hh.
Referenced by getSectorOffset(), and setSectorOffset().