gem5 v23.0.0.1
Loading...
Searching...
No Matches
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
42namespace gem5
43{
44
45class BaseCache;
46class CacheBlk;
47struct CompressedTagsParams;
48
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__
A Basic Cache block.
Definition cache_blk.hh:71
A CompressedTags cache tag store.
void forEachBlk(std::function< void(CacheBlk &)> visitor) override
Visit each sub-block in the tags and apply a visitor.
virtual ~CompressedTags()
Destructor.
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.
void tagsInit() override
Initialize blocks as SuperBlk and CompressionBlk instances.
std::vector< CompressionBlk > blks
The cache blocks.
bool anyBlk(std::function< bool(CacheBlk &)> visitor) override
Find if any of the sub-blocks satisfies a condition.
CompressedTagsParams Params
Convenience typedef.
std::vector< SuperBlk > superBlks
The cache superblocks.
A SectorTags cache tag store.
STL vector class.
Definition stl.hh:37
Bitfield< 0 > p
Bitfield< 3 > addr
Definition types.hh:84
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
Declaration of a sector tag store.
Copyright (c) 2018 Inria All rights reserved.

Generated on Mon Jul 10 2023 15:32:04 for gem5 by doxygen 1.9.7