44 #ifndef __MEM_DRAMSIM2_HH__
45 #define __MEM_DRAMSIM2_HH__
48 #include <unordered_map>
53 #include "params/DRAMSim2.hh"
197 void init()
override;
209 #endif // __MEM_DRAMSIM2_HH__
MemoryPort(const std::string &_name, DRAMSim2 &_memory)
Tick recvAtomic(PacketPtr pkt)
Wrapper class to avoid having DRAMSim2 names like ClockDomain etc clashing with the normal gem5 world...
void recvFunctional(PacketPtr pkt)
const PortID InvalidPortID
DrainState drain() override
Notify an object that it needs to drain its state.
DrainState
Object drain/handover states.
The memory port has to deal with its own flow control to avoid having unbounded storage that is impli...
void recvFunctional(PacketPtr pkt)
Receive a functional request packet from the master port.
bool retryResp
Are we waiting for a retry for sending a response.
std::unique_ptr< Packet > pendingDelete
Upstream caches need this packet until true is returned, so hold it for deletion until a subsequent c...
A SlavePort is a specialisation of a port.
unsigned int nbrOutstanding() const
void readComplete(unsigned id, uint64_t addr, uint64_t cycle)
Read completion callback.
A BaseSlavePort is a protocol-agnostic slave port, responsible only for the structural connection to ...
std::unordered_map< Addr, std::queue< PacketPtr > > outstandingWrites
unsigned int nbrOutstandingWrites
AbstractMemory declaration.
void recvRespRetry()
Called by the master port if sendTimingResp was called on this slave port (causing recvTimingResp to ...
void tick()
Progress the controller one clock cycle.
Declaration of the queued port.
void startup() override
startup() is the final initialization call before simulation.
bool recvTimingReq(PacketPtr pkt)
std::deque< PacketPtr > responseQueue
Queue to hold response packets until we can send them back.
AbstractMemoryParams Params
uint64_t Tick
Tick count type.
DRAMSim2Wrapper declaration.
void writeComplete(unsigned id, uint64_t addr, uint64_t cycle)
Write completion callback.
void accessAndRespond(PacketPtr pkt)
When a packet is ready, use the "access()" method in AbstractMemory to actually create the response p...
DRAMSim2Wrapper wrapper
The actual DRAMSim2 wrapper.
Tick startTick
Keep track of when the wrapper is started.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
EventWrapper< DRAMSim2,&DRAMSim2::sendResponse > sendResponseEvent
Event to schedule sending of responses.
virtual BaseSlavePort & getSlavePort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a slave port with a given name and index.
EventWrapper< DRAMSim2,&DRAMSim2::tick > tickEvent
Event to schedule clock ticks.
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...
Tick recvAtomic(PacketPtr pkt)
Receive an atomic request packet from the master port.
bool retryReq
Is the connected port waiting for a retry from us.
DRAMSim2(const Params *p)
An abstract memory represents a contiguous block of physical memory, with an associated address range...
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
unsigned int nbrOutstandingReads
Count the number of outstanding transactions so that we can block any further requests until there is...
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 master port.
void init() override
Initialise this memory.