summaryrefslogtreecommitdiff
path: root/src/dev/arm/EnergyCtrl.py
diff options
context:
space:
mode:
authorGlenn Bergmans <glenn.bergmans@arm.com>2016-01-22 15:40:14 +0000
committerCurtis Dunham <curtis.dunham@arm.com>2018-01-29 22:22:29 +0000
commitaa80cc9edbfb46b1a83342a32858c1cf48ac61a2 (patch)
tree6926eda814931f154982fbb67ca8600d859ee7ca /src/dev/arm/EnergyCtrl.py
parent199ff5e67770592ee9cbb941db8e8ea740dc1084 (diff)
downloadgem5-aa80cc9edbfb46b1a83342a32858c1cf48ac61a2.tar.xz
arm: DT autogeneration - Generate energy controller node
Adds Device Tree methods for the energy controller to allow for DVFS simulations with automatically generated DTB files Change-Id: Id8682f07dff1bbe63987e757faa0694e03ee86ab Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/5966 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/dev/arm/EnergyCtrl.py')
-rw-r--r--src/dev/arm/EnergyCtrl.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dev/arm/EnergyCtrl.py b/src/dev/arm/EnergyCtrl.py
index 4e504bf80..571f94178 100644
--- a/src/dev/arm/EnergyCtrl.py
+++ b/src/dev/arm/EnergyCtrl.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2012-2014 ARM Limited
+# Copyright (c) 2012-2014, 2016 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
@@ -35,13 +35,23 @@
#
# Authors: Vasileios Spiliopoulos
# Akash Bagdia
+# Glenn Bergmans
from m5.params import *
from m5.SimObject import SimObject
from Device import BasicPioDevice
from m5.proxy import *
+from m5.util.fdthelper import *
class EnergyCtrl(BasicPioDevice):
type = 'EnergyCtrl'
cxx_header = "dev/arm/energy_ctrl.hh"
dvfs_handler = Param.DVFSHandler(Parent.dvfs_handler, "DVFS handler")
+
+ def generateDeviceTree(self, state):
+ node = self.generateBasicPioDeviceNode(state, 'gem5_energy_ctrl',
+ self.pio_addr, 0x1000)
+
+ node.appendCompatible("arm,gem5-energy-ctrl")
+
+ yield node