Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/5623

Change subject: util: Add a "toEnergy" function to the convert module.
......................................................................

util: Add a "toEnergy" function to the convert module.

Change-Id: I7299af0e2a6ce9bd2272d6ccb898997336e95e51
---
M src/python/m5/util/convert.py
1 file changed, 3 insertions(+), 0 deletions(-)



diff --git a/src/python/m5/util/convert.py b/src/python/m5/util/convert.py
index cffa1bb..5ae3121 100644
--- a/src/python/m5/util/convert.py
+++ b/src/python/m5/util/convert.py
@@ -242,3 +242,6 @@

 def toCurrent(value):
     return toMetricFloat(value, 'current', 'A')
+
+def toEnergy(value):
+    return toMetricFloat(value, 'energy', 'J')

--
To view, visit https://gem5-review.googlesource.com/5623
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7299af0e2a6ce9bd2272d6ccb898997336e95e51
Gerrit-Change-Number: 5623
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to