Go to the documentation of this file.
44 assert(sector_blk !=
nullptr);
149 for (
auto& blk :
blks) {
150 blk->setPosition(set, way);
157 std::string sub_blk_print;
158 for (
const auto& sub_blk :
blks) {
159 if (sub_blk->isValid()) {
160 sub_blk_print +=
"\t[" + sub_blk->print() +
"]\n";
163 return csprintf(
"%s valid sub-blks (%d):\n%s",
std::string print() const override
Prints relevant information about this entry.
virtual void insert(const Addr tag, const bool is_secure)
Insert the block by assigning it a tag and marking it valid.
std::string print() const override
Print relevant information for this sector block and its sub-blocks.
Copyright (c) 2020 Inria All rights reserved.
uint8_t _validCounter
Counter of the number of valid sub-blocks.
void invalidate() override
Invalidate the block and inform sector block.
virtual bool matchTag(Addr tag, bool is_secure) const
Checks if the given tag information corresponds to this entry's.
SectorBlk * _sectorBlk
Sector block associated to this block.
void insert(const Addr tag, const bool is_secure) override
Insert the block by assigning it a tag and marking it valid.
std::vector< SectorSubBlk * > blks
List of blocks associated to this sector.
virtual void invalidate() override
Invalidate the block and clear all state.
void setSectorBlock(SectorBlk *sector_blk)
Set sector block associated to this block.
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.
virtual void setPosition(const uint32_t set, const uint32_t way)
Set both the set and way.
void setValid() override
Set valid bit and inform sector block.
Copyright (c) 2018, 2020 Inria All rights reserved.
std::string print() const override
Pretty-print tag, set and way, and interpret state bits to readable form including mapping to a MOESI...
virtual bool isValid() const
Checks if the entry is valid.
Addr getTag() const override
Get tag associated to this block.
uint8_t getNumValid() const
Get the number of sub-blocks that have been validated.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
SectorBlk * getSectorBlock() const
Get sector block associated to this block.
int _sectorOffset
The offset of this sub-block in the sector.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
void validateSubBlk()
Increase the number of valid sub-blocks.
std::string print() const override
Pretty-print sector offset and other CacheBlk information.
void insert(const Addr tag, const bool is_secure, const int src_requestor_ID, const uint32_t task_ID)
Set member variables when a block insertion occurs.
virtual void invalidate()
Invalidate the block.
void setSectorOffset(const int sector_offset)
Set offset of this sub-block within the sector.
virtual Addr getTag() const
Get tag associated to this block.
int getSectorOffset() const
Get offset of this sub-block within the sector.
bool isValid() const override
Checks that a sector block is valid.
std::string csprintf(const char *format, const Args &...args)
virtual void setValid()
Set valid bit.
Generated on Tue Jun 22 2021 15:28:29 for gem5 by doxygen 1.8.17