sub_system.hh (11420:b48c0ba4f524) sub_system.hh (11424:e07fd01651f3)
1/*
1/*
2 * Copyright (c) 2014 ARM Limited
2 * Copyright (c) 2014-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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

40/**
41 * @file
42 * SubSystem declarations.
43 */
44
45#ifndef __SIM_SUB_SYSTEM_HH__
46#define __SIM_SUB_SYSTEM_HH__
47
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

40/**
41 * @file
42 * SubSystem declarations.
43 */
44
45#ifndef __SIM_SUB_SYSTEM_HH__
46#define __SIM_SUB_SYSTEM_HH__
47
48#include <vector>
49
48#include "params/SubSystem.hh"
49#include "sim/power/thermal_domain.hh"
50#include "sim/sim_object.hh"
51
50#include "params/SubSystem.hh"
51#include "sim/power/thermal_domain.hh"
52#include "sim/sim_object.hh"
53
54class PowerModel;
55
52/**
53 * The SubSystem simobject does nothing, it is just a container for
54 * other simobjects used by the configuration system
55 */
56class SubSystem : public SimObject
57{
58 public:
59 typedef SubSystemParams Params;
60 SubSystem(const Params *p);
56/**
57 * The SubSystem simobject does nothing, it is just a container for
58 * other simobjects used by the configuration system
59 */
60class SubSystem : public SimObject
61{
62 public:
63 typedef SubSystemParams Params;
64 SubSystem(const Params *p);
65
66 double getDynamicPower() const;
67
68 double getStaticPower() const;
69
70 void registerPowerProducer(PowerModel *pm) {
71 powerProducers.push_back(pm);
72 }
73
74 protected:
75 std::vector<PowerModel*> powerProducers;
61};
62
63#endif
76};
77
78#endif