Skip to content

Commit 62b872a

Browse files
committedAug 18, 2014
devices/dds_core: use new compiler features to compute tuning word trivially
1 parent 7a90f4f commit 62b872a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

Diff for: ‎artiq/devices/dds_core.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ def build(self):
1313
def pulse(self, frequency, duration):
1414
if self._previous_frequency != frequency:
1515
syscall("rtio_sync", self.rtio_channel) # wait until output is off
16-
syscall("dds_program", self.reg_channel,
17-
(frequency << 2)//(self.dds_sysclk >> 15) << 15)
16+
syscall("dds_program", self.reg_channel, int(2**32*frequency/self.dds_sysclk))
1817
self._previous_frequency = frequency
1918
syscall("rtio_set", now(), self.rtio_channel, 1)
2019
delay(duration)

0 commit comments

Comments
 (0)
Please sign in to comment.