gem5  v20.0.0.3
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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 70 of file etherlink.hh.

Constructor & Destructor Documentation

◆ Link()

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

Definition at line 106 of file etherlink.cc.

References name(), processTxQueue(), txDone(), and txQueueEvent.

◆ ~Link()

EtherLink::Link::~Link ( )
inline

Definition at line 109 of file etherlink.hh.

Member Function Documentation

◆ busy()

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

Definition at line 113 of file etherlink.hh.

References packet, and transmit().

Referenced by EtherLink::Interface::isBusy(), transmit(), and txDone().

◆ name()

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

Definition at line 111 of file etherlink.hh.

References objName.

Referenced by Link().

◆ processTxQueue()

void EtherLink::Link::processTxQueue ( )
protected

Definition at line 159 of file etherlink.cc.

References curTick(), parent, EventManager::schedule(), txComplete(), txQueue, and txQueueEvent.

Referenced by Link().

◆ serialize()

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

◆ setRxInt()

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

Definition at line 117 of file etherlink.hh.

References X86ISA::base, ArmISA::i, serialize(), and unserialize().

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

◆ setTxInt()

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

Definition at line 116 of file etherlink.hh.

References ArmISA::i.

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

◆ transmit()

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

◆ txComplete()

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

Definition at line 129 of file etherlink.cc.

References DDUMP, DPRINTF, rxint, and EtherInt::sendPacket().

Referenced by processTxQueue(), and txDone().

◆ txDone()

void EtherLink::Link::txDone ( )
protected

◆ unserialize()

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

Member Data Documentation

◆ delayVar

const Tick EtherLink::Link::delayVar
protected

Definition at line 83 of file etherlink.hh.

Referenced by transmit().

◆ doneEvent

EventFunctionWrapper EtherLink::Link::doneEvent
protected

Definition at line 92 of file etherlink.hh.

Referenced by serialize(), transmit(), and unserialize().

◆ dump

EtherDump* const EtherLink::Link::dump
protected

Definition at line 84 of file etherlink.hh.

Referenced by txDone().

◆ linkDelay

const Tick EtherLink::Link::linkDelay
protected

Definition at line 82 of file etherlink.hh.

Referenced by txDone().

◆ number

const int EtherLink::Link::number
protected

Definition at line 76 of file etherlink.hh.

◆ objName

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

Definition at line 73 of file etherlink.hh.

Referenced by name().

◆ packet

EthPacketPtr EtherLink::Link::packet
protected

Definition at line 90 of file etherlink.hh.

Referenced by busy(), serialize(), transmit(), txDone(), and unserialize().

◆ parent

EtherLink* const EtherLink::Link::parent
protected

Definition at line 75 of file etherlink.hh.

Referenced by processTxQueue(), transmit(), txDone(), and unserialize().

◆ rxint

Interface* EtherLink::Link::rxint
protected

Definition at line 79 of file etherlink.hh.

Referenced by txComplete().

◆ ticksPerByte

const double EtherLink::Link::ticksPerByte
protected

Definition at line 81 of file etherlink.hh.

Referenced by transmit().

◆ txint

Interface* EtherLink::Link::txint
protected

Definition at line 78 of file etherlink.hh.

Referenced by txDone().

◆ txQueue

std::deque<std::pair<Tick, EthPacketPtr> > 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 99 of file etherlink.hh.

Referenced by processTxQueue(), serialize(), txDone(), and unserialize().

◆ txQueueEvent

EventFunctionWrapper EtherLink::Link::txQueueEvent
protected

Definition at line 102 of file etherlink.hh.

Referenced by Link(), processTxQueue(), txDone(), and unserialize().


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

Generated on Fri Jul 3 2020 15:53:13 for gem5 by doxygen 1.8.13