|
gem5 [DEVELOP-FOR-25.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. | |
| void | init (Event *recv_done, Tick link_delay) |
| Initialize network link parameters. | |
| EthPacketPtr | popPacket () |
| Fetch the next packet that is to be received by the simulated network link. | |
| void | pushPacket (EthPacketPtr new_packet, Tick send_tick, Tick send_delay) |
| Push a newly arrived packet into the desc queue. | |
| void | serialize (CheckpointOut &cp) const override |
| Serialize an object. | |
| void | unserialize (CheckpointIn &cp) override |
| Unserialize an object. | |
| void | resumeRecvTicks () |
| Adjust receive ticks for pending packets when restoring from a checkpoint. | |
Public Member Functions inherited from gem5::Serializable | |
| Serializable () | |
| virtual | ~Serializable () |
| void | serializeSection (CheckpointOut &cp, const char *name) const |
| Serialize an object into a new section. | |
| void | serializeSection (CheckpointOut &cp, const std::string &name) const |
| void | unserializeSection (CheckpointIn &cp, const char *name) |
| Unserialize an a child object. | |
| 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. | |
Private Attributes | |
| std::queue< Desc > | descQueue |
| The queue to store the receive descriptors. | |
| Tick | prevRecvTick |
| The tick when the most recent receive event was processed. | |
| Event * | recvDone |
| The receive done event for the simulated Ethernet link. | |
| Tick | linkDelay |
| The link delay in ticks for the simulated Ethernet link. | |
| EventManager * | eventManager |
| The event manager associated with the simulated Ethernet link. | |
| bool | ckptRestore |
| Flag to set if receive ticks for pending packets need to be recalculated due to changed link latencies at a resume. | |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::Serializable | |
| static const std::string & | currentSection () |
| Gets the fully-qualified name of the active section. | |
| static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
| Generate a checkpoint file so that the serialization can be routed to it. | |
Class to encapsulate information about data packets received.
Definition at line 334 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 419 of file dist_iface.hh.
References ckptRestore, gem5::X86ISA::em, eventManager, linkDelay, prevRecvTick, and recvDone.
|
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 443 of file dist_iface.cc.
References gem5::curTick(), linkDelay, and panic_if.
Referenced by popPacket(), and pushPacket().
Initialize network link parameters.
Definition at line 431 of file dist_iface.cc.
References gem5::curEventQueue(), eventManager, linkDelay, and recvDone.
| EthPacketPtr gem5::DistIface::RecvScheduler::popPacket | ( | ) |
Fetch the next packet that is to be received by the simulated network link.
Definition at line 534 of file dist_iface.cc.
References calcReceiveTick(), gem5::curTick(), descQueue, eventManager, prevRecvTick, and recvDone.
| void gem5::DistIface::RecvScheduler::pushPacket | ( | EthPacketPtr | new_packet, |
| Tick | send_tick, | ||
| Tick | send_delay ) |
Push a newly arrived packet into the desc queue.
Definition at line 496 of file dist_iface.cc.
References calcReceiveTick(), gem5::curEventQueue(), descQueue, DPRINTF, eventManager, linkDelay, gem5::EventQueue::lock(), panic_if, prevRecvTick, gem5::DistIface::primary, recvDone, and gem5::EventQueue::unlock().
| void gem5::DistIface::RecvScheduler::resumeRecvTicks | ( | ) |
Adjust receive ticks for pending packets when restoring from a checkpoint.
Definition at line 463 of file dist_iface.cc.
References ckptRestore, gem5::curTick(), gem5::ArmISA::d, descQueue, eventManager, recvDone, and gem5::ArmISA::v.
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
| cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 570 of file dist_iface.cc.
References gem5::csprintf(), descQueue, gem5::ArmISA::i, prevRecvTick, and SERIALIZE_SCALAR.
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
| cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 586 of file dist_iface.cc.
References ckptRestore, gem5::csprintf(), descQueue, gem5::ArmISA::i, prevRecvTick, recvDone, UNSERIALIZE_SCALAR, and gem5::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 410 of file dist_iface.hh.
Referenced by RecvScheduler(), resumeRecvTicks(), and unserialize().
|
private |
The queue to store the receive descriptors.
Definition at line 360 of file dist_iface.hh.
Referenced by popPacket(), pushPacket(), resumeRecvTicks(), serialize(), and unserialize().
|
private |
The event manager associated with the simulated Ethernet link.
Definition at line 389 of file dist_iface.hh.
Referenced by init(), popPacket(), pushPacket(), RecvScheduler(), and resumeRecvTicks().
|
private |
The link delay in ticks for the simulated Ethernet link.
Definition at line 382 of file dist_iface.hh.
Referenced by calcReceiveTick(), init(), pushPacket(), and RecvScheduler().
|
private |
The tick when the most recent receive event was processed.
Definition at line 368 of file dist_iface.hh.
Referenced by popPacket(), pushPacket(), RecvScheduler(), serialize(), and unserialize().
|
private |
The receive done event for the simulated Ethernet link.
Definition at line 375 of file dist_iface.hh.
Referenced by init(), popPacket(), pushPacket(), RecvScheduler(), resumeRecvTicks(), and unserialize().