Go to the documentation of this file.
43 #include "params/MathExprPowerModel.hh"
62 for (
auto var: vars) {
64 if (var ==
"temp" || var ==
"voltage" || var ==
"clock_period") {
69 fatal_if(!info,
"Failed to evaluate %s in expression:\n%s\n",
81 this, std::placeholders::_1)
88 using namespace statistics;
93 }
else if (
name ==
"voltage") {
95 }
else if (
name==
"clock_period") {
101 const Info *info = it->second;
111 panic(
"Unknown stat type!\n");
constexpr double toCelsius() const
double eval(EvalCallback fn) const
Evaluates the expression.
void regStats() override
Callback to set stat parameters.
const Info * resolve(const std::string &name)
ClockedObject * clocked_object
The clocked object we belong to.
double eval(const MathExpr &expr) const
Evaluate an expression in the context of this object, fatal if evaluation fails.
virtual std::string name() const
double getStatValue(const std::string &name) const
Get the value for a variable (maps to a stat)
std::unordered_map< std::string, const statistics::Info * > statsMap
MathExprPowerModelParams Params
void startup() override
startup() is the final initialization call before simulation.
const std::string & name()
virtual void regStats()
Callback to set stat parameters.
Temperature _temp
Current temperature.
MathExprPowerModel(const Params &p)
A PowerModelState is an abstract class used as interface to get power figures out of SimObjects.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
#define panic(...)
This implements a cprintf based panic() function.
Generated on Sun Jul 30 2023 01:56:59 for gem5 by doxygen 1.8.17