1/*
2 * Copyright (c) 2016-2018 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
--- 43 unchanged lines hidden (view full) ---
52
53PowerModel::PowerModel(const Params *p)
54 : SimObject(p), states_pm(p->pm), subsystem(p->subsystem),
55 clocked_object(NULL), power_model_type(p->pm_type)
56{
57 panic_if(subsystem == NULL,
58 "Subsystem is NULL! This is not acceptable for a PowerModel!\n");
59 subsystem->registerPowerProducer(this);
60}
61
62void
63PowerModel::setClockedObject(ClockedObject * clkobj)
64{
65 this->clocked_object = clkobj;
66
67 for (auto & pms: states_pm)
--- 80 unchanged lines hidden ---
2 * Copyright (c) 2016-2018 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
--- 43 unchanged lines hidden (view full) ---
52
53PowerModel::PowerModel(const Params *p)
54 : SimObject(p), states_pm(p->pm), subsystem(p->subsystem),
55 clocked_object(NULL), power_model_type(p->pm_type)
56{
57 panic_if(subsystem == NULL,
58 "Subsystem is NULL! This is not acceptable for a PowerModel!\n");
59 subsystem->registerPowerProducer(this);
60}
61
62void
63PowerModel::setClockedObject(ClockedObject * clkobj)
64{
65 this->clocked_object = clkobj;
66
67 for (auto & pms: states_pm)
--- 80 unchanged lines hidden ---