Go to the documentation of this file.
46 #ifndef __SIM_TICKED_OBJECT_HH__
47 #define __SIM_TICKED_OBJECT_HH__
51 class TickedObjectParams;
107 object.schedule(
event,
object.clockEdge(
Cycles(1)));
134 object.deschedule(
event);
virtual void regStats()
Callback to set stat parameters.
bool scheduled() const
Determine if the current event is scheduled.
Ticked(ClockedObject &object_, Stats::Scalar *imported_num_cycles=NULL, Event::Priority priority=Event::CPU_Tick_Pri)
void start()
Start ticking.
static const Priority CPU_Tick_Pri
CPU ticks must come after other associated CPU events (such as writebacks).
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Cycles cyclesSinceLastStopped() const
How long have we been stopped for?
Basic support for object serialization.
void serialize(CheckpointOut &cp) const override
Serialize an object.
void regStats() override
Pass on regStats, serialize etc.
ClockedObject & object
ClockedObject who is responsible for this Ticked's actions/stats.
bool running
Have I been started? and am not stopped.
void processClockEvent()
Evaluate and reschedule.
Stats::Scalar tickCycles
Number of cycles ticked.
TickedObject(const TickedObjectParams *params, Event::Priority priority=Event::CPU_Tick_Pri)
const Params * params() const
void unserialize(CheckpointIn &cp) override
Unserialize an object.
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
This is a simple scalar statistic, like a counter.
Cycles lastStopped
Time of last stop event to calculate run time.
Stats::Formula idleCycles
Number of cycles stopped.
void stop()
Cancel the next tick event and issue no more.
Ticked attaches gem5's event queue/scheduler to evaluate calls and provides a start/stop interface to...
TickedObject attaches Ticked to ClockedObject and can be used as a base class where ticked operation.
void resetLastStopped()
Reset stopped time to current time.
Stats::Scalar * numCyclesLocal
Locally allocated stats.
EventFunctionWrapper event
The wrapper for processClockEvent.
void serialize(CheckpointOut &cp) const override
Serialize an object.
void serialize(CheckpointOut &cp) const override
Checkpoint lastStopped.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Cycles is a wrapper class for representing cycle counts, i.e.
void regStats()
Register {num,ticks}Cycles if necessary.
virtual void evaluate()=0
Action to call on the clock tick.
std::ostream CheckpointOut
virtual void countCycles(Cycles delta)
Callback to handle cycle statistics and probes.
Stats::Scalar & numCycles
Total number of cycles either ticked or spend stopped.
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17