ticked_object.hh (10464:2a0fe8bca031) | ticked_object.hh (10905:a6ca6831e775) |
---|---|
1/* 2 * Copyright (c) 2013-2014 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 42 unchanged lines hidden (view full) --- 51#include "params/TickedObject.hh" 52#include "sim/clocked_object.hh" 53 54/** Ticked attaches gem5's event queue/scheduler to evaluate 55 * calls and provides a start/stop interface to ticking. 56 * 57 * Ticked is not a ClockedObject but can be attached to one by 58 * inheritance and by calling regStats, serialize/unserialize */ | 1/* 2 * Copyright (c) 2013-2014 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 42 unchanged lines hidden (view full) --- 51#include "params/TickedObject.hh" 52#include "sim/clocked_object.hh" 53 54/** Ticked attaches gem5's event queue/scheduler to evaluate 55 * calls and provides a start/stop interface to ticking. 56 * 57 * Ticked is not a ClockedObject but can be attached to one by 58 * inheritance and by calling regStats, serialize/unserialize */ |
59class Ticked | 59class Ticked : public Serializable |
60{ 61 protected: 62 /** An event to call process periodically */ 63 class ClockEvent : public Event 64 { 65 public: 66 Ticked &owner; 67 --- 91 unchanged lines hidden (view full) --- 159 if (event.scheduled()) 160 object.deschedule(event); 161 running = false; 162 resetLastStopped(); 163 } 164 } 165 166 /** Checkpoint lastStopped */ | 60{ 61 protected: 62 /** An event to call process periodically */ 63 class ClockEvent : public Event 64 { 65 public: 66 Ticked &owner; 67 --- 91 unchanged lines hidden (view full) --- 159 if (event.scheduled()) 160 object.deschedule(event); 161 running = false; 162 resetLastStopped(); 163 } 164 } 165 166 /** Checkpoint lastStopped */ |
167 void serialize(std::ostream &os); 168 void unserialize(Checkpoint *cp, const std::string §ion); | 167 void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE; 168 void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE; |
169 170 /** Action to call on the clock tick */ 171 virtual void evaluate() = 0; 172 173 /** 174 * Callback to handle cycle statistics and probes. 175 * 176 * This callback is called at the beginning of a new cycle active --- 17 unchanged lines hidden (view full) --- 194 195 /** Disambiguate to make these functions overload correctly */ 196 using ClockedObject::regStats; 197 using ClockedObject::serialize; 198 using ClockedObject::unserialize; 199 200 /** Pass on regStats, serialize etc. onto Ticked */ 201 void regStats(); | 169 170 /** Action to call on the clock tick */ 171 virtual void evaluate() = 0; 172 173 /** 174 * Callback to handle cycle statistics and probes. 175 * 176 * This callback is called at the beginning of a new cycle active --- 17 unchanged lines hidden (view full) --- 194 195 /** Disambiguate to make these functions overload correctly */ 196 using ClockedObject::regStats; 197 using ClockedObject::serialize; 198 using ClockedObject::unserialize; 199 200 /** Pass on regStats, serialize etc. onto Ticked */ 201 void regStats(); |
202 void serialize(std::ostream &os); 203 void unserialize(Checkpoint *cp, const std::string §ion); | 202 void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE; 203 void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE; |
204}; 205 206#endif /* __SIM_TICKED_OBJECT_HH__ */ | 204}; 205 206#endif /* __SIM_TICKED_OBJECT_HH__ */ |