49 eq(nullptr), readyEvent(this, false, ReadyPriority),
50 pauseEvent(this, false, PausePriority),
51 stopEvent(this, false, StopPriority), _throwUp(nullptr),
52 starvationEvent(this, false, StarvationPriority),
53 _elaborationDone(false), _started(false), _stopNow(false),
54 _status(StatusOther), maxTick(::
MaxTick),
55 maxTickEvent(this, false, MaxTickPriority),
56 timeAdvancesEvent(this, false, TimeAdvancesPriority), _numCycles(0),
57 _changeStamp(0), _current(nullptr), initDone(false), runToTime(true),
73 deltas.front()->deschedule();
78 while (!ts->
events.empty())
79 ts->
events.front()->deschedule();
119 if (
p->dontInitialize()) {
120 if (!
p->hasStaticSensitivities() && !
p->internal()) {
133 eventsToSchedule.clear();
374 fatal(
"Pausing systemc after sc_main completed.");
394 fatal(
"Stopping systemc after sc_main completed.");
432 const ::sc_core::sc_report *to_throw =
_throwUp;
497 throwingReportHandler(const ::sc_core::sc_report &
r,
505 const ::sc_core::sc_report
516 }
catch (const ::sc_core::sc_report &) {
519 }
catch (const ::sc_core::sc_unwind_exception &) {
520 panic(
"Kill/reset exception escaped a Process::run()");
521 }
catch (
const std::exception &
e) {
524 }
catch (
const char *msg) {
530 "UNKNOWN EXCEPTION");
532 }
catch (const ::sc_core::sc_report &
r) {
536 panic(
"No exception thrown in reportifyException.");
void scheduleReadyEvent()
#define panic(...)
This implements a cprintf based panic() function.
Process * getCurrentProcess()
void run()
Start executing the fiber represented by this object.
bool finished() const
Returns whether the "main" function of this fiber has finished.
#define fatal(...)
This implements a cprintf based fatal() function.
EventWrapper< Scheduler, &Scheduler::pause > pauseEvent
void asyncRequestUpdate(Channel *c)
ProcessList readyListMethods
void start(Tick max_tick, bool run_to_time)
virtual ::sc_core::sc_curr_proc_kind procKind() const =0
static sc_core::sc_status status()
void scheduleStarvationEvent()
const char SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_[]
static Fiber * primaryFiber()
Get a pointer to the primary Fiber.
std::set< TraceFile * > traceFiles
#define SC_REPORT_WARNING(msg_type, msg)
void scheduleTimeAdvancesEvent()
void scheduleStop(bool finish_delta)
std::map<::Event *, Tick > eventsToSchedule
uint64_t Tick
Tick count type.
void deschedule(ScEvent *event)
ProcessList readyListThreads
EventWrapper< Scheduler, &Scheduler::pause > starvationEvent
EventWrapper< Scheduler, &Scheduler::timeAdvances > timeAdvancesEvent
static scfx_rep_node * list
void(* sc_report_handler_proc)(const sc_report &, const sc_actions &)
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...
sc_core::sc_report_handler_proc reportHandlerProc
ChannelList asyncUpdateList
::sc_core::sc_event & resetEvent()
const ::sc_core::sc_report reportifyException()
void requestUpdate(Channel *c)
ExceptionWrapperBase * excWrapper
EventWrapper< Scheduler, &Scheduler::runReady > readyEvent
void reset(bool inc_kids)
const ::sc_core::sc_report * _throwUp
void schedule(Event *event, Tick when, bool global=false)
Schedule the given event on this queue.
EventWrapper< Scheduler, &Scheduler::stop > stopEvent
#define SC_REPORT_ERROR(msg_type, msg)
std::mutex asyncListMutex
const char SC_ID_DISABLE_WILL_ORPHAN_PROCESS_[]
virtual void throw_it()=0
EventWrapper< Scheduler, &Scheduler::maxTickFunc > maxTickEvent
static void set_handler(sc_report_handler_proc)
bool listContains(ListNode *list, ListNode *target)
static sc_actions get_catch_actions()
void schedule(ScEvent *event, const ::sc_core::sc_time &delay)