gem5  v20.1.0.0
Functions
sim_exit.hh File Reference
#include <string>
#include "base/types.hh"

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...
 

Function Documentation

◆ curTick()

Tick curTick ( )
inline

The universal simulation clock.

The current simulated tick.

Definition at line 45 of file core.hh.

References _curEventQueue, and EventQueue::getCurTick().

◆ exitSimLoop()

void exitSimLoop ( const std::string &  message,
int  exit_code = 0,
Tick  when = curTick(),
Tick  repeat = 0,
bool  serialize = false 
)

◆ exitSimLoopNow()

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().

◆ registerExitCallback()

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().


Generated on Wed Sep 30 2020 14:02:19 for gem5 by doxygen 1.8.17