From f902c0218ae3a8df558f1427302fbf0931b8f7d7 Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Tue, 5 Apr 2016 10:52:28 -0500 Subject: power: Add support for power models This patch adds some basic support for power models in gem5. The power interface is defined so it can interact with thermal models as well. It implements a simple power evaluator that can be used for simple power models that express power in the form of a math expression. These expressions can use stats within the same SimObject (or down its hierarchy) and some magic variables such as "temp" for temperature. In future patches we will extend this functionality to allow slightly more complex expressions. The model allows it to be extended to use other kinds of models. Finally, the thermal model is updated to use the power usage as input. --- src/sim/clocked_object.hh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/sim/clocked_object.hh') diff --git a/src/sim/clocked_object.hh b/src/sim/clocked_object.hh index 1ba5ca617..b88f2435d 100644 --- a/src/sim/clocked_object.hh +++ b/src/sim/clocked_object.hh @@ -236,11 +236,7 @@ class ClockedObject : public SimObject, public Clocked { public: - ClockedObject(const ClockedObjectParams *p) - : SimObject(p), Clocked(*p->clk_domain), - _currPwrState(p->default_p_state), - prvEvalTick(0) - { } + ClockedObject(const ClockedObjectParams *p); /** Parameters of ClockedObject */ typedef ClockedObjectParams Params; -- cgit v1.2.3