summaryrefslogtreecommitdiff
path: root/python/m5/convert.py
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2005-03-23 13:25:48 -0500
committerNathan Binkert <binkertn@umich.edu>2005-03-23 13:25:48 -0500
commit153130e5586e18025f7a0f05242ead3a7e2be881 (patch)
treee9a92385d5b06db63b202a27699f26996ab47974 /python/m5/convert.py
parent48e0b9ed4dd6f69cc41003d20bf755eeaf6fb633 (diff)
downloadgem5-153130e5586e18025f7a0f05242ead3a7e2be881.tar.xz
First step in fixing up parameter handling. Clean up the
way ranges work, more fully support metric prefixes for all integer types, and convert memory sized parameters to the MemorySize type. python/m5/config.py: - no more _Param and _ParamProxy stuff. Use the names ParamBase and ParamFactory to hopefully make it clearer what we intend. - Get rid of RangeSize and the old Range class and more fully flesh out the Range class to deal with types of parameters and different kinds of ranges. - Call toInteger on the CheckedInt types so we can use metric prefixes in strings for all integers. - Get rid of the K, M, and G constants. Use the proper type or call one of the functions in the convert package. python/m5/convert.py: Simple way to deal with both floating point and integer strings. python/m5/objects/BaseCache.mpy: python/m5/objects/Ethernet.mpy: This is a MemorySize typed parameter --HG-- extra : convert_revision : 92b4ea662d723abdd6c0a49065b79c25400fac9b
Diffstat (limited to 'python/m5/convert.py')
-rw-r--r--python/m5/convert.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/m5/convert.py b/python/m5/convert.py
index 2ebe93889..2f69645b9 100644
--- a/python/m5/convert.py
+++ b/python/m5/convert.py
@@ -60,7 +60,7 @@ def toInteger(value):
elif value.endswith('f'):
result = int(value[:-1]) * femto
else:
- result = int(value)
+ result = int(float(value))
return result