46 #ifndef __MEM_SIMPLE_MEMORY_HH__ 47 #define __MEM_SIMPLE_MEMORY_HH__ 53 #include "params/SimpleMemory.hh" 182 void init()
override;
192 #endif //__MEM_SIMPLE_MEMORY_HH__ Ports are used to interface objects to each other.
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
EventFunctionWrapper dequeueEvent
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.
DrainState
Object drain/handover states.
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
init() is called after all C++ SimObjects have been created and all ports are connected.
The simple memory is a basic single-ported memory controller with a configurable throughput and laten...
uint64_t Tick
Tick count type.
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...
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)
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Tick recvAtomic(PacketPtr pkt)
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.
EventFunctionWrapper releaseEvent
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &_backdoor)
void dequeue()
Dequeue a packet from our internal packet queue and move it to the port where it will be sent as soon...
Tick getLatency() const
Detemine the latency.