gem5  v20.1.0.0
super_blk.hh
Go to the documentation of this file.
1 
35 #ifndef __MEM_CACHE_TAGS_SUPER_BLK_HH__
36 #define __MEM_CACHE_TAGS_SUPER_BLK_HH__
37 
39 
40 class SuperBlk;
41 
49 {
50  private:
54  std::size_t _size;
55 
61 
62  public:
64  CompressionBlk(const CompressionBlk&) = delete;
65  CompressionBlk& operator=(const CompressionBlk&) = delete;
67 
73  bool isCompressed() const;
74 
78  void setCompressed();
79 
83  void setUncompressed();
84 
85  /*
86  * Get size, in bits, of this compressed block's data.
87  *
88  * @return The compressed size.
89  */
90  std::size_t getSizeBits() const;
91 
97  void setSizeBits(const std::size_t size);
98 
105 
111  void setDecompressionLatency(const Cycles lat);
112 
118  std::string print() const override;
119 };
120 
125 class SuperBlk : public SectorBlk
126 {
127  protected:
129  std::size_t blkSize;
130 
131  public:
133  SuperBlk(const SuperBlk&) = delete;
134  SuperBlk& operator=(const SuperBlk&) = delete;
135  ~SuperBlk() {};
136 
144  bool isCompressed(const CompressionBlk* ignored_blk = nullptr) const;
145 
152  bool canCoAllocate(const std::size_t compressed_size) const;
153 
159  void setBlkSize(const std::size_t blk_size);
160 };
161 
162 #endif //__MEM_CACHE_TAGS_SUPER_BLK_HH__
CompressionBlk::operator=
CompressionBlk & operator=(const CompressionBlk &)=delete
SuperBlk::canCoAllocate
bool canCoAllocate(const std::size_t compressed_size) const
Checks whether a superblock can co-allocate given compressed data block.
Definition: super_blk.cc:108
CompressionBlk::_size
std::size_t _size
Set size, in bits, of this compressed block's data.
Definition: super_blk.hh:54
CompressionBlk::getSizeBits
std::size_t getSizeBits() const
Definition: super_blk.cc:63
CompressionBlk::~CompressionBlk
~CompressionBlk()
Definition: super_blk.hh:66
SuperBlk::blkSize
std::size_t blkSize
Block size, in bytes.
Definition: super_blk.hh:129
sector_blk.hh
Copyright (c) 2018 Inria All rights reserved.
CompressionBlk::getDecompressionLatency
Cycles getDecompressionLatency() const
Get number of cycles needed to decompress this block.
Definition: super_blk.cc:75
SuperBlk::setBlkSize
void setBlkSize(const std::size_t blk_size)
Set block size.
Definition: super_blk.cc:117
CompressionBlk::isCompressed
bool isCompressed() const
Check if this block holds compressed data.
Definition: super_blk.cc:45
SuperBlk::SuperBlk
SuperBlk()
Definition: super_blk.hh:132
CompressionBlk::setDecompressionLatency
void setDecompressionLatency(const Cycles lat)
Set number of cycles needed to decompress this block.
Definition: super_blk.cc:81
CompressionBlk::_decompressionLatency
Cycles _decompressionLatency
Number of cycles needed to decompress this block.
Definition: super_blk.hh:60
CompressionBlk::setCompressed
void setCompressed()
Set compression bit.
Definition: super_blk.cc:51
CompressionBlk::setUncompressed
void setUncompressed()
Clear compression bit.
Definition: super_blk.cc:57
SuperBlk
A basic compression superblock.
Definition: super_blk.hh:125
CompressionBlk::setSizeBits
void setSizeBits(const std::size_t size)
Set size, in bits, of this compressed block's data.
Definition: super_blk.cc:69
SuperBlk::isCompressed
bool isCompressed(const CompressionBlk *ignored_blk=nullptr) const
Returns whether the superblock contains compressed blocks or not.
Definition: super_blk.cc:95
SuperBlk::operator=
SuperBlk & operator=(const SuperBlk &)=delete
Cycles
Cycles is a wrapper class for representing cycle counts, i.e.
Definition: types.hh:83
SectorSubBlk
A sector is composed of sub-blocks, and each sub-block has information regarding its sector and a poi...
Definition: sector_blk.hh:48
CompressionBlk::CompressionBlk
CompressionBlk()
Definition: super_blk.cc:39
SuperBlk::~SuperBlk
~SuperBlk()
Definition: super_blk.hh:135
SectorBlk
A Basic Sector block.
Definition: sector_blk.hh:143
CompressionBlk
A superblock is composed of sub-blocks, and each sub-block has information regarding its superblock a...
Definition: super_blk.hh:48
CompressionBlk::print
std::string print() const override
Pretty-print sector offset and other CacheBlk information.
Definition: super_blk.cc:87

Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17