49 #ifndef __SIMPLE_MEMORY_HH__
50 #define __SIMPLE_MEMORY_HH__
56 #include "params/SimpleMemory.hh"
192 void init()
override;
206 #endif //__SIMPLE_MEMORY_HH__
EventWrapper< SimpleMemory,&SimpleMemory::dequeue > dequeueEvent
bool isBusy
Track the state of the memory as either idle or busy, no need for an enum with only two states...
const PortID InvalidPortID
DrainState
Object drain/handover states.
EventWrapper< SimpleMemory,&SimpleMemory::release > releaseEvent
BaseSlavePort & getSlavePort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a slave port with a given name and index.
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.
A BaseSlavePort is a protocol-agnostic slave port, responsible only for the structural connection to ...
DeferredPacket(PacketPtr _pkt, Tick _tick)
A deferred packet stores a packet along with its scheduled transmission time.
const Tick latency_var
Fudge factor added to the latency.
bool recvTimingReq(PacketPtr pkt)
AbstractMemory declaration.
bool retryResp
Remember if we failed to send a response and are awaiting a retry.
bool retryReq
Remember if we have to retry an outstanding request that arrived while we were busy.
void init() override
Initialise this memory.
The simple memory is a basic single-ported memory controller with a configurable throughput and laten...
uint64_t Tick
Tick count type.
Tick getLatency() const
Detemine the latency.
const double bandwidth
Bandwidth in ticks per byte.
void release()
Release the memory after being busy and send a retry if a request was rejected in the meanwhile...
AddrRangeList getAddrRanges() const
Get a list of the non-overlapping address ranges the owner is responsible for.
SimpleMemory(const SimpleMemoryParams *p)
std::list< DeferredPacket > packetQueue
Internal (unbounded) storage to mimic the delay caused by the actual memory access.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
void recvFunctional(PacketPtr pkt)
Tick recvAtomic(PacketPtr pkt)
Receive an atomic request packet from the master port.
void recvFunctional(PacketPtr pkt)
Receive a functional request packet from the master port.
Tick recvAtomic(PacketPtr pkt)
MemoryPort(const std::string &_name, SimpleMemory &_memory)
void recvRespRetry()
Called by the master port if sendTimingResp was called on this slave port (causing recvTimingResp to ...
DrainState drain() override
Notify an object that it needs to drain its state.
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.
const Tick latency
Latency from that a request is accepted until the response is ready to be sent.
bool recvTimingReq(PacketPtr pkt)
Receive a timing request from the master port.
void dequeue()
Dequeue a packet from our internal packet queue and move it to the port where it will be sent as soon...