Go to the documentation of this file.
44 #ifndef __SIM_CLOCKED_OBJECT_HH__
45 #define __SIM_CLOCKED_OBJECT_HH__
48 #include "params/ClockedObject.hh"
97 cycle += elapsedCycles;
137 cycle = elapsedCycles;
250 #endif //__SIM_CLOCKED_OBJECT_HH__
Helper class for objects that need to be clocked.
void serialize(CheckpointOut &cp) const override
Serialize an object.
ClockDomain & clockDomain
The clock domain this clocked object belongs to.
double voltage() const
Get the current voltage this clock domain operates at.
uint64_t Tick
Tick count type.
Clocked & operator=(Clocked &)=delete
const Params * params() const
ClockedObject(const ClockedObjectParams *p)
The ClockDomain provides clock to group of clocked objects bundled under the same clock domain.
Clocked(ClockDomain &clk_domain)
Create a clocked object and set the clock domain based on the parameters.
virtual void clockPeriodUpdated()
A hook subclasses can implement so they can do any extra work that's needed when the clock rate is ch...
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Tick Frequency
The simulated frequency of curTick(). (In ticks per second)
void update() const
Align cycle and tick to the next clock edge if not already done.
void updateClockPeriod()
Update the tick to the current tick.
T divCeil(const T &a, const U &b)
Tick cyclesToTicks(Cycles c) const
Helper class for objects that have power states.
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
uint64_t frequency() const
void resetClock() const
Reset the object's clock using the current global tick value.
const SimObjectParams * _params
Cached copy of the object parameters.
Cycles ticksToCycles(Tick t) const
ClockedObjectParams Params
Parameters of ClockedObject.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Cycles is a wrapper class for representing cycle counts, i.e.
Tick nextCycle() const
Based on the clock of the object, determine the start tick of the first cycle that is at least one cy...
std::ostream CheckpointOut
virtual ~Clocked()
Virtual destructor due to inheritance.
void registerWithClockDomain(Clocked *c)
Register a Clocked object with this ClockDomain.
Tick clockPeriod() const
Get the clock period.
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