Merge zizzer:/bk/newmem

into  zed.eecs.umich.edu:/z/hsul/work/sparc/m5

--HG--
extra : convert_revision : 6e58629b1e51f1fc493a89f16c3f2e676dc5d191
This commit is contained in:
Lisa Hsu
2006-12-12 21:19:51 -05:00
164 changed files with 9431 additions and 41220 deletions

View File

@@ -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")

View File

@@ -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