gem5  v20.1.0.0
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 txDone().

◆ ~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.

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

◆ name()

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

Definition at line 111 of file etherlink.hh.

References objName.

◆ processTxQueue()

void EtherLink::Link::processTxQueue ( )
protected

Definition at line 159 of file etherlink.cc.

References curTick().

◆ serialize()

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

Definition at line 199 of file etherlink.cc.

References X86ISA::base, csprintf(), paramOut(), and X86ISA::pe.

Referenced by EtherLink::serialize().

◆ setRxInt()

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

Definition at line 117 of file etherlink.hh.

References ArmISA::i, and rxint.

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

◆ setTxInt()

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

Definition at line 116 of file etherlink.hh.

References ArmISA::i, and txint.

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

◆ transmit()

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

Definition at line 176 of file etherlink.cc.

References curTick(), DDUMP, DPRINTF, Random::random(), and random_mt.

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

◆ txComplete()

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

Definition at line 129 of file etherlink.cc.

References DDUMP, and DPRINTF.

◆ txDone()

void EtherLink::Link::txDone ( )
protected

Definition at line 137 of file etherlink.cc.

References curTick(), DPRINTF, and Stats::dump().

Referenced by Link().

◆ unserialize()

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

Definition at line 225 of file etherlink.cc.

References X86ISA::base, csprintf(), fatal_if, optParamIn(), paramIn(), and warn.

Referenced by EtherLink::unserialize().

Member Data Documentation

◆ delayVar

const Tick EtherLink::Link::delayVar
protected

Definition at line 83 of file etherlink.hh.

◆ doneEvent

EventFunctionWrapper EtherLink::Link::doneEvent
protected

Definition at line 92 of file etherlink.hh.

◆ dump

EtherDump* const EtherLink::Link::dump
protected

Definition at line 84 of file etherlink.hh.

◆ linkDelay

const Tick EtherLink::Link::linkDelay
protected

Definition at line 82 of file etherlink.hh.

◆ 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().

◆ parent

EtherLink* const EtherLink::Link::parent
protected

Definition at line 75 of file etherlink.hh.

◆ rxint

Interface* EtherLink::Link::rxint
protected

Definition at line 79 of file etherlink.hh.

Referenced by setRxInt().

◆ ticksPerByte

const double EtherLink::Link::ticksPerByte
protected

Definition at line 81 of file etherlink.hh.

◆ txint

Interface* EtherLink::Link::txint
protected

Definition at line 78 of file etherlink.hh.

Referenced by setTxInt().

◆ 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.

◆ txQueueEvent

EventFunctionWrapper EtherLink::Link::txQueueEvent
protected

Definition at line 102 of file etherlink.hh.


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

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