diff --git a/src/python/m5/util/convert.py b/src/python/m5/util/convert.py index cffa1bb492..5ae31216bd 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')