power: Add support for power models
authorDavid Guillen Fandos <david.guillen@arm.com>
Tue, 5 Apr 2016 15:52:28 +0000 (10:52 -0500)
committerDavid Guillen Fandos <david.guillen@arm.com>
Tue, 5 Apr 2016 15:52:28 +0000 (10:52 -0500)
commitf902c0218ae3a8df558f1427302fbf0931b8f7d7
treeb82de4efdff69b2511941fe9312fa9e96601f710
parent1c34ee20dfbbd557e394d61825232b10c0f3d37f
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.
18 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/power/thermal_domain.cc
src/sim/sub_system.cc
src/sim/sub_system.hh