summaryrefslogtreecommitdiff
path: root/src/python/m5
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2006-12-15 13:06:37 -0500
committerLisa Hsu <hsul@eecs.umich.edu>2006-12-15 13:06:37 -0500
commitb93b32ec3395971631467cb6116e278f6f205c90 (patch)
tree194d336cdf736a7972c7fe4b36803a45d48a9a62 /src/python/m5
parent573d59441e420f02fd7cf3e31158258f5eee3ab1 (diff)
parent98bb1c62b31e988f81d9fc03cf14aca25fd008db (diff)
downloadgem5-b93b32ec3395971631467cb6116e278f6f205c90.tar.xz
Merge zizzer:/bk/sparcfs
into zed.eecs.umich.edu:/z/hsul/work/m5/newmem --HG-- extra : convert_revision : 92a865a90a7c3e251ed1443f79640f761b359c1d
Diffstat (limited to 'src/python/m5')
-rw-r--r--src/python/m5/objects/Repl.py6
-rw-r--r--src/python/m5/params.py11
2 files changed, 13 insertions, 4 deletions
diff --git a/src/python/m5/objects/Repl.py b/src/python/m5/objects/Repl.py
index 10892cf6f..b76aa1d6e 100644
--- a/src/python/m5/objects/Repl.py
+++ b/src/python/m5/objects/Repl.py
@@ -6,6 +6,6 @@ class Repl(SimObject):
class GenRepl(Repl):
type = 'GenRepl'
- fresh_res = Param.Int("associativity")
- num_pools = Param.Int("capacity in bytes")
- pool_res = Param.Int("block size in bytes")
+ fresh_res = Param.Int("Fresh pool residency time")
+ num_pools = Param.Int("Number of priority pools")
+ pool_res = Param.Int("Pool residency time")
diff --git a/src/python/m5/params.py b/src/python/m5/params.py
index 9e5f985c3..d83d5f73f 100644
--- a/src/python/m5/params.py
+++ b/src/python/m5/params.py
@@ -237,6 +237,12 @@ class NumericParamValue(ParamValue):
def __float__(self):
return float(self.value)
+ def __long__(self):
+ return long(self.value)
+
+ def __int__(self):
+ return int(self.value)
+
# hook for bounds checking
def _check(self):
return
@@ -308,8 +314,11 @@ class CheckedInt(NumericParamValue):
def __init__(self, value):
if isinstance(value, str):
self.value = convert.toInteger(value)
- elif isinstance(value, (int, long, float)):
+ elif isinstance(value, (int, long, float, NumericParamValue)):
self.value = long(value)
+ else:
+ raise TypeError, "Can't convert object of type %s to CheckedInt" \
+ % type(value).__name__
self._check()
class Int(CheckedInt): cxx_type = 'int'; size = 32; unsigned = False