41#include "params/PowerModel.hh"
42#include "params/PowerModelState.hh"
52 "Dynamic power for this object (Watts)"),
54 "Static power for this object (Watts)")
66 "Dynamic power for this power state"),
68 "Static power for this power state")
71 "Subsystem is NULL! This is not acceptable for a PowerModel!\n");
76 pms->setTemperature(
p.ambient_temp);
92 pms->setClockedObject(clkobj);
99 pms->setTemperature(temp);
107 *
this,
"thermalUpdate");
125 warn_if(
w[enums::PwrState::UNDEFINED] > 0,
126 "SimObject in UNDEFINED power state! Power figures might be wrong!\n");
153 warn(
"SimObject in UNDEFINED power state! "
154 "Power figures might be wrong!\n");
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
PowerModelStateParams Params
statistics::Value dynamicPower
PowerModelState(const Params &p)
virtual double getDynamicPower() const =0
Get the dynamic power consumption.
Temperature _temp
Current temperature.
ClockedObject * clocked_object
The clocked object we belong to.
virtual double getStaticPower() const =0
Get the static power consumption.
statistics::Value staticPower
Listener class to catch thermal events.
virtual void regProbePoints()
Register probe points for this object.
enums::PMType power_model_type
The type of power model - collects all power, static or dynamic only.
statistics::Value staticPower
double getStaticPower() const
Get the static power consumption.
void setClockedObject(ClockedObject *clkobj)
ClockedObject * clocked_object
The clocked object we belong to.
PowerModel(const Params &p)
ProbeListenerPtr< ThermalProbeListener > thermalListener
Listener to catch temperature changes in the SubSystem.
SubSystem * subsystem
The subsystem this power model belongs to.
void thermalUpdateCallback(const Temperature &temp)
std::vector< PowerModelState * > states_pm
Actual power models (one per power state)
double getDynamicPower() const
Get the dynamic power consumption.
statistics::Value dynamicPower
The class stores temperatures in Kelvin and provides helper methods to convert to/from Celsius.
ClockedObject declaration and implementation.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
SimObject(const Params &p)
#define warn_if(cond,...)
Conditional warning macro that checks the supplied condition and only prints a warning if the conditi...
Copyright (c) 2024 Arm Limited All rights reserved.
Declaration of Statistics objects.