50 #ifndef __MEM_PORT_HH__
51 #define __MEM_PORT_HH__
129 virtual void unbind() = 0;
273 panic(
"%s was not expecting an atomic snoop request\n",
name());
282 panic(
"%s was not expecting a functional snoop request\n",
name());
295 panic(
"%s was not expecting a timing snoop request\n",
name());
312 panic(
"%s was not expecting a snoop retry\n",
name());
412 fatal(
"%s cannot sendRangeChange() without master port",
name());
459 panic(
"%s was not expecting a timing snoop response\n",
name());
471 #endif //__MEM_PORT_HH__
A MasterPort is a specialisation of a BaseMasterPort, which implements the default protocol for the t...
MemObject & owner
A reference to the MemObject that owns this port.
Ports are used to interface memory objects to each other.
PortID getId() const
Get the port id.
virtual void recvTimingSnoopReq(PacketPtr pkt)
Receive a timing snoop request from the slave port.
virtual void recvRangeChange()
Called to receive an address range change from the peer slave port.
Port(const std::string &_name, MemObject &_owner, PortID _id)
Abstract base class for ports.
const PortID InvalidPortID
virtual void recvRespRetry()=0
Called by the master port if sendTimingResp was called on this slave port (causing recvTimingResp to ...
const std::string name() const
Return port name (for DPRINTF).
bool sendTimingSnoopResp(PacketPtr pkt)
Attempt to send a timing snoop response packet to the slave port by calling its corresponding receive...
void bind(MasterPort &master_port)
Called by the master port to bind.
Tick sendAtomicSnoop(PacketPtr pkt)
Send an atomic snoop request packet, where the data is moved and the state is updated in zero time...
virtual void recvFunctional(PacketPtr pkt)=0
Receive a functional request packet from the master port.
void sendFunctionalSnoop(PacketPtr pkt)
Send a functional snoop request packet, where the data is instantly updated everywhere in the memory ...
BaseSlavePort * _baseSlavePort
bool sendTimingReq(PacketPtr pkt)
Attempt to send a timing request to the slave port by calling its corresponding receive function...
A SlavePort is a specialisation of a port.
virtual void sendRetryResp()
Send a retry to the slave port that previously attempted a sendTimingResp to this master port and fai...
virtual Tick recvAtomic(PacketPtr pkt)=0
Receive an atomic request packet from the master port.
void sendRetrySnoopResp()
Send a retry to the master port that previously attempted a sendTimingSnoopResp to this slave port an...
A BaseSlavePort is a protocol-agnostic slave port, responsible only for the structural connection to ...
virtual bool recvTimingResp(PacketPtr pkt)=0
Receive a timing response from the slave port.
virtual ~Port()
Virtual destructor due to inheritance.
BaseMasterPort * _baseMasterPort
bool isSnooping() const
Find out if the peer master port is snooping or not.
bool sendTimingResp(PacketPtr pkt)
Attempt to send a timing response to the master port by calling its corresponding receive function...
void unbind()
Unbind this master port and the associated slave port.
virtual void recvReqRetry()=0
Called by the slave port if sendTimingReq was called on this master port (causing recvTimingReq to be...
virtual void recvFunctionalSnoop(PacketPtr pkt)
Receive a functional snoop request packet from the slave port.
uint64_t Tick
Tick count type.
virtual void recvRetrySnoopResp()
Called by the slave port if sendTimingSnoopResp was called on this master port (causing recvTimingSno...
virtual ~BaseMasterPort()
void unbind()
Called by the master port to unbind.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void printAddr(Addr a)
Inject a PrintReq for the given address to print the state of that address throughout the memory syst...
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
BaseSlavePort(const std::string &name, MemObject *owner, PortID id=InvalidPortID)
void sendRangeChange() const
Called by the owner to send a range change.
BaseMasterPort & getMasterPort() const
std::string portName
Descriptive name (for DPRINTF output)
virtual bool recvTimingReq(PacketPtr pkt)=0
Receive a timing request from the master port.
AddrRangeList getAddrRanges() const
Get the address ranges of the connected slave port.
virtual void bind(BaseSlavePort &slave_port)=0
Declaration of the Packet class.
virtual AddrRangeList getAddrRanges() const =0
Get a list of the non-overlapping address ranges the owner is responsible for.
const PortID id
A numeric identifier to distinguish ports in a vector, and set to InvalidPortID in case this port is ...
void sendRetryReq()
Send a retry to the master port that previously attempted a sendTimingReq to this slave port and fail...
The MemObject class extends the ClockedObject with accessor functions to get its master and slave por...
A BaseMasterPort is a protocol-agnostic master port, responsible only for the structural connection t...
SlavePort(const std::string &name, MemObject *owner, PortID id=InvalidPortID)
Slave port.
void sendTimingSnoopReq(PacketPtr pkt)
Attempt to send a timing snoop request packet to the master port by calling its corresponding receive...
void bind(BaseSlavePort &slave_port)
Bind this master port to a slave port.
BaseSlavePort & getSlavePort() const
virtual Tick recvAtomicSnoop(PacketPtr pkt)
Receive an atomic snoop request packet from the slave port.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
virtual bool isSnooping() const
Determine if this master port is snooping or not.
Tick sendAtomic(PacketPtr pkt)
Send an atomic request packet, where the data is moved and the state is updated in zero time...
MasterPort(const std::string &name, MemObject *owner, PortID id=InvalidPortID)
Master port.
BaseMasterPort(const std::string &name, MemObject *owner, PortID id=InvalidPortID)
virtual bool recvTimingSnoopResp(PacketPtr pkt)
Receive a timing snoop response from the master port.
void sendFunctional(PacketPtr pkt)
Send a functional request packet, where the data is instantly updated everywhere in the memory system...