2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-26 11:48:27 +08:00

ad9912: fix frequency_to_ftw

This commit is contained in:
Sebastien Bourdeauducq 2021-11-19 12:42:08 +08:00
parent f4acf04405
commit cc1080e055

View File

@ -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