From abae5c67283a5e10d0b58ec7292f4f1894ded032 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 17 Nov 2014 18:36:00 -0700 Subject: [PATCH] coredevice/dds: round FTW instead of flooring --- artiq/coredevice/dds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/coredevice/dds.py b/artiq/coredevice/dds.py index a8a726401..dce18f2e9 100644 --- a/artiq/coredevice/dds.py +++ b/artiq/coredevice/dds.py @@ -29,7 +29,7 @@ class DDS(AutoContext): frequency. """ - return int(2**32*frequency/self.dds_sysclk) + return round(2**32*frequency/self.dds_sysclk) @portable def ftw_to_frequency(self, ftw):