forked from M-Labs/artiq
1
0
Fork 0

DDS monitor fixes

This commit is contained in:
Sebastien Bourdeauducq 2015-06-19 17:36:46 -06:00
parent 83fd5fdf16
commit f47c2e54e1
2 changed files with 4 additions and 4 deletions

View File

@ -21,8 +21,8 @@ class AD9858(Module):
# keep track of frequency tuning words, before they are FUDed
ftws = [Signal(32) for i in range(nchannels)]
for i in range(4):
for c, ftw in enumerate(ftws):
for c, ftw in enumerate(ftws):
for i in range(4):
self.sync.rio += \
If(self.rtlink.o.stb & \
(self.rtlink.o.address == 0x0a+i) & \
@ -31,6 +31,6 @@ class AD9858(Module):
)
# FTW to probe on FUD
for c, (probe, ftw) in enumerate(zip(self.probes, ftw)):
for c, (probe, ftw) in enumerate(zip(self.probes, ftws)):
fud = self.rtlink.o.stb & (self.rtlink.o.address == 64)
self.sync.rio += If(fud & (current_channel == c), probe.eq(ftw))

View File

@ -139,7 +139,7 @@ class _DDSWidget(QtGui.QFrame):
def set_value(self, ftw):
frequency = ftw*self.sysclk/2**32
self._value.setText("<font size=\"9\">{:.3f} MHz</font>"
.format(float(frequency)))
.format(float(frequency)/1e6))
class _DeviceManager: