Go to the documentation of this file.
41 #include "params/PowerModel.hh"
42 #include "params/PowerModelState.hh"
47 :
SimObject(
p), _temp(0), clocked_object(NULL),
49 "Dynamic power for this object (Watts)"),
60 clocked_object(NULL), power_model_type(
p.pm_type),
62 "Dynamic power for this power state"),
64 "Static power for this power state")
67 "Subsystem is NULL! This is not acceptable for a PowerModel!\n");
72 pms->setTemperature(
p.ambient_temp);
88 pms->setClockedObject(clkobj);
95 pms->setTemperature(temp);
121 warn_if(
w[Enums::PwrState::UNDEFINED] > 0,
122 "SimObject in UNDEFINED power state! Power figures might be wrong!\n");
149 warn(
"SimObject in UNDEFINED power state! "
150 "Power figures might be wrong!\n");
Stats::Value dynamicPower
Derived & method(T *obj, V(T::*method)() const)
Extended functor that calls the specified method of the provided object.
ClockedObject * clocked_object
The clocked object we belong to.
PowerModelStateParams Params
double getDynamicPower() const
Get the dynamic power consumption.
void setClockedObject(ClockedObject *clkobj)
PowerModel(const Params &p)
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
The class stores temperatures in Kelvin and provides helper methods to convert to/from Celsius.
std::unique_ptr< ThermalProbeListener > thermalListener
Listener to catch temperature changes in the SubSystem.
std::vector< double > getWeights() const
Returns the percentage residency for each power state.
Listener class to catch thermal events.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
virtual double getStaticPower() const =0
Get the static power consumption.
ProbeManager * getProbeManager()
Get the probe manager for this object.
#define warn_if(cond,...)
Conditional warning macro that checks the supplied condition and only prints a warning if the conditi...
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
PowerModelState(const Params &p)
Enums::PMType power_model_type
The type of power model - collects all power, static or dynamic only.
void registerPowerProducer(PowerModel *pm)
virtual double getDynamicPower() const =0
Get the dynamic power consumption.
std::vector< PowerModelState * > states_pm
Actual power models (one per power state)
double getStaticPower() const
Get the static power consumption.
uint64_t power(uint32_t n, uint32_t e)
Stats::Value dynamicPower
virtual void regProbePoints()
Register probe points for this object.
void thermalUpdateCallback(const Temperature &temp)
SubSystem * subsystem
The subsystem this power model belongs to.
Abstract superclass for simulation objects.
Generated on Tue Mar 23 2021 19:41:28 for gem5 by doxygen 1.8.17