44 assert(sector_blk !=
nullptr);
95 const int src_master_ID,
const uint32_t task_ID)
101 "Overwriting valid sector!");
179 for (
auto& blk :
blks) {
180 blk->setPosition(
set, way);
const SectorBlk * getSectorBlock() const
Get sector block associated to this block.
std::string print() const override
Pretty-print sector offset and other CacheBlk information.
void setValid() override
Set valid bit and inform sector block.
int _sectorOffset
The offset of this sub-block in the sector.
virtual void setValid()
Set valid bit.
std::string print() const override
Pretty-print tag, set and way, and interpret state bits to readable form including mapping to a MOESI...
Addr tag
Data block tag value.
std::vector< SectorSubBlk * > blks
List of blocks associated to this sector.
Addr _tag
Sector tag value.
bool isValid() const
Checks that a sector block is valid.
bool _secureBit
Whether sector blk is in secure-space or not.
void validateSubBlk()
Increase the number of valid sub-blocks.
virtual void setSecure()
Set secure bit.
void invalidate() override
Invalidate the block and inform sector block.
virtual void setPosition(const uint32_t set, const uint32_t way)
Set both the set and way.
uint8_t getNumValid() const
Get the number of sub-blocks that have been validated.
std::string csprintf(const char *format, const Args &...args)
Addr getTag() const
Get tag associated to this block.
virtual void insert(const Addr tag, const bool is_secure, const int src_master_ID, const uint32_t task_ID)
Set member variables when a block insertion occurs.
void setSecure()
Set secure bit.
Copyright (c) 2018 Inria All rights reserved.
SectorBlk * _sectorBlk
Sector block associated to this block.
void setSectorBlock(SectorBlk *sector_blk)
Set sector block associated to this block.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void setTag(const Addr tag)
Set tag associated to this block.
void setSectorOffset(const int sector_offset)
Set offset of this sub-block within the sector.
int getSectorOffset() const
Get offset of this sub-block within the sector.
void setPosition(const uint32_t set, const uint32_t way) override
Sets the position of the sub-entries, besides its own.
void invalidateSubBlk()
Decrease the number of valid sub-blocks.
bool isSecure() const
Checks that a sector block is secure.
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
uint8_t _validCounter
Counter of the number of valid sub-blocks.
void insert(const Addr tag, const bool is_secure, const int src_master_ID, const uint32_t task_ID) override
Set member variables when a block insertion occurs.
virtual void invalidate()
Invalidate the block and clear all state.
void setSecure() override
Set secure bit and inform sector block.
Addr getTag() const
Get tag associated to this block.