sim: Adding support for power models
authorDavid Guillen Fandos <david.guillen@arm.com>
Mon, 6 Jun 2016 16:16:44 +0000 (17:16 +0100)
committerDavid Guillen Fandos <david.guillen@arm.com>
Mon, 6 Jun 2016 16:16:44 +0000 (17:16 +0100)
commit7cfb59d6e580bac0d663bc22da315aed7746fdeb
treed600a1e07357e2a56c0a73f0f41b2d6eff59c2d3
parentfb5fc11da49938660ea22c336964677cdba890e1
sim: Adding 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.

Change-Id: I76752f9638b6815e229fd74cdcb7721a305cbc4b
17 files changed:
src/doc/power_thermal_model.doxygen [new file with mode: 0644]
src/sim/ClockedObject.py
src/sim/SConscript
src/sim/clocked_object.cc
src/sim/clocked_object.hh
src/sim/mathexpr.cc [new file with mode: 0644]
src/sim/mathexpr.hh [new file with mode: 0644]
src/sim/power/MathExprPowerModel.py [new file with mode: 0644]
src/sim/power/PowerModel.py [new file with mode: 0644]
src/sim/power/PowerModelState.py [new file with mode: 0644]
src/sim/power/SConscript
src/sim/power/mathexpr_powermodel.cc [new file with mode: 0644]
src/sim/power/mathexpr_powermodel.hh [new file with mode: 0644]
src/sim/power/power_model.cc [new file with mode: 0644]
src/sim/power/power_model.hh [new file with mode: 0644]
src/sim/sub_system.cc
src/sim/sub_system.hh