clocked_object.cc (11422:4f749e00b667) clocked_object.cc (11424:e07fd01651f3)
1/*
2 * Copyright (c) 2015 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

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

36 *
37 * Authors: Akash Bagdia
38 * David Guillen Fandos
39 */
40
41#include "sim/clocked_object.hh"
42
43#include "base/misc.hh"
1/*
2 * Copyright (c) 2015 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

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

36 *
37 * Authors: Akash Bagdia
38 * David Guillen Fandos
39 */
40
41#include "sim/clocked_object.hh"
42
43#include "base/misc.hh"
44#include "sim/power/power_model.hh"
44
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);
54}
55
45void
46ClockedObject::serialize(CheckpointOut &cp) const
47{
48 unsigned int currPwrState = (unsigned int)_currPwrState;
49
50 SERIALIZE_SCALAR(currPwrState);
51 SERIALIZE_SCALAR(prvEvalTick);
52}

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

--- 125 unchanged lines hidden ---