56 const std::string &_cause,
59 cause(_cause), code(
c), repeat(
r)
66 cause(_cause), code(
c), repeat(
r)
73 return "global simulation loop exit";
92 "exitSimLoop called with a delay and auto serialization. This is "
93 "currently unsupported.");
107 :
Event(Sim_Exit_Pri, IsExitEvent),
108 cause(_cause), code(
c), repeat(
r)
125 return "simulation loop exit";
152 :
Event(Sim_Exit_Pri), cause(_cause), downCounter(counter)
174 return "counted exit";
CountedExitEvent(const std::string &_cause, int &_downCounter)
const char * description() const override
Return a C string describing the event.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
void serialize(CheckpointOut &cp) const override
Serialize an object.
The main global event class.
virtual const char * description() const
GlobalSimLoopExitEvent(Tick when, const std::string &_cause, int c, Tick repeat=0)
const char * description() const override
Return a C string describing the event.
void serialize(CheckpointOut &cp) const override
Serialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
#define warn_if(cond,...)
Conditional warning macro that checks the supplied condition and only prints a warning if the conditi...
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Tick simQuantum
Simulation Quantum for multiple eventq simulation.
Tick curTick()
The universal simulation clock.
std::ostream CheckpointOut
uint64_t Tick
Tick count type.
void exitSimLoop(const std::string &message, int exit_code, Tick when, Tick repeat, bool serialize)
Schedule an event to exit the simulation loop (returning to Python) at the end of the current cycle (...
void serialize(const ThreadContext &tc, CheckpointOut &cp)
Thread context serialization helpers.
void exitSimLoopNow(const std::string &message, int exit_code, Tick repeat, bool serialize)
Schedule an event as above, but make it high priority so it runs before any normal events which are s...
#define UNSERIALIZE_SCALAR(scalar)
#define SERIALIZE_SCALAR(scalar)