gem5  v20.1.0.0
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
Port Class Reference

Ports are used to interface objects to each other. More...

#include <port.hh>

Inheritance diagram for Port:
EtherInt IntSinkPinBase IntSourcePinBase RequestPort ResponsePort RubyDummyPort DistEtherLink::LocalIface EtherLink::Interface EtherSwitch::Interface EtherTapInt IGbEInt NSGigEInt Sinic::Interface IntSinkPin< Device > IntSinkPin< X86ISA::I82094AA > IntSinkPin< X86ISA::I8259 > IntSourcePin< Device > IntSourcePin< X86ISA::Cmos::X86RTC > IntSourcePin< X86ISA::I8042 > IntSourcePin< X86ISA::I8254 > IntSourcePin< X86ISA::I8259 > AbstractController::MemoryPort AddrMapper::MapperRequestPort AtomicSimpleCPU::AtomicCPUPort BaseKvmCPU::KVMCpuPort BaseTrafficGen::TrafficGenPort Bridge::BridgeRequestPort CoherentXBar::CoherentXBarRequestPort CoherentXBar::SnoopRespPort CommMonitor::MonitorRequestPort ComputeUnit::DataPort ComputeUnit::DTLBPort ComputeUnit::ITLBPort ComputeUnit::LDSPort ComputeUnit::ScalarDataPort ComputeUnit::ScalarDTLBPort ComputeUnit::SQCPort DefaultFetch< Impl >::IcachePort DmaPort ExternalMaster::ExternalPort GarnetSyntheticTraffic::CpuPort Gicv3Its::DataPort LSQ< Impl >::DcachePort MasterPort MemCheckerMonitor::MonitorRequestPort MemTest::CpuPort MinorCPU::MinorCPUPort NoncoherentXBar::NoncoherentXBarRequestPort QueuedRequestPort RiscvISA::Walker::WalkerPort RubyDirectedTester::CpuPort RubyTester::CpuPort sc_gem5::TlmToGem5Bridge< BITWIDTH >::BridgeRequestPort SerialLink::SerialLinkRequestPort SimpleCache::MemSidePort SimpleMemobj::MemSidePort SMMURequestPort SMMUTableWalkPort System::SystemPort TimingSimpleCPU::TimingCPUPort TLBCoalescer::MemSidePort TokenRequestPort TraceCPU::DcachePort TraceCPU::IcachePort X86ISA::GpuTLB::MemSidePort X86ISA::Walker::WalkerPort AddrMapper::MapperResponsePort Bridge::BridgeResponsePort CommMonitor::MonitorResponsePort DRAMSim2::MemoryPort DRAMsim3::MemoryPort LdsState::CuSidePort MemCheckerMonitor::MonitorResponsePort QueuedResponsePort sc_gem5::Gem5ToTlmBridge< BITWIDTH >::BridgeResponsePort SerialLink::SerialLinkResponsePort SimpleCache::CPUSidePort SimpleMemobj::CPUSidePort SimpleMemory::MemoryPort SlavePort TLBCoalescer::CpuSidePort TokenResponsePort X86ISA::GpuTLB::CpuSidePort


class  UnboundPortException

Public Member Functions

virtual ~Port ()
 Virtual destructor due to inheritance. More...
PortgetPeer ()
 Return a reference to this port's peer. More...
const std::string name () const
 Return port name (for DPRINTF). More...
PortID getId () const
 Get the port id. More...
virtual void bind (Port &peer)
 Attach to a peer port. More...
virtual void unbind ()
 Dettach from a peer port. More...
bool isConnected () const
 Is this port currently connected to a peer? More...
void takeOverFrom (Port *old)
 A utility function to make it easier to swap out ports. More...

Protected Member Functions

void reportUnbound () const
 Port (const std::string &_name, PortID _id)
 Abstract base class for ports. More...

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. More...
 A pointer to this port's peer. More...
bool _connected
 Whether this port is currently connected to a peer port. More...

Private Attributes

const std::string portName
 Descriptive name (for DPRINTF output) More...

Detailed Description

Ports are used to interface objects to each other.

Definition at line 56 of file port.hh.

Constructor & Destructor Documentation

◆ Port()

Port::Port ( const std::string &  _name,
PortID  _id 

Abstract base class for ports.

_namePort name including the owners name
_idA port identifier for vector ports

Definition at line 50 of file

◆ ~Port()

Port::~Port ( )

Virtual destructor due to inheritance.

Definition at line 53 of file

Member Function Documentation

◆ bind()

virtual void Port::bind ( Port peer)

◆ getId()

PortID Port::getId ( ) const

Get the port id.

Definition at line 109 of file port.hh.

References id.

Referenced by SnoopFilter::portToMask().

◆ getPeer()

Port& Port::getPeer ( )

◆ isConnected()

bool Port::isConnected ( ) const

◆ name()

const std::string Port::name ( ) const

◆ reportUnbound()

void Port::reportUnbound ( ) const

◆ takeOverFrom()

void Port::takeOverFrom ( Port old)

A utility function to make it easier to swap out ports.

Definition at line 132 of file port.hh.

References bind(), getPeer(), isConnected(), and unbind().

Referenced by TraceCPU::takeOverFrom(), and BaseCPU::takeOverFrom().

◆ unbind()

virtual void Port::unbind ( )

Member Data Documentation

◆ _connected

bool Port::_connected

Whether this port is currently connected to a peer port.

Definition at line 85 of file port.hh.

Referenced by EtherInt::bind(), bind(), isConnected(), EtherInt::unbind(), and unbind().

◆ _peer

Port* Port::_peer

A pointer to this port's peer.

Definition at line 79 of file port.hh.

Referenced by bind(), getPeer(), and unbind().

◆ id

const PortID Port::id

A numeric identifier to distinguish ports in a vector, and set to InvalidPortID in case this port is not part of a vector.

Definition at line 74 of file port.hh.

Referenced by getId().

◆ portName

const std::string Port::portName

Descriptive name (for DPRINTF output)

Definition at line 62 of file port.hh.

Referenced by name().

The documentation for this class was generated from the following files:

Generated on Wed Sep 30 2020 14:02:29 for gem5 by doxygen 1.8.17