46#include "debug/RubyCache.hh"
47#include "debug/RubyStats.hh"
59 :
SimObject(
p), addrRanges(
p.addr_ranges.begin(),
p.addr_ranges.end())
93 if (
r.contains(address)) {
105 if (
r.contains(address)) {
106 ret +=
r.getOffset(address);
118 DPRINTF(RubyCache,
"Looking up address: %#x\n", address);
130 DPRINTF(RubyCache,
"Looking up address: %#x\n", address);
146 DPRINTF(RubyCache,
"Removing entry for address: %#x\n", address);
162 DPRINTF(RubyStats,
"Recorded statistic: %s\n",
163 DirectoryRequestType_to_string(requestType));
Abstract superclass for simulation objects.
void changePermission(AccessPermission new_perm)
void deallocate(Addr address)
AbstractCacheEntry ** m_entries
const AddrRangeList addrRanges
The address range for which the directory responds.
void print(std::ostream &out) const
void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
bool isPresent(Addr address)
RubyDirectoryMemoryParams Params
AbstractCacheEntry * lookup(Addr address)
AbstractCacheEntry * allocate(Addr address, AbstractCacheEntry *new_entry)
uint64_t mapAddressToLocalIdx(Addr address)
Return the index in the directory based on an address.
void recordRequestType(DirectoryRequestType requestType)
DirectoryMemory(const Params &p)
static uint32_t getBlockSizeBytes()
static uint32_t getBlockSizeBits()
static constexpr std::enable_if_t< std::is_integral_v< T >, int > floorLog2(T x)
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.