gem5  v21.1.0.2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gem5::EtherLink::Link Class Reference

#include <etherlink.hh>

Public Member Functions

 Link (const std::string &name, EtherLink *p, int num, double rate, Tick delay, Tick delay_var, EtherDump *dump)
 
 ~Link ()
 
const std::string name () const
 
bool busy () const
 
bool transmit (EthPacketPtr packet)
 
void setTxInt (Interface *i)
 
void setRxInt (Interface *i)
 
void serialize (const std::string &base, CheckpointOut &cp) const
 
void unserialize (const std::string &base, CheckpointIn &cp)
 

Protected Member Functions

void txDone ()
 
void processTxQueue ()
 
void txComplete (EthPacketPtr packet)
 

Protected Attributes

const std::string objName
 
EtherLink *const parent
 
const int number
 
Interfacetxint
 
Interfacerxint
 
const double ticksPerByte
 
const Tick linkDelay
 
const Tick delayVar
 
EtherDump *const dump
 
EthPacketPtr packet
 
EventFunctionWrapper doneEvent
 
std::deque< std::pair< Tick, EthPacketPtr > > txQueue
 Maintain a queue of in-flight packets. More...
 
EventFunctionWrapper txQueueEvent
 

Detailed Description

Definition at line 74 of file etherlink.hh.

Constructor & Destructor Documentation

◆ Link()

gem5::EtherLink::Link::Link ( const std::string &  name,
EtherLink p,
int  num,
double  rate,
Tick  delay,
Tick  delay_var,
EtherDump dump 
)

Definition at line 109 of file etherlink.cc.

References txDone().

◆ ~Link()

gem5::EtherLink::Link::~Link ( )
inline

Definition at line 113 of file etherlink.hh.

Member Function Documentation

◆ busy()

bool gem5::EtherLink::Link::busy ( ) const
inline

Definition at line 117 of file etherlink.hh.

References packet.

Referenced by gem5::EtherLink::Interface::isBusy().

◆ name()

const std::string gem5::EtherLink::Link::name ( ) const
inline

Definition at line 115 of file etherlink.hh.

References objName.

◆ processTxQueue()

void gem5::EtherLink::Link::processTxQueue ( )
protected

Definition at line 162 of file etherlink.cc.

References gem5::curTick().

◆ serialize()

void gem5::EtherLink::Link::serialize ( const std::string &  base,
CheckpointOut cp 
) const

◆ setRxInt()

void gem5::EtherLink::Link::setRxInt ( Interface i)
inline

Definition at line 121 of file etherlink.hh.

References gem5::ArmISA::i, and rxint.

Referenced by gem5::EtherLink::Interface::Interface().

◆ setTxInt()

void gem5::EtherLink::Link::setTxInt ( Interface i)
inline

Definition at line 120 of file etherlink.hh.

References gem5::ArmISA::i, and txint.

Referenced by gem5::EtherLink::Interface::Interface().

◆ transmit()

bool gem5::EtherLink::Link::transmit ( EthPacketPtr  packet)

◆ txComplete()

void gem5::EtherLink::Link::txComplete ( EthPacketPtr  packet)
protected

Definition at line 132 of file etherlink.cc.

References DDUMP, and DPRINTF.

◆ txDone()

void gem5::EtherLink::Link::txDone ( )
protected

Definition at line 140 of file etherlink.cc.

References gem5::curTick(), DPRINTF, and gem5::statistics::dump().

Referenced by Link().

◆ unserialize()

void gem5::EtherLink::Link::unserialize ( const std::string &  base,
CheckpointIn cp 
)

Member Data Documentation

◆ delayVar

const Tick gem5::EtherLink::Link::delayVar
protected

Definition at line 87 of file etherlink.hh.

◆ doneEvent

EventFunctionWrapper gem5::EtherLink::Link::doneEvent
protected

Definition at line 96 of file etherlink.hh.

◆ dump

EtherDump* const gem5::EtherLink::Link::dump
protected

Definition at line 88 of file etherlink.hh.

◆ linkDelay

const Tick gem5::EtherLink::Link::linkDelay
protected

Definition at line 86 of file etherlink.hh.

◆ number

const int gem5::EtherLink::Link::number
protected

Definition at line 80 of file etherlink.hh.

◆ objName

const std::string gem5::EtherLink::Link::objName
protected

Definition at line 77 of file etherlink.hh.

Referenced by name().

◆ packet

EthPacketPtr gem5::EtherLink::Link::packet
protected

Definition at line 94 of file etherlink.hh.

Referenced by busy().

◆ parent

EtherLink* const gem5::EtherLink::Link::parent
protected

Definition at line 79 of file etherlink.hh.

◆ rxint

Interface* gem5::EtherLink::Link::rxint
protected

Definition at line 83 of file etherlink.hh.

Referenced by setRxInt().

◆ ticksPerByte

const double gem5::EtherLink::Link::ticksPerByte
protected

Definition at line 85 of file etherlink.hh.

◆ txint

Interface* gem5::EtherLink::Link::txint
protected

Definition at line 82 of file etherlink.hh.

Referenced by setTxInt().

◆ txQueue

std::deque<std::pair<Tick, EthPacketPtr> > gem5::EtherLink::Link::txQueue
protected

Maintain a queue of in-flight packets.

Assume that the delay is non-zero and constant (i.e., at most one packet per tick).

Definition at line 103 of file etherlink.hh.

◆ txQueueEvent

EventFunctionWrapper gem5::EtherLink::Link::txQueueEvent
protected

Definition at line 106 of file etherlink.hh.


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

Generated on Tue Sep 21 2021 12:27:31 for gem5 by doxygen 1.8.17