mirror of https://github.com/m-labs/artiq.git
ttl/TTLClockGen: fix FTW computation with ref_multiplier != 1
This commit is contained in:
parent
4352d15016
commit
3364827744
|
@ -245,14 +245,14 @@ class TTLClockGen:
|
||||||
"""Returns the frequency tuning word corresponding to the given
|
"""Returns the frequency tuning word corresponding to the given
|
||||||
frequency.
|
frequency.
|
||||||
"""
|
"""
|
||||||
return round(2**self.acc_width*frequency*self.core.ref_period)
|
return round(2**self.acc_width*frequency*self.core.coarse_ref_period)
|
||||||
|
|
||||||
@portable
|
@portable
|
||||||
def ftw_to_frequency(self, ftw):
|
def ftw_to_frequency(self, ftw):
|
||||||
"""Returns the frequency corresponding to the given frequency tuning
|
"""Returns the frequency corresponding to the given frequency tuning
|
||||||
word.
|
word.
|
||||||
"""
|
"""
|
||||||
return ftw/self.core.ref_period/2**self.acc_width
|
return ftw/self.core.coarse_ref_period/2**self.acc_width
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def set_mu(self, frequency):
|
def set_mu(self, frequency):
|
||||||
|
|
Loading…
Reference in New Issue