From 33648277448d8beb438b0d68f3bdda837dab37b2 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 4 Mar 2016 16:59:59 +0800 Subject: [PATCH] ttl/TTLClockGen: fix FTW computation with ref_multiplier != 1 --- artiq/coredevice/ttl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/coredevice/ttl.py b/artiq/coredevice/ttl.py index 2cd308f55..9ac12ca48 100644 --- a/artiq/coredevice/ttl.py +++ b/artiq/coredevice/ttl.py @@ -245,14 +245,14 @@ class TTLClockGen: """Returns the frequency tuning word corresponding to the given frequency. """ - return round(2**self.acc_width*frequency*self.core.ref_period) + return round(2**self.acc_width*frequency*self.core.coarse_ref_period) @portable def ftw_to_frequency(self, ftw): """Returns the frequency corresponding to the given frequency tuning word. """ - return ftw/self.core.ref_period/2**self.acc_width + return ftw/self.core.coarse_ref_period/2**self.acc_width @kernel def set_mu(self, frequency):