projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8327f8e
)
util: Add a "toEnergy" function to the convert module.
author
Gabe Black
<gabeblack@google.com>
Fri, 10 Nov 2017 11:36:57 +0000
(
03:36
-0800)
committer
Gabe Black
<gabeblack@google.com>
Mon, 13 Nov 2017 17:12:42 +0000
(17:12 +0000)
Change-Id: I7299af0e2a6ce9bd2272d6ccb898997336e95e51
Reviewed-on: https://gem5-review.googlesource.com/5623
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
src/python/m5/util/convert.py
patch
|
blob
|
history
diff --git
a/src/python/m5/util/convert.py
b/src/python/m5/util/convert.py
index cffa1bb492805b3d5a659fca452f82755035c046..5ae31216bd4c0adc12973e0f5bdf26297074f5c6 100644
(file)
--- 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')