forked from M-Labs/artiq
DDS monitor fixes
This commit is contained in:
parent
83fd5fdf16
commit
f47c2e54e1
|
@ -21,8 +21,8 @@ class AD9858(Module):
|
||||||
|
|
||||||
# keep track of frequency tuning words, before they are FUDed
|
# keep track of frequency tuning words, before they are FUDed
|
||||||
ftws = [Signal(32) for i in range(nchannels)]
|
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 += \
|
self.sync.rio += \
|
||||||
If(self.rtlink.o.stb & \
|
If(self.rtlink.o.stb & \
|
||||||
(self.rtlink.o.address == 0x0a+i) & \
|
(self.rtlink.o.address == 0x0a+i) & \
|
||||||
|
@ -31,6 +31,6 @@ class AD9858(Module):
|
||||||
)
|
)
|
||||||
|
|
||||||
# FTW to probe on FUD
|
# 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)
|
fud = self.rtlink.o.stb & (self.rtlink.o.address == 64)
|
||||||
self.sync.rio += If(fud & (current_channel == c), probe.eq(ftw))
|
self.sync.rio += If(fud & (current_channel == c), probe.eq(ftw))
|
||||||
|
|
|
@ -139,7 +139,7 @@ class _DDSWidget(QtGui.QFrame):
|
||||||
def set_value(self, ftw):
|
def set_value(self, ftw):
|
||||||
frequency = ftw*self.sysclk/2**32
|
frequency = ftw*self.sysclk/2**32
|
||||||
self._value.setText("<font size=\"9\">{:.3f} MHz</font>"
|
self._value.setText("<font size=\"9\">{:.3f} MHz</font>"
|
||||||
.format(float(frequency)))
|
.format(float(frequency)/1e6))
|
||||||
|
|
||||||
|
|
||||||
class _DeviceManager:
|
class _DeviceManager:
|
||||||
|
|
Loading…
Reference in New Issue