diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2014-01-24 15:29:29 -0600 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2014-01-24 15:29:29 -0600 |
commit | daa781d2db938dcc7bea4455b03838fa5bf6ddbf (patch) | |
tree | 2df81e8d2c0db8d09d055dac5b032b27be4360f2 /src/python/m5 | |
parent | f2b0b551cc02084dbabe0c14a2fd64dd85a3fbfc (diff) | |
download | gem5-daa781d2db938dcc7bea4455b03838fa5bf6ddbf.tar.xz |
config: Make the Clock a Tick parameter like Latency/Frequency
This patch makes the Clock a TickParamValue just like
Latency/Frequency. There is no longer any need to distinguish it
(originally needed to support multiplication).
Diffstat (limited to 'src/python/m5')
-rw-r--r-- | src/python/m5/params.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/python/m5/params.py b/src/python/m5/params.py index ff645bb37..0afc200a8 100644 --- a/src/python/m5/params.py +++ b/src/python/m5/params.py @@ -1220,22 +1220,9 @@ class Frequency(TickParamValue): def ini_str(self): return '%d' % self.getValue() -# A generic frequency and/or Latency value. Value is stored as a -# latency, and any manipulation using a multiplier thus scales the -# clock period, i.e. a 2x multiplier doubles the clock period and thus -# halves the clock frequency. -class Clock(ParamValue): - cxx_type = 'Tick' - - @classmethod - def cxx_predecls(cls, code): - code('#include "base/types.hh"') - - @classmethod - def swig_predecls(cls, code): - code('%import "stdint.i"') - code('%import "base/types.hh"') - +# A generic Frequency and/or Latency value. Value is stored as a +# latency, just like Latency and Frequency. +class Clock(TickParamValue): def __init__(self, value): if isinstance(value, (Latency, Clock)): self.ticks = value.ticks |