47 eq(nullptr), readyEvent(*this, false, ReadyPriority),
48 pauseEvent(*this, false, PausePriority),
49 stopEvent(*this, false, StopPriority), _throwUp(nullptr),
50 starvationEvent(*this, false, StarvationPriority),
51 _elaborationDone(false), _started(false), _stopNow(false),
52 _status(StatusOther), maxTick(
gem5::MaxTick),
53 maxTickEvent(*this, false, MaxTickPriority),
54 timeAdvancesEvent(*this, false, TimeAdvancesPriority), _numCycles(0),
55 _changeStamp(0), _current(nullptr), initDone(false), runToTime(true),
71 deltas.front()->deschedule();
75 while (!ts->events.empty())
76 ts->events.front()->deschedule();
116 if (p->dontInitialize()) {
117 if (!p->hasStaticSensitivities() && !p->internal()) {
150 if (!p->dontInitialize())
240 was_ready = (p->nextListNode !=
nullptr);
365 using namespace gem5;
375 fatal(
"Pausing systemc after sc_main completed.");
384 using namespace gem5;
397 fatal(
"Stopping systemc after sc_main completed.");
435 const ::sc_core::sc_report *to_throw =
_throwUp;
500throwingReportHandler(const ::sc_core::sc_report &r,
501 const ::sc_core::sc_actions &)
508const ::sc_core::sc_report
519 }
catch (const ::sc_core::sc_report &) {
522 }
catch (const ::sc_core::sc_unwind_exception &) {
523 panic(
"Kill/reset exception escaped a Process::run()");
524 }
catch (
const std::exception &e) {
527 }
catch (
const char *msg) {
533 "UNKNOWN EXCEPTION");
535 }
catch (const ::sc_core::sc_report &r) {
539 panic(
"No exception thrown in reportifyException.");
static sc_actions get_catch_actions()
static void set_handler(sc_report_handler_proc)
static sc_core::sc_status status()
::sc_core::sc_event & resetEvent()
virtual gem5::Fiber * fiber()
void reset(bool inc_kids)
ExceptionWrapperBase * excWrapper
std::set< TraceFile * > traceFiles
ProcessList readyListMethods
void start(gem5::Tick max_tick, bool run_to_time)
void deschedule(ScEvent *event)
const ::sc_core::sc_report * _throwUp
std::mutex asyncListMutex
void scheduleStop(bool finish_delta)
ProcessList readyListThreads
std::map< gem5::Event *, gem5::Tick > eventsToSchedule
ChannelList asyncUpdateList
void asyncRequestUpdate(Channel *c)
gem5::MemberEventWrapper<&Scheduler::timeAdvances > timeAdvancesEvent
void schedule(ScEvent *event, const ::sc_core::sc_time &delay)
gem5::MemberEventWrapper<&Scheduler::pause > starvationEvent
std::atomic< bool > hasAsyncUpdate
gem5::MemberEventWrapper<&Scheduler::maxTickFunc > maxTickEvent
gem5::MemberEventWrapper<&Scheduler::stop > stopEvent
gem5::MemberEventWrapper<&Scheduler::runReady > readyEvent
void scheduleStarvationEvent()
void requestUpdate(Channel *c)
void scheduleTimeAdvancesEvent()
void scheduleReadyEvent()
gem5::MemberEventWrapper<&Scheduler::pause > pauseEvent
void schedule(Event *event, Tick when, bool global=false)
Schedule the given event on this queue.
bool scheduled() const
Determine if the current event is scheduled.
static Fiber * primaryFiber()
Get a pointer to the primary Fiber.
bool finished() const
Returns whether the "main" function of this fiber has finished.
void run()
Start executing the fiber represented by this object.
#define panic(...)
This implements a cprintf based panic() function.
#define fatal(...)
This implements a cprintf based fatal() function.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Tick
Tick count type.
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...
const char SC_ID_SIMULATION_UNCAUGHT_EXCEPTION_[]
const char SC_ID_DISABLE_WILL_ORPHAN_PROCESS_[]
void(* sc_report_handler_proc)(const sc_report &, const sc_actions &)
sc_core::sc_report_handler_proc reportHandlerProc
const ::sc_core::sc_report reportifyException()
Process * getCurrentProcess()
bool listContains(ListNode *list, ListNode *target)
#define SC_REPORT_WARNING(msg_type, msg)
#define SC_REPORT_ERROR(msg_type, msg)
virtual void throw_it()=0