Go to the documentation of this file.
48 #ifndef __DEV_DIST_ETHERLINK_HH__
49 #define __DEV_DIST_ETHERLINK_HH__
54 #include "params/DistEtherLink.hh"
227 virtual void init()
override;
228 virtual void startup()
override;
234 #endif // __DEV_DIST_ETHERLINK_HH__
virtual void sendDone()=0
Tick delayVar
Random component of the send delay.
The interface class to talk to peer gem5 processes.
Model for a receive link.
const PortID InvalidPortID
DistEtherLink(const Params *p)
Interface to the local simulated system.
void rxDone()
Receive done callback method.
Basic support for object serialization.
Model base class for a single uni-directional link.
uint64_t Tick
Tick count type.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
bool recvPacket(EthPacketPtr pkt)
void serialize(CheckpointOut &cp) const override
Serialize an object.
LocalIface(const std::string &name, TxLink *tx, RxLink *rx, DistIface *m)
double ticksPerByte
Per byte send delay.
RxLink * rxLink
Receive link.
RxLink(const std::string &name, DistEtherLink *p, Tick delay, EtherDump *d)
void txDone()
Send done callback.
void setLocalInt(LocalIface *i)
void setDistInt(DistIface *m)
Register the dist interface to be used to talk to the peer gem5 processes.
virtual void startup() override
startup() is the final initialization call before simulation.
Ports are used to interface objects to each other.
const std::string name() const
EventFunctionWrapper _doneEvent
void setDistInt(DistIface *m)
Register our dist interface to talk to the peer gem5 processes.
DistEtherLinkParams Params
void serialize(CheckpointOut &cp) const override
Serialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
bool transmit(EthPacketPtr packet)
Initiate sending of a packet via this link.
TxLink(const std::string &name, DistEtherLink *p, double invBW, Tick delay_var, EtherDump *d)
Model for a fixed bandwidth full duplex ethernet link.
std::shared_ptr< EthPacketData > EthPacketPtr
Tick linkDelay
Transmission delay for the simulated Ethernet link.
TxLink * txLink
Send link.
const std::string & name() const
Return port name (for DPRINTF).
const SimObjectParams * _params
Cached copy of the object parameters.
const Params * params() const
virtual void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
DistIface * distIface
Interface to talk to the peer gem5 processes.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
std::ostream CheckpointOut
const EventFunctionWrapper * doneEvent() const
Done events will be scheduled by DistIface (so we need the accessor)
Link(const std::string &name, DistEtherLink *p, EtherDump *d, Event *e)
EventFunctionWrapper doneEvent
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17