summaryrefslogtreecommitdiff
path: root/src/python/m5
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/m5')
-rw-r--r--src/python/m5/util/convert.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/python/m5/util/convert.py b/src/python/m5/util/convert.py
index cffa1bb49..5ae31216b 100644
--- a/src/python/m5/util/convert.py
+++ b/src/python/m5/util/convert.py
@@ -242,3 +242,6 @@ def toVoltage(value):
def toCurrent(value):
return toMetricFloat(value, 'current', 'A')
+
+def toEnergy(value):
+ return toMetricFloat(value, 'energy', 'J')