29#ifndef __CACHE_PREFETCH_ASSOCIATIVE_SET_IMPL_HH__
30#define __CACHE_PREFETCH_ASSOCIATIVE_SET_IMPL_HH__
40 const size_t num_entries,
41 const size_t associativity_,
44 Entry
const &init_val)
46 repl_policy, indexing_policy, init_val)
54 Addr tag = indexingPolicy->extractTag(
addr);
55 auto candidates = indexingPolicy->getPossibleEntries(
addr);
57 for (
auto candidate : candidates) {
58 Entry* entry =
static_cast<Entry*
>(candidate);
59 if (entry->matchTag(tag, is_secure)) {
71 entry->insert(indexingPolicy->extractTag(
addr), is_secure);
72 replPolicy->reset(entry->replacementData);
void insertEntry(Addr addr, bool is_secure, Entry *entry)
Indicate that an entry has just been inserted.
AssociativeSet(const char *name, const size_t num_entries, const size_t associativity_, replacement_policy::Base *repl_policy, BaseIndexingPolicy *indexing_policy, Entry const &init_val=Entry())
Public constructor.
Entry * findEntry(Addr addr, bool is_secure) const
Find an entry within the set.
A common base class for indexing table locations.
A common base class of cache replacement policy objects.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const std::string & name()