gem5
v20.1.0.0
|
#include "sim/core.hh"
#include <iostream>
#include <string>
#include "base/callback.hh"
#include "base/cprintf.hh"
#include "base/logging.hh"
#include "base/output.hh"
#include "sim/eventq.hh"
Go to the source code of this file.
Namespaces | |
SimClock | |
These are variables that are set based on the simulator frequency. | |
SimClock::Float | |
SimClock::Int | |
These variables equal the number of ticks in the unit of time they're named after in a 64 bit integer. | |
Functions | |
void | fixClockFrequency () |
bool | clockFrequencyFixed () |
void | setClockFrequency (Tick tps) |
Tick | getClockFrequency () |
void | setOutputDir (const string &dir) |
CallbackQueue & | exitCallbacks () |
Queue of C++ callbacks to invoke on simulator exit. More... | |
void | registerExitCallback (const std::function< void()> &callback) |
Register an exit callback. More... | |
void | doExitCleanup () |
Do C++ simulator exit processing. More... | |
Variables | |
Tick | SimClock::Frequency |
The simulated frequency of curTick(). (In ticks per second) More... | |
Tick | SimClock::Int::s |
second More... | |
Tick | SimClock::Int::ms |
millisecond More... | |
Tick | SimClock::Int::us |
microsecond More... | |
Tick | SimClock::Int::ns |
nanosecond More... | |
Tick | SimClock::Int::ps |
picosecond More... | |
double | SimClock::Float::s |
These variables equal the number of ticks in the unit of time they're named after in a double. More... | |
double | SimClock::Float::ms |
millisecond More... | |
double | SimClock::Float::us |
microsecond More... | |
double | SimClock::Float::ns |
nanosecond More... | |
double | SimClock::Float::ps |
picosecond More... | |
double | SimClock::Float::Hz |
These variables the inverse of above. More... | |
double | SimClock::Float::kHz |
kHz More... | |
double | SimClock::Float::MHz |
MHz. More... | |
double | SimClock::Float::GHz |
GHz. More... | |
double | SimClock::Float::s |
These variables equal the number of ticks in the unit of time they're named after in a double. More... | |
double | SimClock::Float::ms |
millisecond More... | |
double | SimClock::Float::us |
microsecond More... | |
double | SimClock::Float::ns |
nanosecond More... | |
double | SimClock::Float::ps |
picosecond More... | |
double | SimClock::Float::Hz |
These variables the inverse of above. More... | |
double | SimClock::Float::kHz |
kHz More... | |
double | SimClock::Float::MHz |
MHz. More... | |
double | SimClock::Float::GHz |
GHz. More... | |
bool clockFrequencyFixed | ( | ) |
Definition at line 109 of file core.cc.
Referenced by pybind_init_core(), sc_core::sc_set_default_time_unit(), and sc_core::sc_set_time_resolution().
void doExitCleanup | ( | ) |
Do C++ simulator exit processing.
Exported to Python to be invoked when simulator terminates via Python's atexit mechanism.
Definition at line 150 of file core.cc.
References exitCallbacks(), and CallbackQueue::process().
Referenced by pybind_init_core().
|
inline |
Queue of C++ callbacks to invoke on simulator exit.
Definition at line 130 of file core.cc.
Referenced by doExitCleanup(), and registerExitCallback().
void fixClockFrequency | ( | ) |
Definition at line 81 of file core.cc.
References cprintf(), SimClock::Frequency, SimClock::Float::GHz, SimClock::Float::Hz, SimClock::Float::kHz, SimClock::Float::MHz, SimClock::Int::ms, SimClock::Int::ns, SimClock::Int::ps, SimClock::Int::s, and SimClock::Int::us.
Referenced by sc_core::sc_time::from_value(), and pybind_init_core().
Tick getClockFrequency | ( | ) |
Definition at line 118 of file core.cc.
Referenced by pybind_init_core().
void registerExitCallback | ( | const std::function< void()> & | callback | ) |
Register an exit callback.
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().
void setClockFrequency | ( | Tick | tps | ) |
Definition at line 112 of file core.cc.
References panic_if.
Referenced by pybind_init_core(), and sc_core::sc_set_time_resolution().
void setOutputDir | ( | const string & | dir | ) |
Definition at line 121 of file core.cc.
References OutputDirectory::setDirectory(), and simout.
Referenced by pybind_init_core().