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