gem5  v20.1.0.0
dist_iface.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2016 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 /* @file
39  * The interface class for dist gem5 simulations.
40  *
41  * dist-gem5 is an extension to gem5 to enable parallel simulation of a
42  * distributed system (e.g. simulation of a pool of machines
43  * connected by Ethernet links). A dist gem5 run consists of seperate gem5
44  * processes running in parallel. Each gem5 process executes
45  * the simulation of a component of the simulated distributed system.
46  * (An example component can be a dist-core board with an Ethernet NIC.)
47  * The DistIface class below provides services to transfer data and
48  * control messages among the gem5 processes. The main such services are
49  * as follows.
50  *
51  * 1. Send a data packet coming from a simulated Ethernet link. The packet
52  * will be transferred to (all) the target(s) gem5 processes. The send
53  * operation is always performed by the simulation thread, i.e. the gem5
54  * thread that is processing the event queue associated with the simulated
55  * Ethernet link.
56  *
57  * 2. Spawn a receiver thread to process messages coming in from the
58  * from other gem5 processes. Each simulated Ethernet link has its own
59  * associated receiver thread. The receiver thread saves the incoming packet
60  * and schedule an appropriate receive event in the event queue.
61  *
62  * 3. Schedule a global barrier event periodically to keep the gem5
63  * processes in sync.
64  * Periodic barrier event to keep peer gem5 processes in sync. The basic idea
65  * is that no gem5 process can go ahead further than the simulated link
66  * transmission delay to ensure that a corresponding receive event can always
67  * be scheduled for any message coming in from a peer gem5 process.
68  *
69  *
70  *
71  * This interface is an abstract class. It can work with various low level
72  * send/receive service implementations (e.g. TCP/IP, MPI,...). A TCP
73  * stream socket version is implemented in src/dev/net/tcp_iface.[hh,cc].
74  */
75 #ifndef __DEV_DIST_IFACE_HH__
76 #define __DEV_DIST_IFACE_HH__
77 
78 #include <array>
79 #include <mutex>
80 #include <queue>
81 #include <thread>
82 #include <utility>
83 
84 #include "base/logging.hh"
85 #include "dev/net/dist_packet.hh"
86 #include "dev/net/etherpkt.hh"
87 #include "sim/core.hh"
88 #include "sim/drain.hh"
89 #include "sim/global_event.hh"
90 #include "sim/serialize.hh"
91 
92 class EventManager;
93 class System;
94 class ThreadContext;
95 
99 class DistIface : public Drainable, public Serializable
100 {
101  public:
103 
104  protected:
107 
108  private:
109  class SyncEvent;
116  class Sync : public Serializable
117  {
118  protected:
122  std::mutex lock;
128  std::condition_variable cv;
133  unsigned waitNum;
137  bool doExit;
141  bool doCkpt;
157  bool isAbort;
158 
159  friend class SyncEvent;
160 
161  public:
169  void init(Tick start, Tick repeat);
175  virtual bool run(bool same_tick) = 0;
182  virtual bool progress(Tick send_tick,
183  Tick next_repeat,
184  ReqType do_ckpt,
185  ReqType do_exit,
186  ReqType do_stop_sync) = 0;
191  void abort();
192 
193  virtual void requestCkpt(ReqType req) = 0;
194  virtual void requestExit(ReqType req) = 0;
195  virtual void requestStopSync(ReqType req) = 0;
196 
197  void drainComplete();
198 
199  virtual void serialize(CheckpointOut &cp) const override = 0;
200  virtual void unserialize(CheckpointIn &cp) override = 0;
201  };
202 
203  class SyncNode: public Sync
204  {
205  private:
218 
219  public:
220 
221  SyncNode();
223  bool run(bool same_tick) override;
224  bool progress(Tick max_req_tick,
225  Tick next_repeat,
226  ReqType do_ckpt,
227  ReqType do_exit,
228  ReqType do_stop_sync) override;
229 
230  void requestCkpt(ReqType req) override;
231  void requestExit(ReqType req) override;
232  void requestStopSync(ReqType req) override;
233 
234  void serialize(CheckpointOut &cp) const override;
235  void unserialize(CheckpointIn &cp) override;
236  };
237 
238  class SyncSwitch: public Sync
239  {
240  private:
244  unsigned numExitReq;
248  unsigned numCkptReq;
252  unsigned numStopSyncReq;
256  unsigned numNodes;
257 
258  public:
259  SyncSwitch(int num_nodes);
261 
262  bool run(bool same_tick) override;
263  bool progress(Tick max_req_tick,
264  Tick next_repeat,
265  ReqType do_ckpt,
266  ReqType do_exit,
267  ReqType do_stop_sync) override;
268 
269  void requestCkpt(ReqType) override {
270  panic("Switch requested checkpoint");
271  }
272  void requestExit(ReqType) override {
273  panic("Switch requested exit");
274  }
275  void requestStopSync(ReqType) override {
276  panic("Switch requested stop sync");
277  }
278 
279  void serialize(CheckpointOut &cp) const override;
280  void unserialize(CheckpointIn &cp) override;
281  };
282 
295  class SyncEvent : public GlobalSyncEvent
296  {
297  private:
301  bool _draining;
302  public:
308 
313  void start();
319  void process() override;
320 
321  bool draining() const { return _draining; }
322  void draining(bool fl) { _draining = fl; }
323  };
332  {
333  private:
339  struct Desc : public Serializable
340  {
344 
345  Desc() : sendTick(0), sendDelay(0) {}
347  packet(p), sendTick(s), sendDelay(d) {}
348  Desc(const Desc &d) :
350 
351  void serialize(CheckpointOut &cp) const override;
352  void unserialize(CheckpointIn &cp) override;
353  };
357  std::queue<Desc> descQueue;
399  Tick calcReceiveTick(Tick send_tick,
400  Tick send_delay,
401  Tick prev_recv_tick);
402 
408 
409  public:
417  prevRecvTick(0), recvDone(nullptr), linkDelay(0),
418  eventManager(em), ckptRestore(false) {}
419 
426  void init(Event *recv_done, Tick link_delay);
438  void pushPacket(EthPacketPtr new_packet,
439  Tick send_tick,
440  Tick send_delay);
441 
442  void serialize(CheckpointOut &cp) const override;
443  void unserialize(CheckpointIn &cp) override;
450  void resumeRecvTicks();
451  };
466  std::thread *recvThread;
475 
476  protected:
480  unsigned rank;
484  unsigned size;
488  static unsigned distIfaceNum;
492  unsigned distIfaceId;
493 
494  bool isPrimary;
495 
496  private:
500  static unsigned recvThreadsNum;
504  static Sync *sync;
517  static System *sys;
521  static bool isSwitch;
522 
523  private:
530  virtual void sendPacket(const Header &header, const EthPacketPtr &packet) = 0;
535  virtual void sendCmd(const Header &header) = 0;
541  virtual bool recvHeader(Header &header) = 0;
548  virtual void recvPacket(const Header &header, EthPacketPtr &packet) = 0;
552  virtual void initTransport() = 0;
559  void spawnRecvThread(const Event *recv_done, Tick link_delay);
563  void recvThreadFunc(Event *recv_done, Tick link_delay);
564 
565  public:
566 
574  DistIface(unsigned dist_rank,
575  unsigned dist_size,
576  Tick sync_start,
577  Tick sync_repeat,
578  EventManager *em,
579  bool use_pseudo_op,
580  bool is_switch,
581  int num_nodes);
582 
583  virtual ~DistIface();
589  void packetOut(EthPacketPtr pkt, Tick send_delay);
599 
600  DrainState drain() override;
601  void drainResume() override;
602  void init(const Event *e, Tick link_delay);
603  void startup();
604 
605  void serialize(CheckpointOut &cp) const override;
606  void unserialize(CheckpointIn &cp) override;
617  static bool readyToExit(Tick delay);
628  static bool readyToCkpt(Tick delay, Tick period);
632  static uint64_t rankParam();
636  static uint64_t sizeParam();
640  static void toggleSync(ThreadContext *tc);
641  };
642 
643 #endif
DistIface::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: dist_iface.cc:764
DistIface::Sync::isAbort
bool isAbort
Flag is set if the sync is aborted (e.g.
Definition: dist_iface.hh:157
DistIface::distIfaceNum
static unsigned distIfaceNum
Number of DistIface objects (i.e.
Definition: dist_iface.hh:488
DistIface::Sync::drainComplete
void drainComplete()
Definition: dist_iface.cc:290
DistIface::Sync::requestExit
virtual void requestExit(ReqType req)=0
DistIface::recvThreadsNum
static unsigned recvThreadsNum
Number of receiver threads (in this gem5 process)
Definition: dist_iface.hh:500
DistIface::DistIface
DistIface(unsigned dist_rank, unsigned dist_size, Tick sync_start, Tick sync_repeat, EventManager *em, bool use_pseudo_op, bool is_switch, int num_nodes)
ctor
Definition: dist_iface.cc:602
DistIface
The interface class to talk to peer gem5 processes.
Definition: dist_iface.hh:99
DistIface::Sync::doCkpt
bool doCkpt
Flag is set if taking a ckpt is permitted upon sync completion.
Definition: dist_iface.hh:141
DistIface::RecvScheduler::Desc::sendDelay
Tick sendDelay
Definition: dist_iface.hh:343
dist_packet.hh
serialize.hh
DistIface::Sync
Definition: dist_iface.hh:116
DistIface::SyncEvent::SyncEvent
SyncEvent()
Only the firstly instantiated DistIface object will call this constructor.
Definition: dist_iface.hh:307
DistIface::Sync::abort
void abort()
Abort processing an on-going sync event (in case of an error, e.g.
Definition: dist_iface.cc:85
DistIface::SyncNode::run
bool run(bool same_tick) override
Core method to perform a full dist sync.
Definition: dist_iface.cc:124
DistIface::SyncEvent::process
void process() override
This is a global event so process() will only be called by exactly one simulation thread.
Definition: dist_iface.cc:365
DistIface::recvThreadFunc
void recvThreadFunc(Event *recv_done, Tick link_delay)
The function executed by a receiver thread.
Definition: dist_iface.cc:669
DistIface::primary
static DistIface * primary
The very first DistIface object created becomes the primary interface.
Definition: dist_iface.hh:513
DistIface::Sync::serialize
virtual void serialize(CheckpointOut &cp) const override=0
Serialize an object.
Serializable
Basic support for object serialization.
Definition: serialize.hh:172
DistIface::SyncNode::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: dist_iface.cc:304
DistIface::RecvScheduler::Desc::Desc
Desc(EthPacketPtr p, Tick s, Tick d)
Definition: dist_iface.hh:346
DistIface::RecvScheduler::descQueue
std::queue< Desc > descQueue
The queue to store the receive descriptors.
Definition: dist_iface.hh:357
DistIface::SyncNode::progress
bool progress(Tick max_req_tick, Tick next_repeat, ReqType do_ckpt, ReqType do_exit, ReqType do_stop_sync) override
Callback when the receiver thread gets a sync ack message.
Definition: dist_iface.cc:240
DistIface::drain
DrainState drain() override
Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are pa...
Definition: dist_iface.cc:727
DistIface::RecvScheduler::Desc::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: dist_iface.cc:559
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
DistIface::RecvScheduler::resumeRecvTicks
void resumeRecvTicks()
Adjust receive ticks for pending packets when restoring from a checkpoint.
Definition: dist_iface.cc:461
DistIface::SyncSwitch::requestExit
void requestExit(ReqType) override
Definition: dist_iface.hh:272
DistIface::SyncSwitch::requestCkpt
void requestCkpt(ReqType) override
Definition: dist_iface.hh:269
DistIface::toggleSync
static void toggleSync(ThreadContext *tc)
Trigger the primary to start/stop synchronization.
Definition: dist_iface.cc:851
DistIface::RecvScheduler::RecvScheduler
RecvScheduler(EventManager *em)
Scheduler for the incoming data packets.
Definition: dist_iface.hh:416
DistIface::RecvScheduler::Desc::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: dist_iface.cc:551
DistIface::sys
static System * sys
System pointer used to wakeup sleeping threads when stopping sync.
Definition: dist_iface.hh:517
header
output header
Definition: nop.cc:36
DistIface::RecvScheduler::popPacket
EthPacketPtr popPacket()
Fetch the next packet that is to be received by the simulated network link.
Definition: dist_iface.cc:532
DistIface::SyncSwitch::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: dist_iface.cc:319
DistIface::SyncNode
Definition: dist_iface.hh:203
DistIface::SyncSwitch::numExitReq
unsigned numExitReq
Counter for recording exit requests.
Definition: dist_iface.hh:244
DistHeaderPkt::ReqType
ReqType
Definition: dist_packet.hh:65
DistHeaderPkt::Header
Definition: dist_packet.hh:77
DistIface::SyncSwitch::progress
bool progress(Tick max_req_tick, Tick next_repeat, ReqType do_ckpt, ReqType do_exit, ReqType do_stop_sync) override
Callback when the receiver thread gets a sync ack message.
Definition: dist_iface.cc:199
GlobalSyncEvent
A special global event that synchronizes all threads and forces them to process asynchronously enqueu...
Definition: global_event.hh:205
DistIface::SyncSwitch::run
bool run(bool same_tick) override
Core method to perform a full dist sync.
Definition: dist_iface.cc:156
DistIface::Sync::nextRepeat
Tick nextRepeat
The repeat value for the next periodic sync.
Definition: dist_iface.hh:149
DistIface::RecvScheduler::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: dist_iface.cc:584
DrainState
DrainState
Object drain/handover states.
Definition: drain.hh:71
DistIface::init
void init(const Event *e, Tick link_delay)
Definition: dist_iface.cc:783
DistIface::size
unsigned size
The number of gem5 processes comprising this dist simulation.
Definition: dist_iface.hh:484
DistIface::SyncNode::needStopSync
ReqType needStopSync
Sync stop requested.
Definition: dist_iface.hh:217
DistIface::Sync::run
virtual bool run(bool same_tick)=0
Core method to perform a full dist sync.
DistIface::SyncEvent
The global event to schedule periodic dist sync.
Definition: dist_iface.hh:295
DistIface::initTransport
virtual void initTransport()=0
Init hook for the underlaying transport.
cp
Definition: cprintf.cc:40
DistIface::RecvScheduler::Desc
Received packet descriptor.
Definition: dist_iface.hh:339
DistIface::SyncNode::requestStopSync
void requestStopSync(ReqType req) override
Definition: dist_iface.cc:844
DistIface::rankParam
static uint64_t rankParam()
Getter for the dist rank param.
Definition: dist_iface.cc:917
EventBase::Sim_Exit_Pri
static const Priority Sim_Exit_Pri
If we want to exit on this cycle, it's the very last thing we do.
Definition: eventq.hh:229
DistIface::SyncSwitch::numCkptReq
unsigned numCkptReq
Counter for recording ckpt requests.
Definition: dist_iface.hh:248
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
Drainable
Interface for objects that might require draining before checkpointing.
Definition: drain.hh:230
Event
Definition: eventq.hh:246
DistIface::RecvScheduler::linkDelay
Tick linkDelay
The link delay in ticks for the simulated Ethernet link.
Definition: dist_iface.hh:379
System
Definition: system.hh:73
DistIface::RecvScheduler
Class to encapsulate information about data packets received.
Definition: dist_iface.hh:331
DistIface::Sync::nextAt
Tick nextAt
Tick for the next periodic sync (if the event is not scheduled yet)
Definition: dist_iface.hh:153
DistIface::Header
DistHeaderPkt::Header Header
Definition: dist_iface.hh:102
DistIface::SyncNode::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: dist_iface.cc:311
DistIface::Sync::progress
virtual bool progress(Tick send_tick, Tick next_repeat, ReqType do_ckpt, ReqType do_exit, ReqType do_stop_sync)=0
Callback when the receiver thread gets a sync ack message.
ArmISA::d
Bitfield< 9 > d
Definition: miscregs_types.hh:60
DistIface::isSwitch
static bool isSwitch
Is this node a switch?
Definition: dist_iface.hh:521
DistIface::SyncNode::requestCkpt
void requestCkpt(ReqType req) override
Definition: dist_iface.cc:268
DistIface::SyncSwitch::requestStopSync
void requestStopSync(ReqType) override
Definition: dist_iface.hh:275
DistIface::rank
unsigned rank
The rank of this process among the gem5 peers.
Definition: dist_iface.hh:480
DistIface::Sync::waitNum
unsigned waitNum
Number of receiver threads that not yet completed the current global synchronisation.
Definition: dist_iface.hh:133
DistIface::RecvScheduler::calcReceiveTick
Tick calcReceiveTick(Tick send_tick, Tick send_delay, Tick prev_recv_tick)
Calculate the tick to schedule the next receive done event.
Definition: dist_iface.cc:441
DistIface::drainResume
void drainResume() override
Resume execution after a successful drain.
Definition: dist_iface.cc:737
DistIface::~DistIface
virtual ~DistIface()
Definition: dist_iface.cc:631
DistIface::sendCmd
virtual void sendCmd(const Header &header)=0
Send out a control command to the remote end.
DistIface::RecvScheduler::prevRecvTick
Tick prevRecvTick
The tick when the most recent receive event was processed.
Definition: dist_iface.hh:365
X86ISA::em
Bitfield< 2 > em
Definition: misc.hh:602
DistIface::SyncEvent::draining
void draining(bool fl)
Definition: dist_iface.hh:322
DistIface::SyncSwitch::numStopSyncReq
unsigned numStopSyncReq
Counter for recording stop sync requests.
Definition: dist_iface.hh:252
DistIface::isPrimary
bool isPrimary
Definition: dist_iface.hh:494
DistIface::syncEvent
static SyncEvent * syncEvent
The singleton SyncEvent object to schedule periodic dist sync.
Definition: dist_iface.hh:508
DistIface::SyncNode::SyncNode
SyncNode()
Definition: dist_iface.cc:109
DistIface::SyncNode::needExit
ReqType needExit
Exit requested.
Definition: dist_iface.hh:209
DistIface::RecvScheduler::init
void init(Event *recv_done, Tick link_delay)
Initialize network link parameters.
Definition: dist_iface.cc:429
DistIface::recvThread
std::thread * recvThread
Receiver thread pointer.
Definition: dist_iface.hh:466
DistIface::sendPacket
virtual void sendPacket(const Header &header, const EthPacketPtr &packet)=0
Send out a data packet to the remote end.
DistIface::Sync::doExit
bool doExit
Flag is set if exit is permitted upon sync completion.
Definition: dist_iface.hh:137
core.hh
DistIface::SyncEvent::start
void start()
Schedule the first periodic sync event.
Definition: dist_iface.cc:331
DistIface::Sync::requestStopSync
virtual void requestStopSync(ReqType req)=0
DistIface::readyToExit
static bool readyToExit(Tick delay)
Initiate the exit from the simulation.
Definition: dist_iface.cc:892
DistIface::SyncSwitch::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Definition: dist_iface.cc:325
ArmISA::e
Bitfield< 9 > e
Definition: miscregs_types.hh:61
DistIface::SyncEvent::~SyncEvent
~SyncEvent()
Definition: dist_iface.hh:309
DistIface::sync
static Sync * sync
The singleton Sync object to perform dist synchronisation.
Definition: dist_iface.hh:504
DistIface::syncStartOnPseudoOp
bool syncStartOnPseudoOp
Use pseudoOp to start synchronization.
Definition: dist_iface.hh:474
EthPacketPtr
std::shared_ptr< EthPacketData > EthPacketPtr
Definition: etherpkt.hh:87
DistIface::SyncNode::requestExit
void requestExit(ReqType req) override
Definition: dist_iface.cc:279
DistIface::SyncNode::needCkpt
ReqType needCkpt
Ckpt requested.
Definition: dist_iface.hh:213
DistIface::Sync::doStopSync
bool doStopSync
Flag is set if sync is to stop upon sync completion.
Definition: dist_iface.hh:145
DistIface::RecvScheduler::Desc::packet
EthPacketPtr packet
Definition: dist_iface.hh:341
DistIface::RecvScheduler::ckptRestore
bool ckptRestore
Flag to set if receive ticks for pending packets need to be recalculated due to changed link latencie...
Definition: dist_iface.hh:407
DistIface::SyncNode::~SyncNode
~SyncNode()
Definition: dist_iface.hh:222
DistIface::ReqType
DistHeaderPkt::ReqType ReqType
Definition: dist_iface.hh:106
DistIface::Sync::unserialize
virtual void unserialize(CheckpointIn &cp) override=0
Unserialize an object.
DistIface::SyncSwitch::~SyncSwitch
~SyncSwitch()
Definition: dist_iface.hh:260
DistIface::MsgType
DistHeaderPkt::MsgType MsgType
Definition: dist_iface.hh:105
DistIface::Sync::init
void init(Tick start, Tick repeat)
Initialize periodic sync params.
Definition: dist_iface.cc:67
DistIface::RecvScheduler::pushPacket
void pushPacket(EthPacketPtr new_packet, Tick send_tick, Tick send_delay)
Push a newly arrived packet into the desc queue.
Definition: dist_iface.cc:494
DistIface::readyToCkpt
static bool readyToCkpt(Tick delay, Tick period)
Initiate taking a checkpoint.
Definition: dist_iface.cc:820
logging.hh
DistIface::SyncSwitch
Definition: dist_iface.hh:238
etherpkt.hh
DistIface::spawnRecvThread
void spawnRecvThread(const Event *recv_done, Tick link_delay)
spawn the receiver thread.
Definition: dist_iface.cc:715
DistIface::startup
void startup()
Definition: dist_iface.cc:810
DistIface::distIfaceId
unsigned distIfaceId
Unique id for the dist link.
Definition: dist_iface.hh:492
CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:63
DistIface::recvPacket
virtual void recvPacket(const Header &header, EthPacketPtr &packet)=0
Receive a packet from the remote end.
drain.hh
DistIface::SyncEvent::_draining
bool _draining
Flag to set when the system is draining.
Definition: dist_iface.hh:301
DistIface::Sync::requestCkpt
virtual void requestCkpt(ReqType req)=0
EventManager
Definition: eventq.hh:973
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
DistIface::SyncEvent::draining
bool draining() const
Definition: dist_iface.hh:321
DistIface::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: dist_iface.cc:745
DistIface::recvHeader
virtual bool recvHeader(Header &header)=0
Receive a header (i.e.
ArmISA::s
Bitfield< 4 > s
Definition: miscregs_types.hh:556
DistIface::Sync::lock
std::mutex lock
The lock to protect access to the Sync object.
Definition: dist_iface.hh:122
DistIface::RecvScheduler::eventManager
EventManager * eventManager
The event manager associated with the simulated Ethernet link.
Definition: dist_iface.hh:386
global_event.hh
CheckpointIn
Definition: serialize.hh:67
DistIface::RecvScheduler::recvDone
Event * recvDone
The receive done event for the simulated Ethernet link.
Definition: dist_iface.hh:372
DistIface::RecvScheduler::Desc::Desc
Desc()
Definition: dist_iface.hh:345
DistIface::packetOut
void packetOut(EthPacketPtr pkt, Tick send_delay)
Send out an Ethernet packet.
Definition: dist_iface.cc:647
DistIface::packetIn
EthPacketPtr packetIn()
Fetch the packet scheduled to be received next by the simulated network link.
Definition: dist_iface.hh:598
DistIface::recvScheduler
RecvScheduler recvScheduler
Meta information about data packets received.
Definition: dist_iface.hh:470
DistIface::SyncSwitch::SyncSwitch
SyncSwitch(int num_nodes)
Definition: dist_iface.cc:94
DistIface::SyncSwitch::numNodes
unsigned numNodes
Number of connected simulated nodes.
Definition: dist_iface.hh:256
DistIface::sizeParam
static uint64_t sizeParam()
Getter for the dist size param.
Definition: dist_iface.cc:930
DistIface::RecvScheduler::Desc::sendTick
Tick sendTick
Definition: dist_iface.hh:342
DistIface::RecvScheduler::Desc::Desc
Desc(const Desc &d)
Definition: dist_iface.hh:348
DistIface::Sync::cv
std::condition_variable cv
Condition variable for the simulation thread to wait on until all receiver threads completes the curr...
Definition: dist_iface.hh:128
DistIface::syncStart
Tick syncStart
Tick to schedule the first dist sync event.
Definition: dist_iface.hh:457
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
DistIface::syncRepeat
Tick syncRepeat
Frequency of dist sync events in ticks.
Definition: dist_iface.hh:461
DistIface::RecvScheduler::serialize
void serialize(CheckpointOut &cp) const override
Serialize an object.
Definition: dist_iface.cc:568
DistHeaderPkt::MsgType
MsgType
The msg type defines what information a dist header packet carries.
Definition: dist_packet.hh:69

Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17