clocked_object.cc (12263:860fad010585) clocked_object.cc (12265:7db0f21ff605)
1/*
2 * Copyright (c) 2015-2016 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

--- 35 unchanged lines hidden (view full) ---

44#include "sim/power/power_model.hh"
45
46ClockedObject::ClockedObject(const ClockedObjectParams *p) :
47 SimObject(p), Clocked(*p->clk_domain),
48 _currPwrState(p->default_p_state),
49 prvEvalTick(0)
50{
51 // Register the power_model with the object
1/*
2 * Copyright (c) 2015-2016 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

--- 35 unchanged lines hidden (view full) ---

44#include "sim/power/power_model.hh"
45
46ClockedObject::ClockedObject(const ClockedObjectParams *p) :
47 SimObject(p), Clocked(*p->clk_domain),
48 _currPwrState(p->default_p_state),
49 prvEvalTick(0)
50{
51 // Register the power_model with the object
52 if (p->power_model)
53 p->power_model->setClockedObject(this);
52 for (auto & power_model: p->power_model)
53 power_model->setClockedObject(this);
54}
55
56void
57ClockedObject::serialize(CheckpointOut &cp) const
58{
59 unsigned int currPwrState = (unsigned int)_currPwrState;
60
61 SERIALIZE_SCALAR(currPwrState);

--- 130 unchanged lines hidden ---
54}
55
56void
57ClockedObject::serialize(CheckpointOut &cp) const
58{
59 unsigned int currPwrState = (unsigned int)_currPwrState;
60
61 SERIALIZE_SCALAR(currPwrState);

--- 130 unchanged lines hidden ---