gem5  v22.0.0.2
Public Member Functions | Protected Attributes | List of all members
gem5::EtherInt Class Referenceabstract

#include <etherint.hh>

Inheritance diagram for gem5::EtherInt:
gem5::Port gem5::DistEtherLink::LocalIface gem5::EtherLink::Interface gem5::EtherSwitch::Interface gem5::EtherTapInt gem5::IGbEInt gem5::NSGigEInt gem5::sinic::Interface

Public Member Functions

 EtherInt (const std::string &name, int idx=InvalidPortID)
virtual ~EtherInt ()
const std::string & name () const
 Return port name (for DPRINTF). More...
void bind (Port &peer) override
 Attach to a peer port. More...
void unbind () override
 Dettach from a peer port. More...
void setPeer (EtherInt *p)
EtherIntgetPeer ()
void recvDone ()
virtual void sendDone ()=0
bool sendPacket (EthPacketPtr packet)
virtual bool recvPacket (EthPacketPtr packet)=0
bool askBusy ()
virtual bool isBusy ()
- Public Member Functions inherited from gem5::Port
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...
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 Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from gem5::Port
void reportUnbound () const
 Port (const std::string &_name, PortID _id)
 Abstract base class for ports. More...

Detailed Description

Definition at line 50 of file etherint.hh.

Constructor & Destructor Documentation

◆ EtherInt()

gem5::EtherInt::EtherInt ( const std::string &  name,
int  idx = InvalidPortID 

Definition at line 57 of file etherint.hh.

◆ ~EtherInt()

virtual gem5::EtherInt::~EtherInt ( )

Definition at line 59 of file etherint.hh.

Member Function Documentation

◆ askBusy()

bool gem5::EtherInt::askBusy ( )

Definition at line 77 of file etherint.hh.

References isBusy(), and peer.

◆ bind()

void gem5::EtherInt::bind ( Port peer)

Attach to a peer port.

Reimplemented from gem5::Port.

Definition at line 38 of file

References gem5::Port::_connected, fatal, name(), gem5::VegaISA::p, peer, and setPeer().

◆ getPeer()

EtherInt* gem5::EtherInt::getPeer ( )

Definition at line 68 of file etherint.hh.

References peer.

◆ isBusy()

virtual bool gem5::EtherInt::isBusy ( )

Reimplemented in gem5::DistEtherLink::LocalIface, and gem5::EtherLink::Interface.

Definition at line 78 of file etherint.hh.

Referenced by askBusy().

◆ name()

const std::string& gem5::EtherInt::name ( ) const

Return port name (for DPRINTF).

Definition at line 62 of file etherint.hh.

References portName.

Referenced by bind(), gem5::EtherSwitch::Interface::learnSenderAddr(), gem5::EtherSwitch::Interface::recvPacket(), and setPeer().

◆ recvDone()

void gem5::EtherInt::recvDone ( )

Definition at line 70 of file etherint.hh.

References peer, and sendDone().

Referenced by gem5::EtherTapBase::recvSimulated().

◆ recvPacket()

virtual bool gem5::EtherInt::recvPacket ( EthPacketPtr  packet)
pure virtual

◆ sendDone()

virtual void gem5::EtherInt::sendDone ( )
pure virtual

◆ sendPacket()

bool gem5::EtherInt::sendPacket ( EthPacketPtr  packet)

◆ setPeer()

void gem5::EtherInt::setPeer ( EtherInt p)

Definition at line 57 of file

References name(), gem5::VegaISA::p, panic, and peer.

Referenced by bind().

◆ unbind()

void gem5::EtherInt::unbind ( )

Dettach from a peer port.

Reimplemented from gem5::Port.

Definition at line 50 of file

References gem5::Port::_connected, and peer.

Member Data Documentation

◆ peer

EtherInt* gem5::EtherInt::peer

◆ portName

std::string gem5::EtherInt::portName

Definition at line 53 of file etherint.hh.

Referenced by name().

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

Generated on Thu Jul 28 2022 13:33:01 for gem5 by doxygen 1.8.17