From cc1080e0553e997935d631d62188c7a8f8645652 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 19 Nov 2021 12:42:08 +0800 Subject: [PATCH] ad9912: fix frequency_to_ftw --- artiq/coredevice/ad9912.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/coredevice/ad9912.py b/artiq/coredevice/ad9912.py index d8e35898f..5c294d1de 100644 --- a/artiq/coredevice/ad9912.py +++ b/artiq/coredevice/ad9912.py @@ -208,7 +208,7 @@ class AD9912: """Returns the 48-bit frequency tuning word corresponding to the given frequency. """ - return int64(round(self.ftw_per_hz * frequency)) & ( + return round64(self.ftw_per_hz * frequency) & ( (int64(1) << int64(48)) - int64(1)) @portable