gem5
v20.1.0.0
|
Class to encapsulate information about data packets received. More...
Classes | |
struct | Desc |
Received packet descriptor. More... | |
Public Member Functions | |
RecvScheduler (EventManager *em) | |
Scheduler for the incoming data packets. More... | |
void | init (Event *recv_done, Tick link_delay) |
Initialize network link parameters. More... | |
EthPacketPtr | popPacket () |
Fetch the next packet that is to be received by the simulated network link. More... | |
void | pushPacket (EthPacketPtr new_packet, Tick send_tick, Tick send_delay) |
Push a newly arrived packet into the desc queue. More... | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
void | resumeRecvTicks () |
Adjust receive ticks for pending packets when restoring from a checkpoint. More... | |
Public Member Functions inherited from Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Private Member Functions | |
Tick | calcReceiveTick (Tick send_tick, Tick send_delay, Tick prev_recv_tick) |
Calculate the tick to schedule the next receive done event. More... | |
Private Attributes | |
std::queue< Desc > | descQueue |
The queue to store the receive descriptors. More... | |
Tick | prevRecvTick |
The tick when the most recent receive event was processed. More... | |
Event * | recvDone |
The receive done event for the simulated Ethernet link. More... | |
Tick | linkDelay |
The link delay in ticks for the simulated Ethernet link. More... | |
EventManager * | eventManager |
The event manager associated with the simulated Ethernet link. More... | |
bool | ckptRestore |
Flag to set if receive ticks for pending packets need to be recalculated due to changed link latencies at a resume. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
Serializes all the SimObjects. More... | |
static void | unserializeGlobals (CheckpointIn &cp) |
Class to encapsulate information about data packets received.
Definition at line 331 of file dist_iface.hh.
|
inline |
Scheduler for the incoming data packets.
em | The event manager associated with the simulated Ethernet link. |
Definition at line 416 of file dist_iface.hh.
|
private |
Calculate the tick to schedule the next receive done event.
send_tick | The tick the packet was sent. |
send_delay | The simulated delay at the sender side. |
prev_recv_tick | Tick when the last receive event was processed. |
Definition at line 441 of file dist_iface.cc.
Initialize network link parameters.
Definition at line 429 of file dist_iface.cc.
References curEventQueue().
Referenced by DistIface::recvThreadFunc().
EthPacketPtr DistIface::RecvScheduler::popPacket | ( | ) |
Fetch the next packet that is to be received by the simulated network link.
Definition at line 532 of file dist_iface.cc.
References curTick().
Referenced by DistIface::packetIn().
void DistIface::RecvScheduler::pushPacket | ( | EthPacketPtr | new_packet, |
Tick | send_tick, | ||
Tick | send_delay | ||
) |
Push a newly arrived packet into the desc queue.
Definition at line 494 of file dist_iface.cc.
References curEventQueue(), DPRINTF, EventQueue::lock(), panic_if, and EventQueue::unlock().
Referenced by DistIface::recvThreadFunc().
void DistIface::RecvScheduler::resumeRecvTicks | ( | ) |
Adjust receive ticks for pending packets when restoring from a checkpoint.
Definition at line 461 of file dist_iface.cc.
References curTick(), ArmISA::d, and ArmISA::v.
Referenced by DistIface::drainResume().
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 568 of file dist_iface.cc.
References csprintf(), ArmISA::i, and SERIALIZE_SCALAR.
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 584 of file dist_iface.cc.
References csprintf(), ArmISA::i, UNSERIALIZE_SCALAR, and Serializable::unserializeSection().
|
private |
Flag to set if receive ticks for pending packets need to be recalculated due to changed link latencies at a resume.
Definition at line 407 of file dist_iface.hh.
|
private |
The queue to store the receive descriptors.
Definition at line 357 of file dist_iface.hh.
|
private |
The event manager associated with the simulated Ethernet link.
Definition at line 386 of file dist_iface.hh.
|
private |
The link delay in ticks for the simulated Ethernet link.
Definition at line 379 of file dist_iface.hh.
|
private |
The tick when the most recent receive event was processed.
Definition at line 365 of file dist_iface.hh.
|
private |
The receive done event for the simulated Ethernet link.
Definition at line 372 of file dist_iface.hh.