mirror of https://github.com/m-labs/artiq.git
update NAC3, use power operator
This commit is contained in:
parent
4ad8f5d6c7
commit
02555e48a0
|
@ -482,16 +482,14 @@ class TTLClockGen:
|
|||
"""Returns the frequency tuning word corresponding to the given
|
||||
frequency.
|
||||
"""
|
||||
# NAC3TODO return round64(2**self.acc_width*frequency*self.core.coarse_ref_period)
|
||||
return 0
|
||||
return round(2.**float(self.acc_width)*frequency*self.core.coarse_ref_period)
|
||||
|
||||
@portable
|
||||
def ftw_to_frequency(self, ftw: int32) -> float:
|
||||
"""Returns the frequency corresponding to the given frequency tuning
|
||||
word.
|
||||
"""
|
||||
# NAC3TODO return float(ftw)/self.core.coarse_ref_period/2**int64(self.acc_width)
|
||||
return 0.0
|
||||
return float(ftw)/self.core.coarse_ref_period/2.**float(self.acc_width)
|
||||
|
||||
@kernel
|
||||
def set_mu(self, frequency: int32):
|
||||
|
|
|
@ -80,11 +80,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1641304829,
|
||||
"narHash": "sha256-bXD7l+MMCgUzHPGybsF3poDLU5B8QLpbmuXecIOtMbk=",
|
||||
"lastModified": 1641699066,
|
||||
"narHash": "sha256-tjcdd8h9Jy1JzZKPjCVGYJtC4sXLmteMrpVeXs0Cff4=",
|
||||
"ref": "master",
|
||||
"rev": "52ccf31bb17f804f2700eb88de4ddc61e9a38476",
|
||||
"revCount": 536,
|
||||
"rev": "8ef9e74aaf0e548d4b636a1d1c1cb208b26b04c1",
|
||||
"revCount": 544,
|
||||
"type": "git",
|
||||
"url": "https://git.m-labs.hk/M-Labs/nac3.git"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue