43#ifndef __MEM_DRAMSIM3_HH__
44#define __MEM_DRAMSIM3_HH__
48#include <unordered_map>
53#include "params/DRAMsim3.hh"
210 void init()
override;
AbstractMemory declaration.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Ports are used to interface objects to each other.
A ResponsePort is a specialization of a port.
An abstract memory represents a contiguous block of physical memory, with an associated address range...
Wrapper class to avoid having DRAMsim3 names like ClockDomain etc clashing with the normal gem5 world...
The memory port has to deal with its own flow control to avoid having unbounded storage that is impli...
void recvRespRetry()
Called by the peer if sendTimingResp was called on this protocol (causing recvTimingResp to be called...
MemoryPort(const std::string &_name, DRAMsim3 &_memory)
void recvFunctional(PacketPtr pkt)
Receive a functional request packet from the peer.
Tick recvAtomic(PacketPtr pkt)
Receive an atomic request packet from the peer.
AddrRangeList getAddrRanges() const
Get a list of the non-overlapping address ranges the owner is responsible for.
bool recvTimingReq(PacketPtr pkt)
Receive a timing request from the peer.
Tick startTick
Keep track of when the wrapper is started.
EventFunctionWrapper tickEvent
Event to schedule clock ticks.
bool recvTimingReq(PacketPtr pkt)
void recvFunctional(PacketPtr pkt)
void accessAndRespond(PacketPtr pkt)
When a packet is ready, use the "access()" method in AbstractMemory to actually create the response p...
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
void tick()
Progress the controller one clock cycle.
std::deque< PacketPtr > responseQueue
Queue to hold response packets until we can send them back.
void startup() override
startup() is the final initialization call before simulation.
void resetStats() override
Callback to reset stats.
Tick recvAtomic(PacketPtr pkt)
std::unordered_map< Addr, std::queue< PacketPtr > > outstandingWrites
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
bool retryReq
Is the connected port waiting for a retry from us.
DRAMsim3Wrapper wrapper
The actual DRAMsim3 wrapper.
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
void readComplete(unsigned id, uint64_t addr)
Read completion callback.
EventFunctionWrapper sendResponseEvent
Event to schedule sending of responses.
bool retryResp
Are we waiting for a retry for sending a response.
std::function< void(uint64_t)> write_cb
std::unique_ptr< Packet > pendingDelete
Upstream caches need this packet until true is returned, so hold it for deletion until a subsequent c...
unsigned int nbrOutstandingWrites
unsigned int nbrOutstanding() const
DRAMsim3(const Params &p)
unsigned int nbrOutstandingReads
Count the number of outstanding transactions so that we can block any further requests until there is...
std::unordered_map< Addr, std::queue< PacketPtr > > outstandingReads
Keep track of what packets are outstanding per address, and do so separately for reads and writes.
std::function< void(uint64_t)> read_cb
Callback functions.
void writeComplete(unsigned id, uint64_t addr)
Write completion callback.
DRAMsim3Wrapper declaration.
DrainState
Object drain/handover states.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const PortID InvalidPortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
Declaration of the queued port.