forked from M-Labs/artiq
coredevice/dds: round FTW instead of flooring
This commit is contained in:
parent
f11fb0f553
commit
abae5c6728
|
@ -29,7 +29,7 @@ class DDS(AutoContext):
|
||||||
frequency.
|
frequency.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return int(2**32*frequency/self.dds_sysclk)
|
return round(2**32*frequency/self.dds_sysclk)
|
||||||
|
|
||||||
@portable
|
@portable
|
||||||
def ftw_to_frequency(self, ftw):
|
def ftw_to_frequency(self, ftw):
|
||||||
|
|
Loading…
Reference in New Issue