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).
This commit is contained in:
parent
f2b0b551cc
commit
daa781d2db
1 changed files with 3 additions and 16 deletions
|
@ -1220,22 +1220,9 @@ class Frequency(TickParamValue):
|
||||||
def ini_str(self):
|
def ini_str(self):
|
||||||
return '%d' % self.getValue()
|
return '%d' % self.getValue()
|
||||||
|
|
||||||
# A generic frequency and/or Latency value. Value is stored as a
|
# A generic Frequency and/or Latency value. Value is stored as a
|
||||||
# latency, and any manipulation using a multiplier thus scales the
|
# latency, just like Latency and Frequency.
|
||||||
# clock period, i.e. a 2x multiplier doubles the clock period and thus
|
class Clock(TickParamValue):
|
||||||
# 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"')
|
|
||||||
|
|
||||||
def __init__(self, value):
|
def __init__(self, value):
|
||||||
if isinstance(value, (Latency, Clock)):
|
if isinstance(value, (Latency, Clock)):
|
||||||
self.ticks = value.ticks
|
self.ticks = value.ticks
|
||||||
|
|
Loading…
Reference in a new issue