diff -r d22fdcd09132 -r e5a2dc9bc2c2 src/python/m5/params.py --- a/src/python/m5/params.py Sun Apr 18 22:38:00 2010 -0700 +++ b/src/python/m5/params.py Sun Apr 18 22:38:18 2010 -0700 @@ -770,6 +770,11 @@ swig_predecls = ['%import "stdint.i"\n' + '%import "base/types.hh"'] + def __new__(cls, value): + if isinstance(value, str) and value.endswith('c'): + return proxy.Self.clock.latency * int(value[:-1]) + return NumericParamValue.__new__(cls) + def getValue(self): return long(self.value) @@ -847,6 +852,11 @@ cxx_predecls = ['#include "base/types.hh"'] swig_predecls = ['%import "stdint.i"\n' + '%import "base/types.hh"'] + def __new__(cls, value): + if isinstance(value, str) and value.endswith('c'): + return proxy.Self.clock.latency * int(value[:-1]) + return ParamValue.__new__(cls) + def __init__(self, value): if isinstance(value, (Latency, Clock)): self.ticks = value.ticks