|
gem5 v23.0.0.1
|
A ResponsePort is a specialization of a port. More...
#include <port.hh>
Public Member Functions | |
| ResponsePort (const std::string &name, SimObject *_owner, PortID id=InvalidPortID) | |
| Response port. | |
| ResponsePort (const std::string &name, PortID id=InvalidPortID) | |
| virtual | ~ResponsePort () |
| bool | isSnooping () const |
| Find out if the peer request port is snooping or not. | |
| void | sendRangeChange () const |
| Called by the owner to send a range change. | |
| virtual AddrRangeList | getAddrRanges () const =0 |
| Get a list of the non-overlapping address ranges the owner is responsible for. | |
| void | unbind () override |
| We let the request port do the work, so these don't do anything. | |
| void | bind (Port &peer) override |
| Attach to a peer port. | |
| 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. | |
| void | sendFunctionalSnoop (PacketPtr pkt) const |
| 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. | |
| bool | sendTimingResp (PacketPtr pkt) |
| Attempt to send a timing response to the request port by calling its corresponding receive function. | |
| void | sendTimingSnoopReq (PacketPtr pkt) |
| Attempt to send a timing snoop request packet to the request port by calling its corresponding receive function. | |
| void | sendRetryReq () |
| Send a retry to the request port that previously attempted a sendTimingReq to this response port and failed. | |
| void | sendRetrySnoopResp () |
| Send a retry to the request port that previously attempted a sendTimingSnoopResp to this response port and failed. | |
Public Member Functions inherited from gem5::Port | |
| virtual | ~Port () |
| Virtual destructor due to inheritance. | |
| Port & | getPeer () |
| Return a reference to this port's peer. | |
| const std::string | name () const |
| Return port name (for DPRINTF). | |
| PortID | getId () const |
| Get the port id. | |
| virtual void | bind (Port &peer) |
| Attach to a peer port. | |
| virtual void | unbind () |
| Dettach from a peer port. | |
| bool | isConnected () const |
| Is this port currently connected to a peer? | |
| void | takeOverFrom (Port *old) |
| A utility function to make it easier to swap out ports. | |
Protected Member Functions | |
| void | responderUnbind () |
| Called by the request port to unbind. | |
| void | responderBind (RequestPort &request_port) |
| Called by the request port to bind. | |
| Tick | recvAtomicBackdoor (PacketPtr pkt, MemBackdoorPtr &backdoor) override |
| Default implementations. | |
| void | recvMemBackdoorReq (const MemBackdoorReq &req, MemBackdoorPtr &backdoor) override |
| Receive a request for a back door to a range of memory. | |
| bool | tryTiming (PacketPtr pkt) override |
| Availability request from the peer. | |
| bool | recvTimingSnoopResp (PacketPtr pkt) override |
| Receive a timing snoop response from the peer. | |
Protected Member Functions inherited from gem5::Port | |
| void | reportUnbound () const |
| Port (const std::string &_name, PortID _id) | |
| Abstract base class for ports. | |
Protected Member Functions inherited from gem5::AtomicResponseProtocol | |
| Tick | sendSnoop (AtomicRequestProtocol *peer, 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. | |
| virtual Tick | recvAtomic (PacketPtr pkt)=0 |
| Receive an atomic request packet from the peer. | |
| virtual Tick | recvAtomicBackdoor (PacketPtr pkt, MemBackdoorPtr &backdoor)=0 |
| Receive an atomic request packet from the peer, and optionally provide a backdoor to the data being accessed. | |
Protected Member Functions inherited from gem5::TimingResponseProtocol | |
| bool | sendResp (TimingRequestProtocol *peer, PacketPtr pkt) |
| Attempt to send a timing response to the peer by calling its corresponding receive function. | |
| void | sendSnoopReq (TimingRequestProtocol *peer, PacketPtr pkt) |
| Attempt to send a timing snoop request packet to the peer by calling its corresponding receive function. | |
| void | sendRetryReq (TimingRequestProtocol *peer) |
| Send a retry to the peer that previously attempted a sendTimingReq to this protocol and failed. | |
| void | sendRetrySnoopResp (TimingRequestProtocol *peer) |
| Send a retry to the peer that previously attempted a sendTimingSnoopResp to this peer and failed. | |
| virtual bool | recvTimingReq (PacketPtr pkt)=0 |
| Receive a timing request from the peer. | |
| virtual bool | tryTiming (PacketPtr pkt)=0 |
| Availability request from the peer. | |
| virtual bool | recvTimingSnoopResp (PacketPtr pkt)=0 |
| Receive a timing snoop response from the peer. | |
| virtual void | recvRespRetry ()=0 |
| Called by the peer if sendTimingResp was called on this protocol (causing recvTimingResp to be called on the peer) and was unsuccessful. | |
Protected Member Functions inherited from gem5::FunctionalResponseProtocol | |
| void | sendSnoop (FunctionalRequestProtocol *peer, PacketPtr pkt) const |
| 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. | |
| virtual void | recvFunctional (PacketPtr pkt)=0 |
| Receive a functional request packet from the peer. | |
| virtual void | recvMemBackdoorReq (const MemBackdoorReq &req, MemBackdoorPtr &backdoor)=0 |
| Receive a request for a back door to a range of memory. | |
Protected Attributes | |
| SimObject & | owner |
Protected Attributes inherited from gem5::Port | |
| 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. | |
| Port * | _peer |
| A pointer to this port's peer. | |
| bool | _connected |
| Whether this port is currently connected to a peer port. | |
Private Attributes | |
| RequestPort * | _requestPort |
| bool | defaultBackdoorWarned |
Friends | |
| class | RequestPort |
A ResponsePort is a specialization of a port.
In addition to the basic functionality of sending packets to its requestor peer, it also has functions specific to a responder, e.g. to send range changes and get the address ranges that the port responds to.
The three protocols are atomic, timing, and functional, each with its own header file.
| gem5::ResponsePort::ResponsePort | ( | const std::string & | name, |
| SimObject * | _owner, | ||
| PortID | id = InvalidPortID |
||
| ) |
| gem5::ResponsePort::ResponsePort | ( | const std::string & | name, |
| PortID | id = InvalidPortID |
||
| ) |
|
inlineoverridevirtual |
|
pure virtual |
Get a list of the non-overlapping address ranges the owner is responsible for.
All response ports must override this function and return a populated list with at least one item.
Implemented in gem5::X86ISA::GpuTLB::CpuSidePort, gem5::TLBCoalescer::CpuSidePort, gem5::VegaISA::GpuTLB::CpuSidePort, gem5::VegaTLBCoalescer::CpuSidePort, gem5::SMMUDevicePort, gem5::SMMUControlPort, gem5::SMMUATSDevicePort, gem5::X86ISA::IntResponsePort< Device >, gem5::X86ISA::IntResponsePort< gem5::X86ISA::Interrupts >, gem5::LdsState::CuSidePort, gem5::CommMonitor::MonitorResponsePort, gem5::memory::DRAMSim2::MemoryPort, gem5::memory::DRAMsim3::MemoryPort, gem5::ExternalSlave::ExternalPort, gem5::MemCheckerMonitor::MonitorResponsePort, gem5::memory::qos::MemSinkCtrl::MemoryPort, gem5::ruby::GPUCoalescer::GMTokenPort, gem5::ruby::RubyPort::MemResponsePort, gem5::ruby::RubyPort::PioResponsePort, gem5::SerialLink::SerialLinkResponsePort, gem5::OutgoingRequestBridge::OutgoingRequestPort, gem5::PioPort< Device >, gem5::PioPort< gem5::PioDevice >, gem5::PioPort< gem5::X86ISA::Interrupts >, gem5::SimpleCache::CPUSidePort, gem5::SimpleMemobj::CPUSidePort, gem5::AddrMapper::MapperResponsePort, gem5::Bridge::BridgeResponsePort, gem5::BaseCache::CpuSidePort, gem5::memory::CfiMemory::MemoryPort, gem5::CoherentXBar::CoherentXBarResponsePort, gem5::memory::MemCtrl::MemoryPort, gem5::MemDelay::ResponsePort, gem5::NoncoherentXBar::NoncoherentXBarResponsePort, gem5::ResponsePortWrapper, gem5::memory::SimpleMemory::MemoryPort, gem5::SysBridge::SysBridgeSourcePort, gem5::ThreadBridge::IncomingPort, and sc_gem5::Gem5ToTlmBridge< BITWIDTH >::BridgeResponsePort.
Referenced by gem5::RequestPort::getAddrRanges().
|
inline |
Find out if the peer request port is snooping or not.
Definition at line 314 of file port.hh.
References _requestPort, and gem5::RequestPort::isSnooping().
Referenced by gem5::BaseCache::functionalAccess(), gem5::BaseCache::init(), gem5::AddrMapper::isSnooping(), gem5::CommMonitor::isSnooping(), gem5::MemCheckerMonitor::isSnooping(), gem5::MemDelay::RequestPort::isSnooping(), gem5::SnoopFilter::lookupRequest(), gem5::SnoopFilter::portToMask(), gem5::SnoopFilter::updateResponse(), and gem5::SnoopFilter::updateSnoopResponse().
|
overrideprotectedvirtual |
Default implementations.
Implements gem5::AtomicResponseProtocol.
Reimplemented in gem5::SysBridge::SysBridgeSourcePort, and gem5::ResponsePortWrapper.
Definition at line 238 of file port.cc.
References defaultBackdoorWarned, DPRINTF, gem5::Port::name(), and gem5::AtomicResponseProtocol::recvAtomic().
Referenced by gem5::ResponsePortWrapper::recvAtomicBackdoor().
|
overrideprotectedvirtual |
Receive a request for a back door to a range of memory.
| req | An object which describes what back door is being requested. |
| backdoor | Can be set to a back door pointer by the target to let caller have direct access to the requested range. |
Implements gem5::FunctionalResponseProtocol.
Reimplemented in gem5::ResponsePortWrapper, and gem5::SysBridge::SysBridgeSourcePort.
Definition at line 249 of file port.cc.
References defaultBackdoorWarned, DPRINTF, and gem5::Port::name().
Referenced by gem5::ResponsePortWrapper::recvMemBackdoorReq().
|
inlineoverrideprotectedvirtual |
Receive a timing snoop response from the peer.
Implements gem5::TimingResponseProtocol.
Reimplemented in gem5::StubSlavePort, and gem5::SysBridge::SysBridgeSourcePort.
Definition at line 474 of file port.hh.
References gem5::Port::name(), and panic.
|
protected |
Called by the request port to bind.
Should never be called directly.
Definition at line 231 of file port.cc.
References _requestPort, and gem5::Port::bind().
Referenced by gem5::RequestPort::bind().
|
protected |
Called by the request port to unbind.
Should never be called directly.
Definition at line 224 of file port.cc.
References _requestPort, and gem5::Port::unbind().
Referenced by gem5::RequestPort::unbind(), and gem5::TokenResponsePort::unbind().
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.
| pkt | Snoop packet to send. |
Definition at line 349 of file port.hh.
References _requestPort, gem5::Port::reportUnbound(), and gem5::AtomicResponseProtocol::sendSnoop().
Referenced by gem5::Cache::handleSnoop(), gem5::Cache::isCachedAbove(), gem5::AddrMapper::recvAtomicSnoop(), gem5::CommMonitor::recvAtomicSnoop(), and gem5::SysBridge::SysBridgeTargetPort::recvAtomicSnoop().
|
inline |
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.
| pkt | Snoop packet to send. |
Definition at line 369 of file port.hh.
References _requestPort, gem5::Port::reportUnbound(), and gem5::FunctionalResponseProtocol::sendSnoop().
Referenced by gem5::BaseCache::functionalAccess(), gem5::AddrMapper::recvFunctionalSnoop(), gem5::CommMonitor::recvFunctionalSnoop(), gem5::MemCheckerMonitor::recvFunctionalSnoop(), and gem5::SysBridge::SysBridgeTargetPort::recvFunctionalSnoop().
|
inline |
Called by the owner to send a range change.
Definition at line 319 of file port.hh.
References _requestPort, and gem5::RequestPort::recvRangeChange().
Referenced by gem5::SerialLink::init(), gem5::OutgoingRequestBridge::init(), gem5::SMMUv3::init(), gem5::RangeAddrMapper::init(), gem5::Bridge::init(), gem5::BaseCache::init(), gem5::memory::CfiMemory::init(), gem5::memory::DRAMSim2::init(), gem5::memory::DRAMsim3::init(), gem5::ExternalSlave::init(), gem5::memory::MemCtrl::init(), gem5::memory::qos::MemSinkCtrl::init(), gem5::ruby::RubyPort::init(), gem5::memory::SimpleMemory::init(), gem5::AddrMapper::recvRangeChange(), gem5::CommMonitor::recvRangeChange(), gem5::MemCheckerMonitor::recvRangeChange(), gem5::MemDelay::RequestPort::recvRangeChange(), gem5::SysBridge::SysBridgeTargetPort::recvRangeChange(), gem5::SMMUv3DeviceInterface::sendRange(), and gem5::SimpleMemobj::sendRangeChange().
|
inline |
Send a retry to the request port that previously attempted a sendTimingReq to this response port and failed.
Definition at line 424 of file port.hh.
References _requestPort, gem5::Port::reportUnbound(), and gem5::TimingResponseProtocol::sendRetryReq().
Referenced by gem5::SMMUv3DeviceInterface::atsSendDeviceRetry(), gem5::memory::qos::MemSinkCtrl::processNextReqEvent(), gem5::memory::MemCtrl::processNextReqEvent(), gem5::memory::MemCtrl::processRespondEvent(), gem5::StubSlavePort::processResponseEvent(), gem5::AddrMapper::recvReqRetry(), gem5::CommMonitor::recvReqRetry(), gem5::MemCheckerMonitor::recvReqRetry(), gem5::SysBridge::SysBridgeTargetPort::recvReqRetry(), gem5::memory::CfiMemory::release(), gem5::memory::SimpleMemory::release(), gem5::SMMUv3DeviceInterface::sendDeviceRetry(), gem5::BaseXBar::ReqLayer::sendRetry(), gem5::memory::DRAMSim2::tick(), and gem5::memory::DRAMsim3::tick().
|
inline |
Send a retry to the request port that previously attempted a sendTimingSnoopResp to this response port and failed.
Definition at line 438 of file port.hh.
References _requestPort, gem5::Port::reportUnbound(), and gem5::TimingResponseProtocol::sendRetrySnoopResp().
Referenced by gem5::CommMonitor::recvRetrySnoopResp(), gem5::SysBridge::SysBridgeTargetPort::recvRetrySnoopResp(), gem5::BaseXBar::SnoopRespLayer::sendRetry(), and gem5::CoherentXBar::SnoopRespPort::sendRetryResp().
|
inline |
Attempt to send a timing response to the request port by calling its corresponding receive function.
If the send does not succeed, as indicated by the return value, then the sender must wait for a recvRespRetry at which point it can re-issue a sendTimingResp.
| pkt | Packet to send. |
Definition at line 393 of file port.hh.
References _requestPort, gem5::Port::reportUnbound(), and gem5::TimingResponseProtocol::sendResp().
Referenced by gem5::ruby::PendingWriteInst::ackWriteCompletion(), gem5::memory::CfiMemory::dequeue(), gem5::memory::SimpleMemory::dequeue(), gem5::LdsState::process(), gem5::StubSlavePort::processResponseEvent(), gem5::TokenResponsePort::recvRespRetry(), gem5::AddrMapper::recvTimingResp(), gem5::CommMonitor::recvTimingResp(), gem5::MemCheckerMonitor::recvTimingResp(), gem5::SysBridge::SysBridgeTargetPort::recvTimingResp(), gem5::SimpleCache::CPUSidePort::sendPacket(), gem5::SimpleMemobj::CPUSidePort::sendPacket(), gem5::memory::DRAMSim2::sendResponse(), gem5::memory::DRAMsim3::sendResponse(), gem5::RespPacketQueue::sendTiming(), gem5::TokenResponsePort::sendTimingResp(), gem5::OutgoingRequestBridge::sendTimingResp(), gem5::TLBCoalescer::updatePhysAddresses(), and gem5::VegaTLBCoalescer::updatePhysAddresses().
|
inline |
Attempt to send a timing snoop request packet to the request port by calling its corresponding receive function.
Snoop requests always succeed and hence no return value is needed.
| pkt | Packet to send. |
Definition at line 410 of file port.hh.
References _requestPort, gem5::Port::reportUnbound(), and gem5::TimingResponseProtocol::sendSnoopReq().
Referenced by gem5::Cache::handleSnoop(), gem5::Cache::isCachedAbove(), gem5::AddrMapper::recvTimingSnoopReq(), gem5::CommMonitor::recvTimingSnoopReq(), gem5::MemCheckerMonitor::recvTimingSnoopReq(), gem5::SysBridge::SysBridgeTargetPort::recvTimingSnoopReq(), gem5::Cache::sendMSHRQueuePacket(), and gem5::OutgoingRequestBridge::sendTimingSnoopReq().
|
inlineoverrideprotectedvirtual |
Availability request from the peer.
Implements gem5::TimingResponseProtocol.
Reimplemented in gem5::SysBridge::SysBridgeSourcePort.
Definition at line 468 of file port.hh.
References gem5::Port::name(), and panic.
|
inlineoverridevirtual |
We let the request port do the work, so these don't do anything.
Reimplemented from gem5::Port.
Reimplemented in gem5::TokenResponsePort.
|
friend |
|
private |
Definition at line 292 of file port.hh.
Referenced by isSnooping(), responderBind(), responderUnbind(), sendAtomicSnoop(), sendFunctionalSnoop(), sendRangeChange(), sendRetryReq(), sendRetrySnoopResp(), sendTimingResp(), and sendTimingSnoopReq().
|
private |
Definition at line 294 of file port.hh.
Referenced by recvAtomicBackdoor(), and recvMemBackdoorReq().