Go to the documentation of this file.
32 #include "config/the_isa.hh"
33 #include "debug/TimeSync.hh"
56 DPRINTF(TimeSync,
"Sleeping to sync with real time.\n");
62 }
while (diff < period);
107 _period.setTick(
p->time_sync_period);
108 _spinThreshold.setTick(
p->time_sync_spin_threshold);
110 assert(_root == NULL);
127 std::string isa = THE_ISA_STR;
138 static bool created =
false;
140 panic(
"only one root object allowed!");
147 return new Root(
this);
void timeSyncEnable(bool en)
Enable or disable time syncing.
uint64_t Tick
Tick count type.
void deschedule(Event &event)
const Params * params() const
void schedule(Event &event, Tick when)
bool timeSyncEnabled() const
Check whether time syncing is enabled.
const Time timeSyncPeriod() const
Retrieve the period for the sync event.
void sleep(const Time &time)
void startup() override
Schedule the timesync event at startup().
const Time timeSyncSpinThreshold() const
Retrieve the threshold for time remaining to spin wait.
unsigned int FullSystemInt
In addition to the boolean flag we make use of an unsigned int since the CPU instruction decoder make...
const std::string & name()
#define SERIALIZE_SCALAR(scalar)
Tick getTick() const
Get the current time from a value measured in Ticks.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
EventFunctionWrapper syncEvent
void setTimer()
Use this to set time for the purposes of time measurement (use a monotonic clock if it is available.
Tick simQuantum
Simulation Quantum for multiple eventq simulation.
std::ostream CheckpointOut
void serialize(CheckpointOut &cp) const override
Serialize an object.
#define panic(...)
This implements a cprintf based panic() function.
Tick curTick()
The current simulated tick.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17