diff options
Diffstat (limited to 'src/sim/power')
-rw-r--r-- | src/sim/power/mathexpr_powermodel.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sim/power/mathexpr_powermodel.cc b/src/sim/power/mathexpr_powermodel.cc index 13d225ee3..a77e14a08 100644 --- a/src/sim/power/mathexpr_powermodel.cc +++ b/src/sim/power/mathexpr_powermodel.cc @@ -115,8 +115,11 @@ MathExprPowerModel::getStatValue(const std::string &name) const using namespace Stats; // Automatic variables: - if (name == "temp") + if (name == "temp") { return _temp; + } else if (name == "voltage") { + return clocked_object->voltage(); + } // Try to cast the stat, only these are supported right now const auto it = stats_map.find(name); |