gem5
|
Go to the source code of this file.
Functions | |
Tick | curTick () |
The universal simulation clock. More... | |
void | registerExitCallback (Callback *) |
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... | |
|
inline |
The universal simulation clock.
The current simulated tick.
Definition at line 47 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 83 of file sim_events.cc.
References curTick(), simQuantum, and warn_if.
Referenced by TraceCPU::checkAndSchedExitEvent(), MemTest::completeRequest(), doSimLoop(), exitImpl(), BaseCache::incMissCount(), PseudoInst::m5checkpoint(), PseudoInst::m5exit(), PseudoInst::m5fail(), LocalSimLoopExitEvent::process(), CountedExitEvent::process(), DistIface::SyncEvent::process(), pybind_init_event(), DistIface::recvThreadFunc(), TCPIface::sendTCP(), DrainManager::signalDrainDone(), SimpleThread::simPalCheck(), FullO3CPU< Impl >::simPalCheck(), PseudoInst::switchcpu(), takeCheckpoint(), GarnetSyntheticTraffic::tick(), RubyDirectedTester::wakeup(), RubyTester::wakeup(), PseudoInst::workbegin(), PseudoInst::workend(), and Pl011::write().
void registerExitCallback | ( | Callback * | 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 116 of file core.cc.
References CallbackQueue::add(), and exitCallbacks().
Referenced by ComputeUnit::ComputeUnit(), CowDiskImage::CowDiskImage(), Trace::InstPBTrace::createTraceFile(), DRAMSim2::DRAMSim2(), ElasticTrace::ElasticTrace(), MemTraceProbe::MemTraceProbe(), O3ThreadState< Impl >::O3ThreadState(), BaseTags::regStats(), and SimpleThread::SimpleThread().