45#ifndef __DEV_NET_ETHERLINK_HH__
46#define __DEV_NET_ETHERLINK_HH__
54#include "params/EtherLink.hh"
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
virtual void sendDone()=0
const std::string & name() const
Return port name (for DPRINTF).
bool recvPacket(EthPacketPtr packet)
Interface(const std::string &name, Link *txlink, Link *rxlink)
void unserialize(const std::string &base, CheckpointIn &cp)
const std::string objName
void serialize(const std::string &base, CheckpointOut &cp) const
Link(const std::string &name, EtherLink *p, int num, double rate, Tick delay, Tick delay_var, EtherDump *dump)
std::deque< std::pair< Tick, EthPacketPtr > > txQueue
Maintain a queue of in-flight packets.
EventFunctionWrapper txQueueEvent
const double ticksPerByte
const std::string name() const
bool transmit(EthPacketPtr packet)
void setRxInt(Interface *i)
void setTxInt(Interface *i)
EventFunctionWrapper doneEvent
void txComplete(EthPacketPtr packet)
EtherLink(const Params &p)
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void serialize(CheckpointOut &cp) const override
Serialize an object.
Ports are used to interface objects to each other.
Abstract superclass for simulation objects.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const PortID InvalidPortID
std::ostream CheckpointOut
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
std::shared_ptr< EthPacketData > EthPacketPtr