python: Fix incorrect prefixes is m5.utils.convert
authorAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 19 Jan 2021 16:05:08 +0000 (16:05 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 20 Jan 2021 17:23:45 +0000 (17:23 +0000)
The conversion functions incorrectly assumed that kibibytes are 'kiB'
rather than 'KiB' (correct).

Change-Id: I7ef9e54546fdb3379435b40af6d9f619ad9b37a5
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39375
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/python/m5/util/convert.py

index d3088f603b59cf48f5ff846201c9c9039c5d50fa..73335e62b8a6cae3e618a8f50a6eea3711f7dfda 100644 (file)
@@ -62,7 +62,7 @@ metric_prefixes = {
     'Gi': gibi,
     'G': giga,
     'M': mega,
-    'ki': kibi,
+    'Ki': kibi,
     'k': kilo,
     'Mi': mebi,
     'm': milli,
@@ -84,7 +84,7 @@ binary_prefixes = {
     'G' : gibi,
     'Mi': mebi,
     'M' : mebi,
-    'ki': kibi,
+    'Ki': kibi,
     'k' : kibi,
 }