gem5 v24.0.0.0
|
Ports are used to interface objects to each other. More...
#include <port.hh>
Classes | |
class | UnboundPortException |
Public Member Functions | |
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 | reportUnbound () const |
Port (const std::string &_name, PortID _id) | |
Abstract base class for ports. | |
Protected Attributes | |
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 | |
const std::string | portName |
Descriptive name (for DPRINTF output) | |
|
protected |
|
virtual |
|
inlinevirtual |
Attach to a peer port.
Reimplemented in gem5::EtherInt, gem5::RequestPort, gem5::ResponsePort, gem5::ruby::RubyDummyPort, gem5::SignalSinkPort< State >, gem5::SignalSinkPort< bool >, gem5::SignalSourcePort< State >, gem5::SignalSourcePort< bool >, gem5::TokenRequestPort, gem5::TokenResponsePort, sc_gem5::ScExportWrapper< IF >, sc_gem5::ScInterfaceWrapper< IF >, sc_gem5::ScPortWrapper< IF >, sc_gem5::TlmInitiatorBaseWrapper< BUSWIDTH, FW_IF, BW_IF, N, POL >, sc_gem5::TlmInitiatorBaseWrapper< 64 >, sc_gem5::TlmInitiatorBaseWrapper< 64, amba_pv::amba_pv_protocol_types >, sc_gem5::TlmInitiatorBaseWrapper< BITWIDTH >, sc_gem5::TlmTargetBaseWrapper< BUSWIDTH, FW_IF, BW_IF, N, POL >, sc_gem5::TlmTargetBaseWrapper< 64 >, sc_gem5::TlmTargetBaseWrapper< 64, amba_pv::amba_pv_protocol_types >, and sc_gem5::TlmTargetBaseWrapper< BITWIDTH >.
Definition at line 118 of file port.hh.
References _connected, and _peer.
Referenced by gem5::SignalSinkPort< State >::bind(), gem5::SignalSourcePort< State >::bind(), sc_gem5::ScExportWrapper< IF >::bind(), sc_gem5::ScInterfaceWrapper< IF >::bind(), sc_gem5::ScPortWrapper< IF >::bind(), sc_gem5::TlmInitiatorBaseWrapper< BUSWIDTH, FW_IF, BW_IF, N, POL >::bind(), sc_gem5::TlmTargetBaseWrapper< BUSWIDTH, FW_IF, BW_IF, N, POL >::bind(), gem5::CxxConfigManager::bindPort(), gem5::ResponsePort::responderBind(), takeOverFrom(), TEST(), and TEST().
|
inline |
Get the port id.
Definition at line 114 of file port.hh.
References id.
Referenced by gem5::SnoopFilter::portToMask(), and TEST().
|
inline |
Return a reference to this port's peer.
Definition at line 108 of file port.hh.
References _peer.
Referenced by gem5::SMMUv3DeviceInterface::recvAtomic(), gem5::X86ISA::IntResponsePort< Device >::recvAtomic(), gem5::SMMUv3DeviceInterface::recvTimingReq(), gem5::SMMUv3DeviceInterface::sendRange(), takeOverFrom(), TEST(), and TEST().
|
inline |
Is this port currently connected to a peer?
Definition at line 133 of file port.hh.
References _connected.
Referenced by gem5::CxxConfigManager::bindPort(), gem5::AddrMapper::init(), gem5::BaseCache::init(), gem5::BaseTrafficGen::init(), gem5::Bridge::init(), gem5::CommMonitor::init(), gem5::DmaDevice::init(), gem5::ExternalMaster::init(), gem5::ExternalSlave::init(), gem5::MemCheckerMonitor::init(), gem5::MemDelay::init(), gem5::memory::CfiMemory::init(), gem5::memory::DRAMSim2::init(), gem5::memory::DRAMsim3::init(), gem5::memory::MemCtrl::init(), gem5::memory::qos::MemSinkCtrl::init(), gem5::memory::SimpleMemory::init(), gem5::OutgoingRequestBridge::init(), gem5::SerialLink::init(), gem5::SMMUv3::init(), gem5::fastmodel::ResetControllerExample::Registers::Registers(), gem5::SMMUv3DeviceInterface::sendRange(), gem5::BaseCPU::takeOverFrom(), gem5::o3::Fetch::takeOverFrom(), takeOverFrom(), TEST(), TEST(), TEST(), TEST(), TEST(), and gem5::RequestPort::unbind().
|
inline |
Return port name (for DPRINTF).
Definition at line 111 of file port.hh.
References portName.
Referenced by gem5::TokenRequestPort::acquireTokens(), gem5::RequestPort::addTrace(), gem5::SignalSinkPort< State >::bind(), gem5::SignalSourcePort< State >::bind(), gem5::TokenResponsePort::bind(), sc_gem5::ScExportWrapper< IF >::bind(), sc_gem5::ScInterfaceWrapper< IF >::bind(), sc_gem5::ScPortWrapper< IF >::bind(), sc_gem5::TlmInitiatorBaseWrapper< BUSWIDTH, FW_IF, BW_IF, N, POL >::bind(), gem5::TokenRequestPort::haveTokens(), gem5::SnoopFilter::lookupRequest(), gem5::ReqPacketQueue::name(), gem5::RespPacketQueue::name(), gem5::SnoopRespPacketQueue::name(), gem5::operator<<(), gem5::X86ISA::IntResponsePort< Device >::recvAtomic(), gem5::ResponsePort::recvAtomicBackdoor(), gem5::RequestPort::recvAtomicSnoop(), gem5::RequestPort::recvFunctionalSnoop(), gem5::ResponsePort::recvMemBackdoorReq(), gem5::ProtocolTester::SeqPort::recvReqRetry(), gem5::RubyDirectedTester::CpuPort::recvReqRetry(), gem5::RubyTester::CpuPort::recvReqRetry(), gem5::RequestPort::recvRetrySnoopResp(), gem5::CoherentXBar::recvTimingReq(), gem5::HMCController::recvTimingReq(), gem5::NoncoherentXBar::recvTimingReq(), gem5::CoherentXBar::recvTimingResp(), gem5::NoncoherentXBar::recvTimingResp(), gem5::ruby::RubyPort::MemRequestPort::recvTimingResp(), gem5::RequestPort::recvTimingSnoopReq(), gem5::CoherentXBar::recvTimingSnoopResp(), gem5::ResponsePort::recvTimingSnoopResp(), gem5::TokenRequestPort::recvTokens(), gem5::fastmodel::ResetControllerExample::Registers::Registers(), reportUnbound(), gem5::ResponsePort::tryTiming(), gem5::RequestPort::unbind(), gem5::SnoopFilter::updateResponse(), gem5::SnoopFilter::updateSnoopForward(), and gem5::SnoopFilter::updateSnoopResponse().
|
protected |
Definition at line 60 of file port.cc.
Referenced by gem5::RequestPort::sendAtomic(), gem5::RequestPort::sendAtomicBackdoor(), gem5::ResponsePort::sendAtomicSnoop(), gem5::RequestPort::sendFunctional(), gem5::ResponsePort::sendFunctionalSnoop(), gem5::RequestPort::sendMemBackdoorReq(), gem5::ResponsePort::sendRetryReq(), gem5::RequestPort::sendRetryResp(), gem5::ResponsePort::sendRetrySnoopResp(), gem5::RequestPort::sendTimingReq(), gem5::ResponsePort::sendTimingResp(), gem5::ResponsePort::sendTimingSnoopReq(), gem5::RequestPort::sendTimingSnoopResp(), and gem5::RequestPort::tryTiming().
|
inline |
A utility function to make it easier to swap out ports.
Definition at line 137 of file port.hh.
References bind(), getPeer(), isConnected(), and unbind().
Referenced by gem5::BaseCPU::takeOverFrom(), gem5::BaseMMU::takeOverFrom(), and TEST().
|
inlinevirtual |
Dettach from a peer port.
Reimplemented in gem5::EtherInt, gem5::RequestPort, gem5::ResponsePort, gem5::ruby::RubyDummyPort, gem5::SignalSinkPort< State >, gem5::SignalSinkPort< bool >, gem5::SignalSourcePort< State >, gem5::SignalSourcePort< bool >, gem5::TokenRequestPort, gem5::TokenResponsePort, sc_gem5::ScExportWrapper< IF >, sc_gem5::ScInterfaceWrapper< IF >, sc_gem5::ScPortWrapper< IF >, sc_gem5::TlmInitiatorBaseWrapper< BUSWIDTH, FW_IF, BW_IF, N, POL >, sc_gem5::TlmInitiatorBaseWrapper< 64 >, sc_gem5::TlmInitiatorBaseWrapper< 64, amba_pv::amba_pv_protocol_types >, sc_gem5::TlmInitiatorBaseWrapper< BITWIDTH >, sc_gem5::TlmTargetBaseWrapper< BUSWIDTH, FW_IF, BW_IF, N, POL >, sc_gem5::TlmTargetBaseWrapper< 64 >, sc_gem5::TlmTargetBaseWrapper< 64, amba_pv::amba_pv_protocol_types >, and sc_gem5::TlmTargetBaseWrapper< BITWIDTH >.
Definition at line 126 of file port.hh.
References _connected, and _peer.
Referenced by gem5::ResponsePort::responderUnbind(), takeOverFrom(), TEST(), gem5::RequestPort::unbind(), gem5::SignalSinkPort< State >::unbind(), and gem5::SignalSourcePort< State >::unbind().
|
protected |
Whether this port is currently connected to a peer port.
Definition at line 90 of file port.hh.
Referenced by gem5::EtherInt::bind(), bind(), isConnected(), gem5::EtherInt::unbind(), and unbind().
|
protected |
|
protected |
|
private |