From f5befba5c973808ac5150ec062eb9d9be7f2fd36 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 19 Nov 2018 13:24:28 +0800 Subject: [PATCH 1/7] conda: bump misoc (attempt to WA conda problem) --- conda/artiq-dev/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda/artiq-dev/meta.yaml b/conda/artiq-dev/meta.yaml index 4b596ccd1..5b87fb011 100644 --- a/conda/artiq-dev/meta.yaml +++ b/conda/artiq-dev/meta.yaml @@ -15,7 +15,7 @@ requirements: - python >=3.5.3,<3.6 - setuptools 33.1.1 - migen 0.8 py35_0+git2d62c0c - - misoc 0.11 py35_33+git128750aa + - misoc 0.11 py35_34+git714ea689 - jesd204b 0.10 - microscope - binutils-or1k-linux >=2.27 From 22a223bf821099a9bf7d4b7dfae61f8344b5625d Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 19 Nov 2018 21:42:36 +0800 Subject: [PATCH 2/7] examples/master: clean up remnants of early urukul tests --- artiq/examples/master/device_db.py | 192 +---------------------------- 1 file changed, 3 insertions(+), 189 deletions(-) diff --git a/artiq/examples/master/device_db.py b/artiq/examples/master/device_db.py index ad4bc65b6..0d7a2d5e8 100644 --- a/artiq/examples/master/device_db.py +++ b/artiq/examples/master/device_db.py @@ -120,34 +120,6 @@ device_db = { "arguments": {"channel": 26} }, - # FMC DIO used to connect to Zotino - "fmcdio_dirctl_clk": { - "type": "local", - "module": "artiq.coredevice.ttl", - "class": "TTLOut", - "arguments": {"channel": 27} - }, - "fmcdio_dirctl_ser": { - "type": "local", - "module": "artiq.coredevice.ttl", - "class": "TTLOut", - "arguments": {"channel": 28} - }, - "fmcdio_dirctl_latch": { - "type": "local", - "module": "artiq.coredevice.ttl", - "class": "TTLOut", - "arguments": {"channel": 29} - }, - "fmcdio_dirctl": { - "type": "local", - "module": "artiq.coredevice.shiftreg", - "class": "ShiftReg", - "arguments": {"clk": "fmcdio_dirctl_clk", - "ser": "fmcdio_dirctl_ser", - "latch": "fmcdio_dirctl_latch"} - }, - # DAC "spi_ams101": { "type": "local", @@ -161,184 +133,26 @@ device_db = { "class": "TTLOut", "arguments": {"channel": 20} }, - "spi_zotino": { - "type": "local", - "module": "artiq.coredevice.spi2", - "class": "SPIMaster", - "arguments": {"channel": 30} - }, - "ttl_zotino_ldac": { - "type": "local", - "module": "artiq.coredevice.ttl", - "class": "TTLOut", - "arguments": {"channel": 31} - }, - "dac_zotino": { - "type": "local", - "module": "artiq.coredevice.zotino", - "class": "Zotino", - "arguments": { - "spi_device": "spi_zotino", - "ldac_device": "ttl_zotino_ldac", - "div_write": 30, - "div_read": 40 - } - }, - - "spi_urukul": { - "type": "local", - "module": "artiq.coredevice.spi2", - "class": "SPIMaster", - "arguments": {"channel": 32} - }, - "ttl_urukul_io_update": { - "type": "local", - "module": "artiq.coredevice.ttl", - "class": "TTLOut", - "arguments": {"channel": 33} - }, - "ttl_urukul_sw0": { - "type": "local", - "module": "artiq.coredevice.ttl", - "class": "TTLOut", - "arguments": {"channel": 35} - }, - "ttl_urukul_sw1": { - "type": "local", - "module": "artiq.coredevice.ttl", - "class": "TTLOut", - "arguments": {"channel": 36} - }, - "ttl_urukul_sw2": { - "type": "local", - "module": "artiq.coredevice.ttl", - "class": "TTLOut", - "arguments": {"channel": 37} - }, - "ttl_urukul_sw3": { - "type": "local", - "module": "artiq.coredevice.ttl", - "class": "TTLOut", - "arguments": {"channel": 38} - }, - "urukul_cpld": { - "type": "local", - "module": "artiq.coredevice.urukul", - "class": "CPLD", - "arguments": { - "spi_device": "spi_urukul", - "io_update_device": "ttl_urukul_io_update", - "refclk": 100e6 - } - }, - "urukul_ch0a": { - "type": "local", - "module": "artiq.coredevice.ad9912", - "class": "AD9912", - "arguments": { - "pll_n": 10, - "chip_select": 4, - "cpld_device": "urukul_cpld", - "sw_device": "ttl_urukul_sw0" - } - }, - "urukul_ch1a": { - "type": "local", - "module": "artiq.coredevice.ad9912", - "class": "AD9912", - "arguments": { - "pll_n": 10, - "chip_select": 5, - "cpld_device": "urukul_cpld", - "sw_device": "ttl_urukul_sw1" - } - }, - "urukul_ch2a": { - "type": "local", - "module": "artiq.coredevice.ad9912", - "class": "AD9912", - "arguments": { - "pll_n": 10, - "chip_select": 6, - "cpld_device": "urukul_cpld", - "sw_device": "ttl_urukul_sw2" - } - }, - "urukul_ch3a": { - "type": "local", - "module": "artiq.coredevice.ad9912", - "class": "AD9912", - "arguments": { - "pll_n": 10, - "chip_select": 7, - "cpld_device": "urukul_cpld", - "sw_device": "ttl_urukul_sw3" - } - }, - "urukul_ch0b": { - "type": "local", - "module": "artiq.coredevice.ad9910", - "class": "AD9910", - "arguments": { - "pll_n": 40, - "chip_select": 4, - "cpld_device": "urukul_cpld", - "sw_device": "ttl_urukul_sw0" - } - }, - "urukul_ch1b": { - "type": "local", - "module": "artiq.coredevice.ad9910", - "class": "AD9910", - "arguments": { - "pll_n": 40, - "chip_select": 5, - "cpld_device": "urukul_cpld", - "sw_device": "ttl_urukul_sw1" - } - }, - "urukul_ch2b": { - "type": "local", - "module": "artiq.coredevice.ad9910", - "class": "AD9910", - "arguments": { - "pll_n": 40, - "chip_select": 6, - "cpld_device": "urukul_cpld", - "sw_device": "ttl_urukul_sw2" - } - }, - "urukul_ch3b": { - "type": "local", - "module": "artiq.coredevice.ad9910", - "class": "AD9910", - "arguments": { - "pll_n": 40, - "chip_select": 7, - "cpld_device": "urukul_cpld", - "sw_device": "ttl_urukul_sw3" - } - }, # AD9914 DDS "ad9914dds0": { "type": "local", "module": "artiq.coredevice.ad9914", "class": "AD9914", - "arguments": {"sysclk": 3e9, "bus_channel": 39, "channel": 0}, + "arguments": {"sysclk": 3e9, "bus_channel": 27, "channel": 0}, "comment": "Comments work in DDS panel as well" }, "ad9914dds1": { "type": "local", "module": "artiq.coredevice.ad9914", "class": "AD9914", - "arguments": {"sysclk": 3e9, "bus_channel": 39, "channel": 1} + "arguments": {"sysclk": 3e9, "bus_channel": 27, "channel": 1} }, "ad9914dds2": { "type": "local", "module": "artiq.coredevice.ad9914", "class": "AD9914", - "arguments": {"sysclk": 3e9, "bus_channel": 39, "channel": 2} + "arguments": {"sysclk": 3e9, "bus_channel": 27, "channel": 2} }, # Aliases From 8f9858be4c93f86774316ef406c40f4be6c28467 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 19 Nov 2018 22:00:20 +0800 Subject: [PATCH 3/7] ad9914: remove automatic continuous phase compensation (like Urukul) --- RELEASE_NOTES.rst | 5 +++++ artiq/coredevice/ad9914.py | 20 ++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index 155b86e2c..37c7f7c20 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -67,6 +67,11 @@ ARTIQ-4 clocks dynamically (i.e. without device restart) is no longer supported. * ``set_dataset(..., save=True)`` has been renamed ``set_dataset(..., archive=True)``. +* On the AD9914 DDS, when switching to ``PHASE_MODE_CONTINUOUS`` from another mode, + use the returned value of the last ``set_mu`` call as the phase offset for + ``PHASE_MODE_CONTINUOUS`` to avoid a phase discontinuity. This is no longer done + automatically. If one phase glitch when entering ``PHASE_MODE_CONTINUOUS`` is not + an issue, this recommendation can be ignored. ARTIQ-3 diff --git a/artiq/coredevice/ad9914.py b/artiq/coredevice/ad9914.py index d37efec8b..f3cd8e1c4 100644 --- a/artiq/coredevice/ad9914.py +++ b/artiq/coredevice/ad9914.py @@ -80,8 +80,6 @@ class AD9914: self.set_x_duration_mu = 7 * self.write_duration_mu self.exit_x_duration_mu = 3 * self.write_duration_mu - self.continuous_phase_comp = 0 - @kernel def write(self, addr, data): rtio_output(now_mu(), self.bus_channel, addr, data) @@ -194,18 +192,16 @@ class AD9914: The "frequency update" pulse is sent to the DDS with a fixed latency with respect to the current position of the time cursor. - When switching from other phase modes to the continuous phase mode, - there is no jump in the DDS phase. This is however not true when - using the continuous phase mode after playing back a DMA sequence - that contained the other phase modes. - :param ftw: frequency to generate. :param pow: adds an offset to the phase. :param phase_mode: if specified, overrides the default phase mode set by :meth:`set_phase_mode` for this call. :param ref_time: reference time used to compute phase. Specifying this makes it easier to have a well-defined phase relationship between - DDSes on the same bus that are updated at a similar time. + DDSes on the same bus that are updated at a similar time. + :return: Resulting phase offset word after application of phase + tracking offset. When using :const:`PHASE_MODE_CONTINUOUS` in + subsequent calls, use this value as the "current" phase. """ if phase_mode == _PHASE_MODE_DEFAULT: phase_mode = self.phase_mode @@ -224,7 +220,6 @@ class AD9914: # Do not clear phase accumulator on FUD # Disable autoclear phase accumulator and enables OSK. self.write(AD9914_REG_CFR1L, 0x0108) - pow += self.continuous_phase_comp else: # Clear phase accumulator on FUD # Enable autoclear phase accumulator and enables OSK. @@ -233,11 +228,11 @@ class AD9914: pow -= int32((ref_time - fud_time) * self.sysclk_per_mu * ftw >> (32 - 16)) if phase_mode == PHASE_MODE_TRACKING: pow += int32(ref_time * self.sysclk_per_mu * ftw >> (32 - 16)) - self.continuous_phase_comp = pow self.write(AD9914_REG_POW, pow) self.write(AD9914_REG_ASF, asf) self.write(AD9914_FUD, 0) + return pow @portable(flags={"fast-math"}) def frequency_to_ftw(self, frequency): @@ -280,9 +275,10 @@ class AD9914: def set(self, frequency, phase=0.0, phase_mode=_PHASE_MODE_DEFAULT, amplitude=1.0): """Like :meth:`set_mu`, but uses Hz and turns.""" - self.set_mu(self.frequency_to_ftw(frequency), + return self.pow_to_turns( + self.set_mu(self.frequency_to_ftw(frequency), self.turns_to_pow(phase), phase_mode, - self.amplitude_to_asf(amplitude)) + self.amplitude_to_asf(amplitude))) # Extended-resolution functions @kernel From bf50dcf76d9afa4d4943aa237767c129cb1ca2d1 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 20 Nov 2018 17:15:53 +0800 Subject: [PATCH 4/7] conda: use misoc release --- RELEASE_NOTES.rst | 8 ++++++++ conda/artiq-dev/meta.yaml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index 37c7f7c20..b48faa796 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -3,6 +3,14 @@ Release notes ============= +ARTIQ-5 +------- + +5.0 +*** + + + ARTIQ-4 ------- diff --git a/conda/artiq-dev/meta.yaml b/conda/artiq-dev/meta.yaml index 5b87fb011..8212a62c1 100644 --- a/conda/artiq-dev/meta.yaml +++ b/conda/artiq-dev/meta.yaml @@ -15,7 +15,7 @@ requirements: - python >=3.5.3,<3.6 - setuptools 33.1.1 - migen 0.8 py35_0+git2d62c0c - - misoc 0.11 py35_34+git714ea689 + - misoc 0.12 py35_0+git714ea689 - jesd204b 0.10 - microscope - binutils-or1k-linux >=2.27 From 58ea111b8bc645794a37613cdd5c271c47015d53 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 20 Nov 2018 18:40:12 +0800 Subject: [PATCH 5/7] create 5.0.dev From a81c12de947aa09a877efc1bf6840007b71a265f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Sun, 25 Nov 2018 16:56:45 +0100 Subject: [PATCH 6/7] urukul: work around windows numpy int peculiarity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "OverflowError: Python int too large to convert to C long" otherwise opticlock#74 Signed-off-by: Robert Jördens --- artiq/coredevice/urukul.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/coredevice/urukul.py b/artiq/coredevice/urukul.py index 52221a018..2371c8f3c 100644 --- a/artiq/coredevice/urukul.py +++ b/artiq/coredevice/urukul.py @@ -1,7 +1,7 @@ from artiq.language.core import kernel, delay, portable, at_mu, now_mu from artiq.language.units import us, ms -from numpy import int32 +from numpy import int32, int64 from artiq.coredevice import spi2 as spi @@ -175,7 +175,7 @@ class CPLD: self.cfg_reg = urukul_cfg(rf_sw=rf_sw, led=0, profile=0, io_update=0, mask_nu=0, clk_sel=clk_sel, sync_sel=sync_sel, rst=0, io_rst=0) - self.att_reg = int32(att) + self.att_reg = int32(int64(att)) self.sync_div = sync_div @kernel From af9ea1f3240477039d89877db430e3feb5c97442 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 26 Nov 2018 01:01:36 +0800 Subject: [PATCH 7/7] gui: update background --- artiq/gui/logo_ver.svg | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/artiq/gui/logo_ver.svg b/artiq/gui/logo_ver.svg index e24387b27..43a4dcd3b 100644 --- a/artiq/gui/logo_ver.svg +++ b/artiq/gui/logo_ver.svg @@ -18,11 +18,11 @@ enable-background="new 0 0 800 800" xml:space="preserve" id="svg2" - inkscape:version="0.92.2 5c3e80d, 2017-08-06" + inkscape:version="0.92.3 (2405546, 2018-03-11)" sodipodi:docname="logo_ver.svg">image/svg+xml \ No newline at end of file + aria-label="5" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:96px;line-height:25px;font-family:'Droid Sans Thai';-inkscape-font-specification:'Droid Sans Thai, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none" + id="text38"> \ No newline at end of file