summaryrefslogtreecommitdiff
path: root/src/sim/power/PowerModel.py
diff options
context:
space:
mode:
authorAnouk Van Laer <anouk.vanlaer@arm.com>2017-03-01 17:05:18 +0000
committerAnouk Van Laer <anouk.vanlaer@arm.com>2018-02-28 21:55:35 +0000
commited0f02e1f68e8771f4de514716f34c3de32b3045 (patch)
treeb9dafb62a24ee3e7c876c255b245123a736c2ab2 /src/sim/power/PowerModel.py
parentfbe63074e3a8128bdbe1a5e8f6509c565a3abbd4 (diff)
downloadgem5-ed0f02e1f68e8771f4de514716f34c3de32b3045.tar.xz
sim: Added model type to power model
Static, dynamic or all to differentiate between types of power models so for example static models will not be asked for a dynamic power Change-Id: I3a0385821f7c671aedddaebeb038c677367faa81 Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/8601 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/sim/power/PowerModel.py')
-rw-r--r--src/sim/power/PowerModel.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sim/power/PowerModel.py b/src/sim/power/PowerModel.py
index ecb45b442..342569013 100644
--- a/src/sim/power/PowerModel.py
+++ b/src/sim/power/PowerModel.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 ARM Limited
+# Copyright (c) 2016-2018 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
@@ -39,6 +39,9 @@ from m5.SimObject import *
from m5.params import *
from m5.proxy import Parent
+# Enum for a type of power model
+class PMType(Enum) : vals = ['All', 'Static', 'Dynamic']
+
# Represents a power model for a simobj
# The model itself is also a SimObject so we can make use some
# nice features available such as Parent.any
@@ -57,3 +60,6 @@ class PowerModel(SimObject):
# Need a reference to the system so we can query the thermal domain
# about temperature (temperature is needed for leakage calculation)
subsystem = Param.SubSystem(Parent.any, "subsystem")
+
+ # Type of power model
+ pm_type = Param.PMType("All", "Type of power model")