gem5  v20.1.0.0
Namespaces | Functions | Variables
core.cc File Reference
#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)
 
CallbackQueueexitCallbacks ()
 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...
 

Function Documentation

◆ clockFrequencyFixed()

bool clockFrequencyFixed ( )

◆ doExitCleanup()

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

◆ exitCallbacks()

CallbackQueue& exitCallbacks ( )
inline

Queue of C++ callbacks to invoke on simulator exit.

Definition at line 130 of file core.cc.

Referenced by doExitCleanup(), and registerExitCallback().

◆ fixClockFrequency()

void fixClockFrequency ( )

◆ getClockFrequency()

Tick getClockFrequency ( )

Definition at line 118 of file core.cc.

Referenced by pybind_init_core().

◆ registerExitCallback()

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

◆ setClockFrequency()

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

◆ setOutputDir()

void setOutputDir ( const string &  dir)

Definition at line 121 of file core.cc.

References OutputDirectory::setDirectory(), and simout.

Referenced by pybind_init_core().


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