gem5
|
#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 Types | |
typedef EventWrapper< Link,&Link::txDone > | DoneEvent |
typedef EventWrapper< Link,&Link::processTxQueue > | TxQueueEvent |
Protected Member Functions | |
void | txDone () |
void | processTxQueue () |
void | txComplete (EthPacketPtr packet) |
Protected Attributes | |
const std::string | objName |
EtherLink *const | parent |
const int | number |
Interface * | txint |
Interface * | rxint |
const double | ticksPerByte |
const Tick | linkDelay |
const Tick | delayVar |
EtherDump *const | dump |
EthPacketPtr | packet |
DoneEvent | doneEvent |
std::deque< std::pair< Tick, EthPacketPtr > > | txQueue |
Maintain a queue of in-flight packets. More... | |
TxQueueEvent | txQueueEvent |
Friends | |
void | DoneEvent::process () |
void | TxQueueEvent::process () |
Definition at line 73 of file etherlink.hh.
|
protected |
Definition at line 95 of file etherlink.hh.
|
protected |
Definition at line 107 of file etherlink.hh.
EtherLink::Link::Link | ( | const std::string & | name, |
EtherLink * | p, | ||
int | num, | ||
double | rate, | ||
Tick | delay, | ||
Tick | delay_var, | ||
EtherDump * | dump | ||
) |
Definition at line 115 of file etherlink.cc.
|
inline |
Definition at line 116 of file etherlink.hh.
|
inline |
Definition at line 120 of file etherlink.hh.
References packet.
Referenced by EtherLink::Interface::isBusy().
|
inline |
Definition at line 118 of file etherlink.hh.
References objName.
|
protected |
Definition at line 167 of file etherlink.cc.
References curTick().
void EtherLink::Link::serialize | ( | const std::string & | base, |
CheckpointOut & | cp | ||
) | const |
Definition at line 207 of file etherlink.cc.
References csprintf(), paramOut(), and X86ISA::pe.
Referenced by EtherLink::serialize().
|
inline |
Definition at line 124 of file etherlink.hh.
References ArmISA::i, and rxint.
Referenced by EtherLink::Interface::Interface().
|
inline |
Definition at line 123 of file etherlink.hh.
References ArmISA::i, and txint.
Referenced by EtherLink::Interface::Interface().
bool EtherLink::Link::transmit | ( | EthPacketPtr | packet | ) |
Definition at line 184 of file etherlink.cc.
References curTick(), DDUMP, DPRINTF, Random::random(), and random_mt.
Referenced by EtherLink::Interface::recvPacket().
|
protected |
Definition at line 137 of file etherlink.cc.
|
protected |
Definition at line 145 of file etherlink.cc.
References curTick(), DPRINTF, and Stats::dump().
void EtherLink::Link::unserialize | ( | const std::string & | base, |
CheckpointIn & | cp | ||
) |
Definition at line 233 of file etherlink.cc.
References csprintf(), fatal_if(), optParamIn(), paramIn(), and warn.
Referenced by EtherLink::unserialize().
|
friend |
|
friend |
|
protected |
Definition at line 86 of file etherlink.hh.
|
protected |
Definition at line 97 of file etherlink.hh.
|
protected |
Definition at line 87 of file etherlink.hh.
|
protected |
Definition at line 85 of file etherlink.hh.
|
protected |
Definition at line 79 of file etherlink.hh.
|
protected |
Definition at line 76 of file etherlink.hh.
Referenced by name().
|
protected |
Definition at line 93 of file etherlink.hh.
Referenced by busy().
|
protected |
Definition at line 78 of file etherlink.hh.
|
protected |
Definition at line 82 of file etherlink.hh.
Referenced by setRxInt().
|
protected |
Definition at line 84 of file etherlink.hh.
|
protected |
Definition at line 81 of file etherlink.hh.
Referenced by setTxInt().
|
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 104 of file etherlink.hh.
|
protected |
Definition at line 109 of file etherlink.hh.