From a9cf89215bb3d7fc5b947eb7be9e9e937bdfecf6 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 14 Jan 2016 15:25:01 -0700 Subject: [PATCH] coredevice/dds: use explicit 64-bit ints for ftw computations --- artiq/coredevice/dds.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/coredevice/dds.py b/artiq/coredevice/dds.py index 419bb442b..99cbc72af 100644 --- a/artiq/coredevice/dds.py +++ b/artiq/coredevice/dds.py @@ -87,14 +87,14 @@ class _DDSGeneric: """Returns the frequency tuning word corresponding to the given frequency. """ - return round(2**32*frequency/self.sysclk) + return round(int(2, width=64)**32*frequency/self.sysclk) @portable def ftw_to_frequency(self, ftw): """Returns the frequency corresponding to the given frequency tuning word. """ - return ftw*self.sysclk/2**32 + return ftw*self.sysclk/int(2, width=64)**32 @portable def turns_to_pow(self, turns):