41#ifndef __MEM_RUBY_STRUCTURES_PERFECTCACHEMEMORY_HH__
42#define __MEM_RUBY_STRUCTURES_PERFECTCACHEMEMORY_HH__
44#include <unordered_map>
48#include "mem/ruby/protocol/AccessPermission.hh"
102 void print(std::ostream& out)
const;
110 std::unordered_map<Addr, PerfectCacheLineState<ENTRY> >
m_map;
160 [[maybe_unused]]
auto num_erased = m_map.erase(
makeLineAddress(address));
161 assert(num_erased == 1);
169 panic(
"cacheProbe called in perfect cache");
190inline AccessPermission
199 AccessPermission new_perm)
ENTRY * lookup(Addr address)
PerfectCacheMemory & operator=(const PerfectCacheMemory &obj)
bool isTagPresent(Addr address) const
bool cacheAvail(Addr address) const
Addr cacheProbe(Addr newAddress) const
PerfectCacheMemory(const PerfectCacheMemory &obj)
std::unordered_map< Addr, PerfectCacheLineState< ENTRY > > m_map
AccessPermission getPermission(Addr address) const
void allocate(Addr address)
void deallocate(Addr address)
void print(std::ostream &out) const
void changePermission(Addr address, AccessPermission new_perm)
#define panic(...)
This implements a cprintf based panic() function.
Addr makeLineAddress(Addr addr)
std::ostream & operator<<(std::ostream &os, const BoolVec &myvector)
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.
AccessPermission m_permission