50 #ifndef __DEV_DIST_ETHERLINK_HH__
51 #define __DEV_DIST_ETHERLINK_HH__
56 #include "params/DistEtherLink.hh"
233 virtual void init()
override;
234 virtual void startup()
override;
240 #endif // __DEV_DIST_ETHERLINK_HH__
Model for a receive link.
bool recvPacket(EthPacketPtr pkt)
void serialize(CheckpointOut &cp) const override
Serialize an object.
Tick linkDelay
Transmission delay for the simulated Ethernet link.
DistEtherLink(const Params *p)
TxLink * txLink
Send link.
virtual EtherInt * getEthPort(const std::string &if_name, int idx) override
Additional function to return the Port of a memory object.
DistEtherLinkParams Params
Tick delayVar
Random component of the send delay.
void setDistInt(DistIface *m)
Register our dist interface to talk to the peer gem5 processes.
DistIface * distIface
Interface to talk to the peer gem5 processes.
void setLocalInt(LocalIface *i)
EventWrapper< TxLink,&TxLink::txDone > DoneEvent
uint64_t Tick
Tick count type.
Link(const std::string &name, DistEtherLink *p, EtherDump *d, Event *e)
void setDistInt(DistIface *m)
Register the dist interface to be used to talk to the peer gem5 processes.
Model for a fixed bandwidth full duplex ethernet link.
const std::string name() const
const DoneEvent * doneEvent() const
Done events will be scheduled by DistIface (so we need the accessor)
virtual void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
RxLink(const std::string &name, DistEtherLink *p, Tick delay, EtherDump *d)
std::shared_ptr< EthPacketData > EthPacketPtr
void serialize(CheckpointOut &cp) const override
Serialize an object.
Model base class for a single uni-directional link.
Basic support for object serialization.
The base EtherObject class, allows for an accesor function to a simobj that returns the Port...
virtual void startup() override
startup() is the final initialization call before simulation.
Interface to the local simulated system.
std::ostream CheckpointOut
void unserialize(CheckpointIn &cp) override
Unserialize an object.
const Params * params() const
const SimObjectParams * _params
Cached copy of the object parameters.
RxLink * rxLink
Receive link.
const std::string & name() const
Return port name (for DPRINTF).
virtual void sendDone()=0
double ticksPerByte
Per byte send delay.
EventWrapper< RxLink,&RxLink::rxDone > DoneEvent
LocalIface(const std::string &name, TxLink *tx, RxLink *rx, DistIface *m)
void txDone()
Send done callback.
void rxDone()
Receive done callback method.
The interface class to talk to peer gem5 processes.
TxLink(const std::string &name, DistEtherLink *p, double invBW, Tick delay_var, EtherDump *d)
void unserialize(CheckpointIn &cp) override
Unserialize an object.
bool transmit(EthPacketPtr packet)
Initiate sending of a packet via this link.