mathexpr_powermodel.cc (11967:e963e6ce139b) mathexpr_powermodel.cc (11968:f5da4fc4a6ff)
1/*
2 * Copyright (c) 2016-2017 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 101 unchanged lines hidden (view full) ---

110
111
112double
113MathExprPowerModel::getStatValue(const std::string &name) const
114{
115 using namespace Stats;
116
117 // Automatic variables:
1/*
2 * Copyright (c) 2016-2017 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 101 unchanged lines hidden (view full) ---

110
111
112double
113MathExprPowerModel::getStatValue(const std::string &name) const
114{
115 using namespace Stats;
116
117 // Automatic variables:
118 if (name == "temp")
118 if (name == "temp") {
119 return _temp;
119 return _temp;
120 } else if (name == "voltage") {
121 return clocked_object->voltage();
122 }
120
121 // Try to cast the stat, only these are supported right now
122 const auto it = stats_map.find(name);
123 if (it == stats_map.cend()) {
124 warn("Failed to find stat '%s'\n", name);
125 failed = true;
126 return 0;
127 }

--- 24 unchanged lines hidden ---
123
124 // Try to cast the stat, only these are supported right now
125 const auto it = stats_map.find(name);
126 if (it == stats_map.cend()) {
127 warn("Failed to find stat '%s'\n", name);
128 failed = true;
129 return 0;
130 }

--- 24 unchanged lines hidden ---