gem5
|
Implement a `stub' port which just responds to requests by printing a message. More...
Classes | |
class | ResponseEvent |
Public Member Functions | |
StubSlavePort (const std::string &name_, ExternalSlave &owner_) | |
Tick | recvAtomic (PacketPtr packet) |
Receive an atomic request packet from the master port. More... | |
void | recvFunctional (PacketPtr packet) |
Receive a functional request packet from the master port. More... | |
bool | recvTimingReq (PacketPtr packet) |
Receive a timing request from the master port. More... | |
bool | recvTimingSnoopResp (PacketPtr packet) |
Receive a timing snoop response from the master port. More... | |
void | recvRespRetry () |
Called by the master port if sendTimingResp was called on this slave port (causing recvTimingResp to be called on the master port) and was unsuccesful. More... | |
void | recvFunctionalSnoop (PacketPtr packet) |
![]() | |
Port (const std::string &name_, ExternalSlave &owner_) | |
~Port () | |
Virtual destructor due to inheritance. More... | |
AddrRangeList | getAddrRanges () const |
Any or all of recv... More... | |
![]() | |
SlavePort (const std::string &name, MemObject *owner, PortID id=InvalidPortID) | |
Slave port. More... | |
virtual | ~SlavePort () |
Tick | sendAtomicSnoop (PacketPtr pkt) |
Send an atomic snoop request packet, where the data is moved and the state is updated in zero time, without interleaving with other memory accesses. More... | |
void | sendFunctionalSnoop (PacketPtr pkt) |
Send a functional snoop request packet, where the data is instantly updated everywhere in the memory system, without affecting the current state of any block or moving the block. More... | |
bool | sendTimingResp (PacketPtr pkt) |
Attempt to send a timing response to the master port by calling its corresponding receive function. More... | |
void | sendTimingSnoopReq (PacketPtr pkt) |
Attempt to send a timing snoop request packet to the master port by calling its corresponding receive function. More... | |
void | sendRetryReq () |
Send a retry to the master port that previously attempted a sendTimingReq to this slave port and failed. More... | |
void | sendRetrySnoopResp () |
Send a retry to the master port that previously attempted a sendTimingSnoopResp to this slave port and failed. More... | |
bool | isSnooping () const |
Find out if the peer master port is snooping or not. More... | |
void | sendRangeChange () const |
Called by the owner to send a range change. More... | |
![]() | |
BaseMasterPort & | getMasterPort () const |
bool | isConnected () const |
![]() | |
const std::string | name () const |
Return port name (for DPRINTF). More... | |
PortID | getId () const |
Get the port id. More... | |
Public Attributes | |
ResponseEvent | responseEvent |
PacketPtr | responsePacket |
Stub can handle a single request at a time. More... | |
bool | mustRetry |
Received a new request while processing a first. More... | |
Additional Inherited Members | |
![]() | |
void | unbind () |
Called by the master port to unbind. More... | |
void | bind (MasterPort &master_port) |
Called by the master port to bind. More... | |
![]() | |
BaseSlavePort (const std::string &name, MemObject *owner, PortID id=InvalidPortID) | |
virtual | ~BaseSlavePort () |
![]() | |
Port (const std::string &_name, MemObject &_owner, PortID _id) | |
Abstract base class for ports. More... | |
![]() | |
ExternalSlave & | owner |
![]() | |
BaseMasterPort * | _baseMasterPort |
![]() | |
const PortID | id |
A numeric identifier to distinguish ports in a vector, and set to InvalidPortID in case this port is not part of a vector. More... | |
MemObject & | owner |
A reference to the MemObject that owns this port. More... | |
Implement a `stub' port which just responds to requests by printing a message.
The stub port can be used to configure and test a system where the external port is used for a peripheral before connecting the external port
Definition at line 52 of file external_slave.cc.
|
inline |
Definition at line 75 of file external_slave.cc.
Receive an atomic request packet from the master port.
Implements SlavePort.
Definition at line 106 of file external_slave.cc.
References DDUMP, DPRINTF, DTRACE, Packet::getAddr(), Packet::getConstPtr(), Packet::getSize(), M5_VAR_USED, and X86ISA::size().
Referenced by recvFunctional(), and recvTimingReq().
|
virtual |
Receive a functional request packet from the master port.
Implements SlavePort.
Definition at line 120 of file external_slave.cc.
References recvAtomic().
void StubSlavePort::recvFunctionalSnoop | ( | PacketPtr | packet | ) |
Definition at line 176 of file external_slave.cc.
References fatal.
|
virtual |
Called by the master port if sendTimingResp was called on this slave port (causing recvTimingResp to be called on the master port) and was unsuccesful.
Implements SlavePort.
Definition at line 166 of file external_slave.cc.
References StubSlavePort::ResponseEvent::process(), responseEvent, and responsePacket.
|
virtual |
Receive a timing request from the master port.
Implements SlavePort.
Definition at line 142 of file external_slave.cc.
References curTick(), mustRetry, ExternalSlave::Port::owner, recvAtomic(), responseEvent, responsePacket, and EventManager::schedule().
|
virtual |
Receive a timing snoop response from the master port.
Reimplemented from SlavePort.
Definition at line 159 of file external_slave.cc.
References fatal.
bool StubSlavePort::mustRetry |
Received a new request while processing a first.
Need to ask for a retry after completing this packet
Definition at line 73 of file external_slave.cc.
Referenced by StubSlavePort::ResponseEvent::process(), and recvTimingReq().
ResponseEvent StubSlavePort::responseEvent |
Definition at line 65 of file external_slave.cc.
Referenced by recvRespRetry(), and recvTimingReq().
PacketPtr StubSlavePort::responsePacket |
Stub can handle a single request at a time.
This will be NULL when no packet is in flight
Definition at line 69 of file external_slave.cc.
Referenced by StubSlavePort::ResponseEvent::process(), recvRespRetry(), and recvTimingReq().