Go to the documentation of this file.
41 #include "params/PowerModel.hh"
42 #include "params/PowerModelState.hh"
52 :
SimObject(
p), states_pm(
p->pm), subsystem(
p->subsystem),
53 clocked_object(NULL), power_model_type(
p->pm_type)
56 "Subsystem is NULL! This is not acceptable for a PowerModel!\n");
61 pms->setTemperature(
p->ambient_temp);
72 pms->setClockedObject(clkobj);
79 pms->setTemperature(temp);
91 PowerModelParams::create()
111 warn_if(
w[Enums::PwrState::UNDEFINED] > 0,
112 "SimObject in UNDEFINED power state! Power figures might be wrong!\n");
139 warn(
"SimObject in UNDEFINED power state! "
140 "Power figures might be wrong!\n");
ClockedObject * clocked_object
The clocked object we belong to.
PowerModelStateParams Params
PowerModel(const Params *p)
double getDynamicPower() const
Get the dynamic power consumption.
void setClockedObject(ClockedObject *clkobj)
void thermalUpdateCallback(const double &temp)
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
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.
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...
Enums::PMType power_model_type
The type of power model - collects all power, static or dynamic only.
void registerPowerProducer(PowerModel *pm)
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)
PowerModelState(const Params *p)
virtual void regProbePoints()
Register probe points for this object.
SubSystem * subsystem
The subsystem this power model belongs to.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17