TTLClockGen: expose acc_width

Signed-off-by: Robert Jördens <rj@quartiq.de>
This commit is contained in:
Robert Jördens 2018-10-25 09:52:00 +00:00
parent f755a4682a
commit f62c1ff0bb

View File

@ -371,16 +371,17 @@ class TTLClockGen:
The time cursor is not modified by any function in this class.
:param channel: channel number
:param acc_width: accumulator width in bits
"""
kernel_invariants = {"core", "channel", "acc_width"}
def __init__(self, dmgr, channel, core_device="core"):
def __init__(self, dmgr, channel, acc_width=24, core_device="core"):
self.core = dmgr.get(core_device)
self.channel = channel
# in RTIO cycles
self.previous_timestamp = numpy.int64(0)
self.acc_width = numpy.int64(24)
self.acc_width = numpy.int64(acc_width)
@portable
def frequency_to_ftw(self, frequency):