Gabe Black has submitted this change and it was merged. ( 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
Reviewed-on: https://gem5-review.googlesource.com/5623
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
---
M src/python/m5/util/convert.py
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved



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: merged
Gerrit-Change-Id: I7299af0e2a6ce9bd2272d6ccb898997336e95e51
Gerrit-Change-Number: 5623
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to