mirror of https://github.com/m-labs/artiq.git
ad9912: fix frequency_to_ftw
This commit is contained in:
parent
f4acf04405
commit
cc1080e055
|
@ -208,7 +208,7 @@ class AD9912:
|
||||||
"""Returns the 48-bit frequency tuning word corresponding to the given
|
"""Returns the 48-bit frequency tuning word corresponding to the given
|
||||||
frequency.
|
frequency.
|
||||||
"""
|
"""
|
||||||
return int64(round(self.ftw_per_hz * frequency)) & (
|
return round64(self.ftw_per_hz * frequency) & (
|
||||||
(int64(1) << int64(48)) - int64(1))
|
(int64(1) << int64(48)) - int64(1))
|
||||||
|
|
||||||
@portable
|
@portable
|
||||||
|
|
Loading…
Reference in New Issue