|
gem5 [DEVELOP-FOR-25.0]
|
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. | |
| 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. | |
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 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. | |
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 ) |
Response port.
Definition at line 218 of file port.cc.
References _requestPort, defaultBackdoorWarned, gem5::Port::name(), owner, and gem5::Port::Port().
Referenced by gem5::Bridge::BridgeResponsePort::BridgeResponsePort(), sc_gem5::Gem5ToTlmBridge< BITWIDTH >::BridgeResponsePort::BridgeResponsePort(), gem5::SimpleCache::CPUSidePort::CPUSidePort(), gem5::SimpleMemobj::CPUSidePort::CPUSidePort(), gem5::TLBCoalescer::CpuSidePort::CpuSidePort(), gem5::VegaISA::GpuTLB::CpuSidePort::CpuSidePort(), gem5::VegaTLBCoalescer::CpuSidePort::CpuSidePort(), gem5::X86ISA::GpuTLB::CpuSidePort::CpuSidePort(), gem5::LdsState::CuSidePort::CuSidePort(), gem5::ExternalSlave::ExternalPort::ExternalPort(), gem5::ThreadBridge::IncomingPort::IncomingPort(), gem5::AddrMapper::MapperResponsePort::MapperResponsePort(), gem5::memory::CfiMemory::MemoryPort::MemoryPort(), gem5::memory::DRAMSim2::MemoryPort::MemoryPort(), gem5::memory::DRAMsim3::MemoryPort::MemoryPort(), gem5::memory::SimpleMemory::MemoryPort::MemoryPort(), gem5::CommMonitor::MonitorResponsePort::MonitorResponsePort(), gem5::MemCheckerMonitor::MonitorResponsePort::MonitorResponsePort(), gem5::OutgoingRequestBridge::OutgoingRequestPort::OutgoingRequestPort(), gem5::QueuedResponsePort::QueuedResponsePort(), recvAtomicBackdoor(), recvMemBackdoorReq(), gem5::ResponsePortWrapper::ResponsePortWrapper(), gem5::PortTerminator::RespPort::RespPort(), gem5::SerialLink::SerialLinkResponsePort::SerialLinkResponsePort(), gem5::SysBridge::SysBridgeSourcePort::SysBridgeSourcePort(), and gem5::TokenResponsePort::TokenResponsePort().
| gem5::ResponsePort::ResponsePort | ( | const std::string & | name, |
| PortID | id = InvalidPortID ) |
Definition at line 235 of file port.cc.
References _requestPort, defaultBackdoorWarned, gem5::Port::id, gem5::Port::name(), owner, and gem5::Port::Port().
|
inlineoverridevirtual |
Attach to a peer port.
Reimplemented from gem5::Port.
Reimplemented in gem5::TokenResponsePort.
Definition at line 395 of file port.hh.
References gem5::Port::Port().
|
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::AddrMapper::MapperResponsePort, gem5::BaseCache::CpuSidePort, gem5::Bridge::BridgeResponsePort, gem5::CoherentXBar::CoherentXBarResponsePort, gem5::CommMonitor::MonitorResponsePort, gem5::ExternalSlave::ExternalPort, gem5::LdsState::CuSidePort, gem5::MemCheckerMonitor::MonitorResponsePort, gem5::MemDelay::ResponsePort, gem5::memory::CfiMemory::MemoryPort, gem5::memory::DRAMSim2::MemoryPort, gem5::memory::DRAMsim3::MemoryPort, gem5::memory::MemCtrl::MemoryPort, gem5::memory::qos::MemSinkCtrl::MemoryPort, gem5::memory::SimpleMemory::MemoryPort, gem5::NoncoherentXBar::NoncoherentXBarResponsePort, gem5::OutgoingRequestBridge::OutgoingRequestPort, gem5::PioPort< Device >, gem5::PioPort< gem5::PioDevice >, gem5::PioPort< gem5::X86ISA::Interrupts >, gem5::PortTerminator::RespPort, gem5::ResponsePortWrapper, gem5::ruby::GPUCoalescer::GMTokenPort, gem5::ruby::RubyPort::MemResponsePort, gem5::ruby::RubyPort::PioResponsePort, gem5::SerialLink::SerialLinkResponsePort, gem5::SimpleCache::CPUSidePort, gem5::SimpleMemobj::CPUSidePort, gem5::SMMUATSDevicePort, gem5::SMMUControlPort, gem5::SMMUDevicePort, gem5::SysBridge::SysBridgeSourcePort, gem5::ThreadBridge::IncomingPort, gem5::TLBCoalescer::CpuSidePort, gem5::VegaISA::GpuTLB::CpuSidePort, gem5::VegaTLBCoalescer::CpuSidePort, gem5::X86ISA::GpuTLB::CpuSidePort, gem5::X86ISA::IntResponsePort< Device >, gem5::X86ISA::IntResponsePort< gem5::X86ISA::Interrupts >, and sc_gem5::Gem5ToTlmBridge< BITWIDTH >::BridgeResponsePort.
|
inline |
Find out if the peer request port is snooping or not.
Definition at line 375 of file port.hh.
References _requestPort.
Referenced by gem5::SnoopFilter::lookupRequest(), gem5::SnoopFilter::portToMask(), gem5::SnoopFilter::updateResponse(), and gem5::SnoopFilter::updateSnoopResponse().
|
overrideprotectedvirtual |
Default implementations.
Implements gem5::AtomicResponseProtocol.
Reimplemented in gem5::ResponsePortWrapper, and gem5::SysBridge::SysBridgeSourcePort.
Definition at line 262 of file port.cc.
References defaultBackdoorWarned, DPRINTF, gem5::Port::name(), gem5::AtomicResponseProtocol::recvAtomic(), and ResponsePort().
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 273 of file port.cc.
References defaultBackdoorWarned, DPRINTF, gem5::Port::name(), and ResponsePort().
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 539 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 255 of file port.cc.
References _requestPort, gem5::Port::bind(), and RequestPort.
|
protected |
Called by the request port to unbind.
Should never be called directly.
Definition at line 248 of file port.cc.
References _requestPort, and gem5::Port::unbind().
Referenced by 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 410 of file port.hh.
References _requestPort, gem5::Port::reportUnbound(), and gem5::AtomicResponseProtocol::sendSnoop().
|
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 430 of file port.hh.
References _requestPort, gem5::Port::reportUnbound(), and gem5::FunctionalResponseProtocol::sendSnoop().
|
inline |
Called by the owner to send a range change.
Definition at line 380 of file port.hh.
References _requestPort.
|
inline |
Send a retry to the request port that previously attempted a sendTimingReq to this response port and failed.
Definition at line 489 of file port.hh.
References _requestPort, gem5::Port::reportUnbound(), and gem5::TimingResponseProtocol::sendRetryReq().
Referenced by gem5::StubSlavePort::processResponseEvent(), gem5::BaseCache::CacheResponsePort::processSendRetry(), gem5::Bridge::BridgeResponsePort::retryStalledReq(), gem5::SerialLink::SerialLinkResponsePort::retryStalledReq(), gem5::BaseXBar::ReqLayer::sendRetry(), gem5::SimpleCache::CPUSidePort::trySendRetry(), gem5::SimpleMemobj::CPUSidePort::trySendRetry(), gem5::Bridge::BridgeResponsePort::trySendTiming(), and gem5::SerialLink::SerialLinkResponsePort::trySendTiming().
|
inline |
Send a retry to the request port that previously attempted a sendTimingSnoopResp to this response port and failed.
Definition at line 503 of file port.hh.
References _requestPort, gem5::Port::reportUnbound(), and gem5::TimingResponseProtocol::sendRetrySnoopResp().
Referenced by gem5::BaseXBar::SnoopRespLayer::sendRetry().
|
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 454 of file port.hh.
References _requestPort, gem5::Port::reportUnbound(), gem5::TimingResponseProtocol::sendResp(), and gem5::RiscvISA::succ.
Referenced by gem5::StubSlavePort::processResponseEvent(), gem5::TokenResponsePort::recvRespRetry(), gem5::SimpleCache::CPUSidePort::sendPacket(), gem5::SimpleMemobj::CPUSidePort::sendPacket(), gem5::TokenResponsePort::sendTimingResp(), gem5::Bridge::BridgeResponsePort::trySendTiming(), gem5::SerialLink::SerialLinkResponsePort::trySendTiming(), 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 475 of file port.hh.
References _requestPort, gem5::Port::reportUnbound(), and gem5::TimingResponseProtocol::sendSnoopReq().
|
inlineoverrideprotectedvirtual |
Availability request from the peer.
Implements gem5::TimingResponseProtocol.
Reimplemented in gem5::SysBridge::SysBridgeSourcePort.
Definition at line 533 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 |
Definition at line 350 of file port.hh.
References RequestPort.
Referenced by gem5::TokenResponsePort::bind(), RequestPort, and responderBind().
|
private |
Definition at line 353 of file port.hh.
Referenced by isSnooping(), responderBind(), responderUnbind(), ResponsePort(), ResponsePort(), sendAtomicSnoop(), sendFunctionalSnoop(), sendRangeChange(), sendRetryReq(), sendRetrySnoopResp(), sendTimingResp(), and sendTimingSnoopReq().
|
private |
Definition at line 355 of file port.hh.
Referenced by recvAtomicBackdoor(), recvMemBackdoorReq(), ResponsePort(), and ResponsePort().
|
protected |
Definition at line 358 of file port.hh.
Referenced by ResponsePort(), and ResponsePort().