34#ifndef __MEM_CACHE_TAGS_SECTOR_BLK_HH__
35#define __MEM_CACHE_TAGS_SECTOR_BLK_HH__
67 using CacheBlk::operator=;
128 std::string
print()
const override;
183 void setPosition(
const uint32_t
set,
const uint32_t way)
override;
190 std::string
print()
const override;
Definitions of a simple cache block class.
SectorBlk & operator=(const SectorBlk &)=delete
void invalidateSubBlk()
Decrease the number of valid sub-blocks.
std::vector< SectorSubBlk * > blks
List of blocks associated to this sector.
std::string print() const override
Print relevant information for this sector block and its sub-blocks.
bool isValid() const override
Checks that a sector block is valid.
uint8_t getNumValid() const
Get the number of sub-blocks that have been validated.
void setPosition(const uint32_t set, const uint32_t way) override
Sets the position of the sub-entries, besides its own.
uint8_t _validCounter
Counter of the number of valid sub-blocks.
SectorBlk(const SectorBlk &)=delete
void validateSubBlk()
Increase the number of valid sub-blocks.
A sector is composed of sub-blocks, and each sub-block has information regarding its sector and a poi...
SectorSubBlk(const SectorSubBlk &)=delete
int getSectorOffset() const
Get offset of this sub-block within the sector.
SectorBlk * _sectorBlk
Sector block associated to this block.
SectorSubBlk & operator=(SectorSubBlk &&other)=default
Move assignment operator.
void setSectorBlock(SectorBlk *sector_blk)
Set sector block associated to this block.
SectorSubBlk(SectorSubBlk &&)=delete
void setSectorOffset(const int sector_offset)
Set offset of this sub-block within the sector.
Addr getTag() const override
Get tag associated to this block.
void invalidate() override
Invalidate the block and inform sector block.
void insert(const Addr tag, const bool is_secure) override
Insert the block by assigning it a tag and marking it valid.
void setValid() override
Set valid bit and inform sector block.
SectorSubBlk & operator=(const SectorSubBlk &)=delete
std::string print() const override
Pretty-print sector offset and other CacheBlk information.
int _sectorOffset
The offset of this sub-block in the sector.
SectorBlk * getSectorBlock() const
Get sector block associated to this block.
A tagged entry is an entry containing a tag.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.