gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
DistIface::SyncNode Class Reference
Inheritance diagram for DistIface::SyncNode:
DistIface::Sync Serializable

Public Member Functions

 SyncNode ()
 
 ~SyncNode ()
 
bool run (bool same_tick) override
 Core method to perform a full dist sync. More...
 
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. More...
 
void requestCkpt (ReqType req) override
 
void requestExit (ReqType req) override
 
void requestStopSync (ReqType req) override
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from DistIface::Sync
void init (Tick start, Tick repeat)
 Initialize periodic sync params. More...
 
void abort ()
 Abort processing an on-going sync event (in case of an error, e.g. More...
 
void drainComplete ()
 
- 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 Attributes

ReqType needExit
 Exit requested. More...
 
ReqType needCkpt
 Ckpt requested. More...
 
ReqType needStopSync
 Sync stop requested. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Serializable
static const std::string & currentSection ()
 Get the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 
static void unserializeGlobals (CheckpointIn &cp)
 
- Static Public Attributes inherited from Serializable
static int ckptCount = 0
 
static int ckptMaxCount = 0
 
static int ckptPrevCount = -1
 
- Protected Attributes inherited from DistIface::Sync
std::mutex lock
 The lock to protect access to the Sync object. More...
 
std::condition_variable cv
 Condition variable for the simulation thread to wait on until all receiver threads completes the current global synchronisation. More...
 
unsigned waitNum
 Number of receiver threads that not yet completed the current global synchronisation. More...
 
bool doExit
 Flag is set if exit is permitted upon sync completion. More...
 
bool doCkpt
 Flag is set if taking a ckpt is permitted upon sync completion. More...
 
bool doStopSync
 Flag is set if sync is to stop upon sync completion. More...
 
Tick nextRepeat
 The repeat value for the next periodic sync. More...
 
Tick nextAt
 Tick for the next periodic sync (if the event is not scheduled yet) More...
 
bool isAbort
 Flag is set if the sync is aborted (e.g. More...
 

Detailed Description

Definition at line 205 of file dist_iface.hh.

Constructor & Destructor Documentation

DistIface::SyncNode::SyncNode ( )

Definition at line 111 of file dist_iface.cc.

References Stats::none.

DistIface::SyncNode::~SyncNode ( )
inline

Definition at line 224 of file dist_iface.hh.

Member Function Documentation

bool DistIface::SyncNode::progress ( Tick  send_tick,
Tick  next_repeat,
ReqType  do_ckpt,
ReqType  do_exit,
ReqType  do_stop_sync 
)
overridevirtual

Callback when the receiver thread gets a sync ack message.

Returns
false if the receiver thread needs to stop (e.g. simulation is to exit)

Implements DistIface::Sync.

Definition at line 242 of file dist_iface.cc.

References X86ISA::lock, and Stats::none.

void DistIface::SyncNode::requestCkpt ( ReqType  req)
overridevirtual

Implements DistIface::Sync.

Definition at line 270 of file dist_iface.cc.

References X86ISA::lock, Stats::none, and warn.

void DistIface::SyncNode::requestExit ( ReqType  req)
overridevirtual

Implements DistIface::Sync.

Definition at line 281 of file dist_iface.cc.

References X86ISA::lock, Stats::none, and warn.

void DistIface::SyncNode::requestStopSync ( ReqType  req)
overridevirtual

Implements DistIface::Sync.

Definition at line 848 of file dist_iface.cc.

References DistIface::Sync::lock, and needStopSync.

bool DistIface::SyncNode::run ( bool  same_tick)
overridevirtual
void DistIface::SyncNode::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Implements DistIface::Sync.

Definition at line 306 of file dist_iface.cc.

References SERIALIZE_SCALAR.

void DistIface::SyncNode::unserialize ( CheckpointIn cp)
overridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Implements DistIface::Sync.

Definition at line 313 of file dist_iface.cc.

References UNSERIALIZE_SCALAR.

Member Data Documentation

ReqType DistIface::SyncNode::needCkpt
private

Ckpt requested.

Definition at line 215 of file dist_iface.hh.

ReqType DistIface::SyncNode::needExit
private

Exit requested.

Definition at line 211 of file dist_iface.hh.

ReqType DistIface::SyncNode::needStopSync
private

Sync stop requested.

Definition at line 219 of file dist_iface.hh.

Referenced by requestStopSync().


The documentation for this class was generated from the following files:

Generated on Fri Jun 9 2017 13:04:07 for gem5 by doxygen 1.8.6