Go to the documentation of this file.
37 #include "debug/CacheComp.hh"
42 #include "params/CompressedTags.hh"
60 unsigned blk_index = 0;
61 for (
unsigned superblock_index = 0; superblock_index <
numSectors;
81 blk = &
blks[blk_index];
106 const std::size_t compressed_size,
116 SuperBlk* victim_superblock =
nullptr;
117 bool is_co_allocation =
false;
119 for (
const auto& entry : superblock_entries){
121 if (superblock->
matchTag(tag, is_secure) &&
126 victim_superblock = superblock;
127 is_co_allocation =
true;
134 if (victim_superblock ==
nullptr){
136 victim_superblock =
static_cast<SuperBlk*
>(
140 for (
const auto& blk : victim_superblock->
blks){
141 if (blk->isValid()) {
142 evict_blks.push_back(blk);
152 if (is_co_allocation){
156 DPRINTF(CacheComp,
"Co-Allocation: offset %d of %s\n",
offset,
157 victim_superblock->
print());
void setSectorBlock(SectorBlk *sector_blk)
Set sector block associated to this block.
void setSectorOffset(const int sector_offset)
Set offset of this sub-block within the sector.
virtual bool matchTag(Addr tag, bool is_secure) const
Checks if the given tag information corresponds to this entry's.
std::vector< SectorSubBlk * > blks
List of blocks associated to this sector.
virtual std::shared_ptr< ReplacementData > instantiateEntry()=0
Instantiate a replacement data entry.
virtual std::vector< ReplaceableEntry * > getPossibleEntries(const Addr addr) const =0
Find all possible entries for insertion and replacement of an address.
A basic compression superblock.
virtual ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const =0
Find replacement victim among candidates.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint8_t * data
Contains a copy of the data in this block for easy access.
bool canCoAllocate(const std::size_t compressed_size) const
Checks whether a superblock can co-allocate given compressed data block.
A superblock is composed of sub-blocks, and each sub-block has information regarding its superblock a...
A sector is composed of sub-blocks, and each sub-block has information regarding its sector and a poi...
std::string print() const override
Print relevant information for this sector block and its sub-blocks.
void setEntry(ReplaceableEntry *entry, const uint64_t index)
Associate a pointer to an entry to its physical counterpart.
void setBlkSize(const std::size_t blk_size)
Set block size.
std::shared_ptr< replacement_policy::ReplacementData > replacementData
Replacement data associated to this entry.
bool isCompressed(const CompressionBlk *ignored_blk=nullptr) const
Returns whether the superblock contains compressed blocks or not.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
virtual bool isValid() const
Checks if the entry is valid.
Generated on Sun Jul 30 2023 01:56:57 for gem5 by doxygen 1.8.17