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 9a682a4ce..e679f03a0 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 |