From f47c2e54e1efa28b3a5e87a7362ef2adda7c5243 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 19 Jun 2015 17:36:46 -0600 Subject: [PATCH] DDS monitor fixes --- artiq/gateware/rtio/phy/dds.py | 6 +++--- artiq/gui/moninj.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/artiq/gateware/rtio/phy/dds.py b/artiq/gateware/rtio/phy/dds.py index b39b86180..a0daec62b 100644 --- a/artiq/gateware/rtio/phy/dds.py +++ b/artiq/gateware/rtio/phy/dds.py @@ -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)) diff --git a/artiq/gui/moninj.py b/artiq/gui/moninj.py index c106d1a5a..9d8495c5e 100644 --- a/artiq/gui/moninj.py +++ b/artiq/gui/moninj.py @@ -139,7 +139,7 @@ class _DDSWidget(QtGui.QFrame): def set_value(self, ftw): frequency = ftw*self.sysclk/2**32 self._value.setText("{:.3f} MHz" - .format(float(frequency))) + .format(float(frequency)/1e6)) class _DeviceManager: