46#ifndef __MEM_ABSTRACT_MEMORY_HH__
47#define __MEM_ABSTRACT_MEMORY_HH__
51#include "params/AbstractMemory.hh"
90 assert(req->hasContextId());
166 bool isLLSC = pkt->
isLLSC();
168 req->setExtraData(0);
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
ClockedObjectParams Params
Parameters of ClockedObject.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
RequestPtr req
A pointer to the original request.
An abstract memory represents a contiguous block of physical memory, with an associated address range...
void access(PacketPtr pkt)
Perform an untimed memory access and update all the state (e.g.
uint64_t size() const
Get the memory size.
void initState() override
initState() is called on each SimObject when not restoring from a checkpoint.
void trackLoadLocked(PacketPtr pkt)
void setBackingStore(uint8_t *pmem_addr)
Set the host memory backing store to be used by this memory controller.
bool isInAddrMap() const
Some memories are used as shadow memories or should for other reasons not be part of the global addre...
const bool confTableReported
void system(System *sys)
Set the system pointer on this memory This can't be done via a python parameter because the system ne...
const std::list< LockedAddr > & getLockedAddrList() const
Get the list of locked addresses to allow checkpointing.
AbstractMemory & operator=(const AbstractMemory &)
AbstractMemory(const AbstractMemory &)
bool isNull() const
See if this is a null memory that should never store data and always return zero.
virtual ~AbstractMemory()
bool isKvmMap() const
When shadow memories are in use, KVM may want to make one or the other, but cannot map both into the ...
bool checkLockedAddrList(PacketPtr pkt)
uint8_t * toHostAddr(Addr addr) const
Transform a gem5 address space address into its physical counterpart in the host address space.
System * _system
Pointer to the System object.
void functionalAccess(PacketPtr pkt)
Perform an untimed memory read or write without changing anything but the memory itself.
void getBackdoor(MemBackdoorPtr &bd_ptr)
AddrRange getAddrRange() const
Get the address range.
Addr start() const
Get the start address.
std::list< LockedAddr > lockedAddrList
gem5::memory::AbstractMemory::MemStats stats
System * system() const
read the system pointer Implemented for completeness with the setter
bool isConfReported() const
Should this memory be passed to the kernel and part of the OS physical memory layout.
void addLockedAddr(LockedAddr addr)
Add a locked address to allow for checkpointing.
bool writeOK(PacketPtr pkt)
Locked address class that represents a physical address and a context id.
bool matchesContext(const RequestPtr &req) const
LockedAddr(Addr _addr, int _cid)
static const Addr Addr_Mask
LockedAddr(const RequestPtr &req)
static Addr mask(Addr paddr)
const ContextID contextId
A vector of scalar stats.
ClockedObject declaration and implementation.
Addr start() const
Get the start address of the range.
Addr size() const
Get the size of the address range.
const Params & params() const
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< Request > RequestPtr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int ContextID
Globally unique thread context ID.
const ContextID InvalidContextID
statistics::Formula bwInstRead
Read bandwidth from this memory.
statistics::Vector bytesRead
Number of total bytes read from this memory.
statistics::Vector bytesInstRead
Number of instruction bytes read from this memory.
statistics::Formula bwTotal
Total bandwidth from this memory.
statistics::Vector numReads
Number of read requests.
MemStats(AbstractMemory &mem)
void regStats() override
Callback to set stat parameters.
statistics::Vector numOther
Number of other requests.
statistics::Vector bytesWritten
Number of bytes written to this memory.
statistics::Vector numWrites
Number of write requests.
statistics::Formula bwRead
Read bandwidth from this memory.
statistics::Formula bwWrite
Write bandwidth from this memory.
const AbstractMemory & mem