46#ifndef __SIM_PORT_HH__
47#define __SIM_PORT_HH__
155static inline std::ostream &
156operator << (std::ostream &
os,
const Port &port)
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Ports are used to interface objects to each other.
Port & getPeer()
Return a reference to this port's peer.
const PortID id
A numeric identifier to distinguish ports in a vector, and set to InvalidPortID in case this port is ...
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.
const std::string name() const
Return port name (for DPRINTF).
bool _connected
Whether this port is currently connected to a peer port.
virtual ~Port()
Virtual destructor due to inheritance.
Port * _peer
A pointer to this port's peer.
virtual void unbind()
Dettach from a peer port.
const std::string portName
Descriptive name (for DPRINTF output)
virtual void bind(Port &peer)
Attach to a peer port.
PortID getId() const
Get the port id.
void reportUnbound() const
Copyright (c) 2024 Arm Limited All rights reserved.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.