diff --git a/artiq/coredevice/ttl.py b/artiq/coredevice/ttl.py index 45c3d6fe9..9143dc7c9 100644 --- a/artiq/coredevice/ttl.py +++ b/artiq/coredevice/ttl.py @@ -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): diff --git a/flake.lock b/flake.lock index 4dff9bbdd..4d6488c01 100644 --- a/flake.lock +++ b/flake.lock @@ -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" },