Deleted Added
sdiff udiff text old ( 11968:f5da4fc4a6ff ) new ( 11972:9503a0d8c352 )
full compact
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

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

34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 * Authors: David Guillen Fandos
38 */
39
40#include "sim/power/mathexpr_powermodel.hh"
41
42#include "base/statistics.hh"
43#include "params/MathExprPowerModel.hh"
44#include "sim/mathexpr.hh"
45#include "sim/power/thermal_model.hh"
46#include "sim/sim_object.hh"
47
48MathExprPowerModel::MathExprPowerModel(const Params *p)
49 : PowerModelState(p), dyn_expr(p->dyn), st_expr(p->st), failed(false)

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

57 basename += path[i] + ".";
58}
59
60void
61MathExprPowerModel::startup()
62{
63 // Create a map with stats and pointers for quick access
64 // Has to be done here, since we need access to the statsList
65 for (auto & i: Stats::statsList())
66 if (i->name.find(basename) == 0)
67 stats_map[i->name.substr(basename.size())] = i;
68
69 tryEval(st_expr);
70 const bool st_failed = failed;
71
72 tryEval(dyn_expr);
73 const bool dyn_failed = failed;
74
75 if (st_failed || dyn_failed) {

--- 79 unchanged lines hidden ---