diff options
Diffstat (limited to 'src/sim/clocked_object.cc')
-rw-r--r-- | src/sim/clocked_object.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sim/clocked_object.cc b/src/sim/clocked_object.cc index 1af41feed..44b25cd5d 100644 --- a/src/sim/clocked_object.cc +++ b/src/sim/clocked_object.cc @@ -41,6 +41,17 @@ #include "sim/clocked_object.hh" #include "base/misc.hh" +#include "sim/power/power_model.hh" + +ClockedObject::ClockedObject(const ClockedObjectParams *p) : + SimObject(p), Clocked(*p->clk_domain), + _currPwrState(p->default_p_state), + prvEvalTick(0) +{ + // Register the power_model with the object + if (p->power_model) + p->power_model->setClockedObject(this); +} void ClockedObject::serialize(CheckpointOut &cp) const |