gem5  v21.2.0.0
compressed_tags.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 Inria
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met: redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer;
9  * redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution;
12  * neither the name of the copyright holders nor the names of its
13  * contributors may be used to endorse or promote products derived from
14  * this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
34 #ifndef __MEM_CACHE_TAGS_COMPRESSED_TAGS_HH__
35 #define __MEM_CACHE_TAGS_COMPRESSED_TAGS_HH__
36 
37 #include <vector>
38 
41 
42 namespace gem5
43 {
44 
45 class BaseCache;
46 class CacheBlk;
47 struct CompressedTagsParams;
48 
70 class CompressedTags : public SectorTags
71 {
72  private:
77 
78  public:
80  typedef CompressedTagsParams Params;
81 
85  CompressedTags(const Params &p);
86 
90  virtual ~CompressedTags() {};
91 
95  void tagsInit() override;
96 
107  CacheBlk* findVictim(Addr addr, const bool is_secure,
108  const std::size_t compressed_size,
109  std::vector<CacheBlk*>& evict_blks) override;
110 
119  void forEachBlk(std::function<void(CacheBlk &)> visitor) override;
120 
130  bool anyBlk(std::function<bool(CacheBlk &)> visitor) override;
131 };
132 
133 } // namespace gem5
134 
135 #endif //__MEM_CACHE_TAGS_COMPRESSED_TAGS_HH__
gem5::CompressedTags::CompressedTags
CompressedTags(const Params &p)
Construct and initialize this tag store.
Definition: compressed_tags.cc:47
std::vector
STL vector class.
Definition: stl.hh:37
gem5::CacheBlk
A Basic Cache block.
Definition: cache_blk.hh:70
gem5::BaseTags::Params
BaseTagsParams Params
Definition: base.hh:161
sector_tags.hh
gem5::CompressedTags::tagsInit
void tagsInit() override
Initialize blocks as SuperBlk and CompressionBlk instances.
Definition: compressed_tags.cc:53
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
gem5::CompressedTags::superBlks
std::vector< SuperBlk > superBlks
The cache superblocks.
Definition: compressed_tags.hh:76
gem5::CompressedTags
A CompressedTags cache tag store.
Definition: compressed_tags.hh:70
gem5::CompressedTags::findVictim
CacheBlk * findVictim(Addr addr, const bool is_secure, const std::size_t compressed_size, std::vector< CacheBlk * > &evict_blks) override
Find replacement victim based on address.
Definition: compressed_tags.cc:105
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::CompressedTags::forEachBlk
void forEachBlk(std::function< void(CacheBlk &)> visitor) override
Visit each sub-block in the tags and apply a visitor.
Definition: compressed_tags.cc:167
gem5::SectorTags
A SectorTags cache tag store.
Definition: sector_tags.hh:65
super_blk.hh
Copyright (c) 2018 Inria All rights reserved.
gem5::CompressedTags::blks
std::vector< CompressionBlk > blks
The cache blocks.
Definition: compressed_tags.hh:74
gem5::CompressedTags::Params
CompressedTagsParams Params
Convenience typedef.
Definition: compressed_tags.hh:80
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: tlb.cc:60
gem5::CompressedTags::~CompressedTags
virtual ~CompressedTags()
Destructor.
Definition: compressed_tags.hh:90
gem5::CompressedTags::anyBlk
bool anyBlk(std::function< bool(CacheBlk &)> visitor) override
Find if any of the sub-blocks satisfies a condition.
Definition: compressed_tags.cc:175
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition: types.hh:84

Generated on Tue Dec 21 2021 11:34:32 for gem5 by doxygen 1.8.17