48 #ifndef __MEM_CACHE_TAGS_CACHESET_HH__
49 #define __MEM_CACHE_TAGS_CACHESET_HH__
56 template <
class Blktype>
73 Blktype*
findBlk(
Addr tag,
bool is_secure,
int& way_id)
const ;
90 template <
class Blktype>
99 for (
int i = 0;
i < assoc; ++
i) {
100 if (blks[
i]->tag == tag && blks[
i]->isValid() &&
101 blks[
i]->isSecure() == is_secure) {
109 template <
class Blktype>
114 return findBlk(tag, is_secure, ignored_way_id);
117 template <
class Blktype>
134 std::swap(blks[i], next);
136 }
while (next != blk);
139 template <
class Blktype>
144 if (blks[assoc - 1] == blk)
156 std::swap(blks[i], next);
158 }
while (next != blk);
int assoc
The associativity of this set.
An associative set of cache blocks.
Blktype * findBlk(Addr tag, bool is_secure, int &way_id) const
Find a block matching the tag in this set.
Blktype ** blks
Cache blocks in this set, maintained in LRU order 0 = MRU.
void moveToHead(Blktype *blk)
Move the given block to the head of the list.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void moveToTail(Blktype *blk)
Move the given block to the tail of the list.