diff --git a/artiq/coredevice/ad9912.py b/artiq/coredevice/ad9912.py index f8b139be8..56df7a7ea 100644 --- a/artiq/coredevice/ad9912.py +++ b/artiq/coredevice/ad9912.py @@ -157,6 +157,13 @@ class AD9912: """ return int64(round(self.ftw_per_hz*frequency)) + @portable(flags={"fast-math"}) + def ftw_to_frequency(self, ftw): + """Returns the frequency corresponding to the given + frequency tuning word. + """ + return ftw/self.ftw_per_hz + @portable(flags={"fast-math"}) def turns_to_pow(self, phase): """Returns the phase offset word corresponding to the given