gem5
v20.1.0.0
|
Go to the source code of this file.
Functions | |
Tick | curTick () |
The universal simulation clock. More... | |
void | registerExitCallback (const std::function< void()> &) |
Register a callback to be called when Python exits. More... | |
void | exitSimLoop (const std::string &message, int exit_code=0, Tick when=curTick(), Tick repeat=0, bool serialize=false) |
Schedule an event to exit the simulation loop (returning to Python) at the end of the current cycle (curTick()). More... | |
void | exitSimLoopNow (const std::string &message, int exit_code=0, Tick repeat=0, bool serialize=false) |
Schedule an event as above, but make it high priority so it runs before any normal events which are schedule at the current time. More... | |
|
inline |
The universal simulation clock.
The current simulated tick.
Definition at line 45 of file core.hh.
References _curEventQueue, and EventQueue::getCurTick().
void exitSimLoop | ( | const std::string & | message, |
int | exit_code = 0 , |
||
Tick | when = curTick() , |
||
Tick | repeat = 0 , |
||
bool | serialize = false |
||
) |
Schedule an event to exit the simulation loop (returning to Python) at the end of the current cycle (curTick()).
The message and exit_code parameters are saved in the SimLoopExitEvent to indicate why the exit occurred.
Definition at line 88 of file sim_events.cc.
References curTick(), serialize(), simQuantum, and warn_if.
Referenced by TraceCPU::checkAndSchedExitEvent(), MemTest::completeRequest(), doSimLoop(), Trace::TarmacParserRecord::dump(), ExitGen::enter(), exitImpl(), GoodbyeObject::fillBuffer(), BaseCache::incMissCount(), PseudoInst::m5checkpoint(), PseudoInst::m5exit(), PseudoInst::m5fail(), LocalSimLoopExitEvent::process(), Trace::TarmacParserRecord::TarmacParserRecordEvent::process(), CountedExitEvent::process(), DistIface::SyncEvent::process(), pybind_init_event(), DistIface::recvThreadFunc(), ArmSemihosting::semiExit(), TCPIface::sendTCP(), DrainManager::signalDrainDone(), PseudoInst::switchcpu(), takeCheckpoint(), GarnetSyntheticTraffic::tick(), ComputeUnit::updateInstStats(), RubyDirectedTester::wakeup(), RubyTester::wakeup(), PseudoInst::workbegin(), PseudoInst::workend(), SimpleUart::write(), and Pl011::write().
void exitSimLoopNow | ( | const std::string & | message, |
int | exit_code = 0 , |
||
Tick | repeat = 0 , |
||
bool | serialize = false |
||
) |
Schedule an event as above, but make it high priority so it runs before any normal events which are schedule at the current time.
Definition at line 99 of file sim_events.cc.
Referenced by sc_gem5::Scheduler::pause(), and sc_gem5::Scheduler::stop().
void registerExitCallback | ( | const std::function< void()> & | callback | ) |
Register a callback to be called when Python exits.
Defined in sim/main.cc.
Register a callback to be called when Python exits.
Definition at line 140 of file core.cc.
References exitCallbacks().
Referenced by BaseTags::BaseTags(), CowDiskImage::CowDiskImage(), Trace::InstPBTrace::createTraceFile(), MemTraceProbe::MemTraceProbe(), and VirtIO9PDiod::VirtIO9PDiod().