31 #ifndef __LEARNING_GEM5_PART2_SIMPLE_MEMOBJ_HH__ 32 #define __LEARNING_GEM5_PART2_SIMPLE_MEMOBJ_HH__ 35 #include "params/SimpleMemobj.hh" 70 SlavePort(name, owner), owner(owner), needRetry(false),
71 blockedPacket(nullptr)
103 {
panic(
"recvAtomic unimpl."); }
149 MasterPort(name, owner), owner(owner), blockedPacket(nullptr)
164 bool recvTimingResp(
PacketPtr pkt)
override;
171 void recvReqRetry()
override;
180 void recvRangeChange()
override;
253 #endif // __LEARNING_GEM5_PART2_SIMPLE_MEMOBJ_HH__ A MasterPort is a specialisation of a BaseMasterPort, which implements the default protocol for the t...
#define panic(...)
This implements a cprintf based panic() function.
bool handleResponse(PacketPtr pkt)
Handle the respone from the memory side.
SimpleMemobj * owner
The object that owns this object (SimpleMemobj)
Ports are used to interface objects to each other.
bool recvTimingReq(PacketPtr pkt) override
Receive a timing request from the master port.
void sendRangeChange() const
Called by the owner to send a range change.
Port on the memory-side that receives responses.
AddrRangeList getAddrRanges() const override
Get a list of the non-overlapping address ranges the owner is responsible for.
const PortID InvalidPortID
bool needRetry
True if the port needs to send a retry req.
PacketPtr blockedPacket
If we tried to send a packet and it was blocked, store it here.
A SlavePort is a specialisation of a port.
SimpleMemobj(SimpleMemobjParams *params)
constructor
SimpleMemobj * owner
The object that owns this object (SimpleMemobj)
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
bool blocked
True if this is currently blocked waiting for a response.
uint64_t Tick
Tick count type.
const Params * params() const
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
bool handleRequest(PacketPtr pkt)
Handle the request from the CPU side.
CPUSidePort(const std::string &name, SimpleMemobj *owner)
Constructor.
A very simple memory object.
void sendPacket(PacketPtr pkt)
Send a packet across this port.
CPUSidePort instPort
Instantiation of the CPU-side ports.
Port on the CPU-side that receives requests.
const std::string name() const
Return port name (for DPRINTF).
void handleFunctional(PacketPtr pkt)
Handle a packet functionally.
void trySendRetry()
Send a retry to the peer port only if it is needed.
MemSidePort memPort
Instantiation of the memory-side port.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
MemSidePort(const std::string &name, SimpleMemobj *owner)
Constructor.
void recvFunctional(PacketPtr pkt) override
Receive a functional request packet from the master port.
PacketPtr blockedPacket
If we tried to send a packet and it was blocked, store it here.
Tick recvAtomic(PacketPtr pkt) override
Receive an atomic request packet from the master port.
Abstract superclass for simulation objects.
void recvRespRetry() override
Called by the master port if sendTimingResp was called on this slave port (causing recvTimingResp to ...