summaryrefslogtreecommitdiff
path: root/src/sim/VoltageDomain.py
diff options
context:
space:
mode:
authorStephan Diestelhorst <stephan.diestelhorst@arm.com>2014-06-30 13:56:06 -0400
committerStephan Diestelhorst <stephan.diestelhorst@arm.com>2014-06-30 13:56:06 -0400
commit65cea4708e2f2f2cb361e12b6385d4bc29618223 (patch)
tree9f190702d43e89e2ddb44b6af363330f301ec8fb /src/sim/VoltageDomain.py
parent641e6028304187468b94753752555e9d082a77ac (diff)
downloadgem5-65cea4708e2f2f2cb361e12b6385d4bc29618223.tar.xz
power: Add basic DVFS support for gem5
Adds DVFS capabilities to gem5, by allowing users to specify lists for frequencies and voltages in SrcClockDomains and VoltageDomains respectively. A separate component, DVFSHandler, provides a small interface to change operating points of the associated domains. Clock domains will be linked to voltage domains and thus allow separate clock, but shared voltage lines. Currently all the valid performance-level updates are performed with a fixed transition latency as specified for the domain. Config file example: ... vd = VoltageDomain(voltage = ['1V','0.95V','0.90V','0.85V']) tsys.cluster1.clk_domain.clock = ['1GHz','700MHz','400MHz','230MHz'] tsys.cluster2.clk_domain.clock = ['1GHz','700MHz','400MHz','230MHz'] tsys.cluster1.clk_domain.domain_id = 0 tsys.cluster2.clk_domain.domain_id = 1 tsys.cluster1.clk_domain.voltage_domain = vd tsys.cluster2.clk_domain.voltage_domain = vd tsys.dvfs_handler.domains = [tsys.cluster1.clk_domain, tsys.cluster2.clk_domain] tsys.dvfs_handler.enable = True
Diffstat (limited to 'src/sim/VoltageDomain.py')
-rw-r--r--src/sim/VoltageDomain.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/sim/VoltageDomain.py b/src/sim/VoltageDomain.py
index ad84d756b..d6ccf9979 100644
--- a/src/sim/VoltageDomain.py
+++ b/src/sim/VoltageDomain.py
@@ -42,6 +42,11 @@ from m5.params import *
class VoltageDomain(SimObject):
type = 'VoltageDomain'
cxx_header = "sim/voltage_domain.hh"
- # We use a default voltage of 1V to avoid forcing users to set it
- # even if they are not interested in using the functionality
- voltage = Param.Voltage('1V', "Operational voltage")
+
+ # Single or list of voltages for the voltage domain. If only a single
+ # voltage is specified, it is used for all different frequencies.
+ # Otherwise, the number of specified voltges and frequencies in the clock
+ # domain (src/sim/ClockDomain.py) must match. Voltages must be specified in
+ # descending order. We use a default voltage of 1V to avoid forcing users to
+ # set it even if they are not interested in using the functionality
+ voltage = VectorParam.Voltage('1V', "Operational voltage(s)")