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);
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);
#define panic(...)
This implements a cprintf based panic() function.
void startup() override
Schedule the timesync event at startup().
const Time timeSyncSpinThreshold() const
Retrieve the threshold for time remaining to spin wait.
const Time timeSyncPeriod() const
Retrieve the period for the sync event.
void serialize(CheckpointOut &cp) const override
Serialize an object.
EventFunctionWrapper syncEvent
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
Tick curTick()
The current simulated tick.
uint64_t Tick
Tick count type.
void deschedule(Event &event)
void schedule(Event &event, Tick when)
#define SERIALIZE_SCALAR(scalar)
void timeSyncEnable(bool en)
Enable or disable time syncing.
virtual const std::string name() const
const Params * params() const
std::ostream CheckpointOut
void setTick(Tick ticks)
Set the current time from a value measured in Ticks.
void setTimer()
Use this to set time for the purposes of time measurement (use a monotonic clock if it is available...
Tick getTick() const
Get the current time from a value measured in Ticks.
void sleep(const Time &time)
unsigned int FullSystemInt
In addition to the boolean flag we make use of an unsigned int since the CPU instruction decoder make...
Abstract superclass for simulation objects.
Tick simQuantum
Simulation Quantum for multiple eventq simulation.
bool timeSyncEnabled() const
Check whether time syncing is enabled.