From 08b65470cdacfe6297cddfca6065af5700872d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Wed, 16 Feb 2022 14:34:22 +0000 Subject: [PATCH 1/8] fastino: robustify init() * init() now also clear and resets more state including the interpolators. If not done, this PLL unlocks/locks may lead to random interpolator state on boot to which the CICs react badly. * Use and expose `t_frame` * Clarify implementation state of `read()` --- artiq/coredevice/fastino.py | 40 ++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/artiq/coredevice/fastino.py b/artiq/coredevice/fastino.py index ede875863..53d3c6f79 100644 --- a/artiq/coredevice/fastino.py +++ b/artiq/coredevice/fastino.py @@ -1,12 +1,12 @@ """RTIO driver for the Fastino 32channel, 16 bit, 2.5 MS/s per channel, streaming DAC. """ -from numpy import int32 +from numpy import int32, int64 from artiq.language.core import kernel, portable, delay, delay_mu from artiq.coredevice.rtio import (rtio_output, rtio_output_wide, rtio_input_data) -from artiq.language.units import us +from artiq.language.units import ns from artiq.language.types import TInt32, TList @@ -41,24 +41,45 @@ class Fastino: :param log2_width: Width of DAC channel group (logarithm base 2). Value must match the corresponding value in the RTIO PHY (gateware). """ - kernel_invariants = {"core", "channel", "width"} + kernel_invariants = {"core", "channel", "width", "t_frame"} def __init__(self, dmgr, channel, core_device="core", log2_width=0): self.channel = channel << 8 self.core = dmgr.get(core_device) self.width = 1 << log2_width + # frame duration in mu (14 words each 7 clock cycles each 4 ns) + # self.core.seconds_to_mu(14*7*4*ns) # unfortunately this may round wrong + assert self.core.ref_period == 1*ns + self.t_frame = int64(14*7*4) @kernel def init(self): """Initialize the device. - This clears reset, unsets DAC_CLR, enables AFE_PWR, - clears error counters, then enables error counting + * disables RESET, DAC_CLR, enables AFE_PWR + * clears error counters, enables error counting + * turns LEDs off + * clears `hold` and `continuous` on all channels + * clear and resets interpolators to unit rate change on all + channels + + It does not change set channel voltages and does not reset the PLLs or clock + domains. """ self.set_cfg(reset=0, afe_power_down=0, dac_clr=0, clr_err=1) - delay(1*us) + delay_mu(self.t_frame) self.set_cfg(reset=0, afe_power_down=0, dac_clr=0, clr_err=0) - delay(1*us) + delay_mu(self.t_frame) + self.set_continuous(0) + delay_mu(self.t_frame) + self.stage_cic(1) + delay_mu(self.t_frame) + self.apply_cic(0xffffffff) + delay_mu(self.t_frame) + self.set_leds(0) + delay_mu(self.t_frame) + self.set_hold(0) + delay_mu(self.t_frame) @kernel def write(self, addr, data): @@ -78,8 +99,9 @@ class Fastino: :param addr: Address to read from. :return: The data read. """ - rtio_output(self.channel | addr | 0x80) - return rtio_input_data(self.channel >> 8) + raise NotImplementedError + # rtio_output(self.channel | addr | 0x80) + # return rtio_input_data(self.channel >> 8) @kernel def set_dac_mu(self, dac, data): From c8b9eed9c9a17aecca035a2721e5c26f06f3b39b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Wed, 16 Feb 2022 14:42:22 +0000 Subject: [PATCH 2/8] fastino: add comments about sideeffects on v0.1 --- artiq/coredevice/fastino.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/artiq/coredevice/fastino.py b/artiq/coredevice/fastino.py index 53d3c6f79..c2ea4ad2c 100644 --- a/artiq/coredevice/fastino.py +++ b/artiq/coredevice/fastino.py @@ -65,6 +65,9 @@ class Fastino: It does not change set channel voltages and does not reset the PLLs or clock domains. + + Note: On Fastino gateware before v0.2 this may lead to 0 voltage being emitted + transiently. """ self.set_cfg(reset=0, afe_power_down=0, dac_clr=0, clr_err=1) delay_mu(self.t_frame) @@ -274,9 +277,12 @@ class Fastino: def apply_cic(self, channel_mask): """Apply the staged interpolator configuration on the specified channels. - Each Fastino channel includes a fourth order (cubic) CIC interpolator with - variable rate change and variable output gain compensation (see - :meth:`stage_cic`). + Each Fastino channel starting with gateware v0.2 includes a fourth order + (cubic) CIC interpolator with variable rate change and variable output + gain compensation (see :meth:`stage_cic`). + + Fastino gateware before v0.2 does not include the interpolators and the + methods affecting the CICs should not be used. Channels using non-unity interpolation rate should have continous DAC updates enabled (see :meth:`set_continuous`) unless From a106ed02950b9a90e348c61f0bf8a508082cc537 Mon Sep 17 00:00:00 2001 From: Mike Birtwell Date: Fri, 18 Feb 2022 10:54:17 +0000 Subject: [PATCH 3/8] artiq_flash: don't try to make rtm_binary_dir if binary_dir unset (#1851) Signed-off-by: Michael Birtwell --- artiq/frontend/artiq_flash.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/artiq/frontend/artiq_flash.py b/artiq/frontend/artiq_flash.py index 12475cf0b..532d1da92 100755 --- a/artiq/frontend/artiq_flash.py +++ b/artiq/frontend/artiq_flash.py @@ -347,7 +347,10 @@ def main(): raise ValueError("the directory containing the binaries need to be specified using -d.") binary_dir = args.dir - rtm_binary_dir = os.path.join(binary_dir, "rtm") + if binary_dir is not None: + rtm_binary_dir = os.path.join(binary_dir, "rtm") + else: + rtm_binary_dir = None if args.host is None: client = LocalClient() From e84056f7e027a0d239a8a3e3cf8462763cb41c1a Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 21 Feb 2022 16:20:14 +0800 Subject: [PATCH 4/8] manual: Flakes installation instructions. Closes #1835 --- doc/manual/developing.rst | 2 + doc/manual/installing.rst | 161 +++++++++++++++++++------------------- 2 files changed, 83 insertions(+), 80 deletions(-) diff --git a/doc/manual/developing.rst b/doc/manual/developing.rst index 91ac11f07..7435cd1cc 100644 --- a/doc/manual/developing.rst +++ b/doc/manual/developing.rst @@ -1,3 +1,5 @@ +.. _developing-artiq: + Developing ARTIQ ^^^^^^^^^^^^^^^^ diff --git a/doc/manual/installing.rst b/doc/manual/installing.rst index 0b9ac8c18..d9090f695 100644 --- a/doc/manual/installing.rst +++ b/doc/manual/installing.rst @@ -14,91 +14,81 @@ In the current state of affairs, we recommend that Linux users install ARTIQ via Installing via Nix (Linux) -------------------------- -.. note:: - Make sure you are using a 64-bit x86 Linux system. If you are using other systems, such as 32-bit x86, Nix will attempt to compile a number of dependencies from source on your machine. This may work, but the installation process will use a lot of CPU time, memory, and disk space. +First, install the Nix package manager. Some distributions provide a package for the Nix package manager, otherwise, it can be installed via the script on the `Nix website `_. Make sure you get Nix version 2.4 or higher. -First, install the Nix package manager. Some distributions provide a package for the Nix package manager, otherwise, it can be installed via the script on the `Nix website `_. +Once Nix is installed, enable Flakes :: -Once Nix is installed, add the M-Labs package channel with: :: + $ mkdir -p ~/.config/nix + $ echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf - $ nix-channel --add https://nixbld.m-labs.hk/channel/custom/artiq/full-beta/artiq-full +The easiest way to obtain ARTIQ is then to install it into the user environment with ``$ nix profile install git+https://github.com/m-labs/artiq.git``. Answer "Yes" to the questions about setting Nix configuration options. This provides a minimal installation of ARTIQ where the usual commands (``artiq_master``, ``artiq_dashboard``, ``artiq_run``, etc.) are available. -Those channels track `nixpkgs 21.05 `_. You can check the latest status through the `Hydra interface `_. As the Nix package manager default installation uses the development version of nixpkgs, we need to tell it to switch to the release: :: +This installation is however quite limited, as Nix creates a dedicated Python environment for the ARTIQ commands alone. This means that other useful Python packages that you may want (pandas, matplotlib, ...) are not available to them. - $ nix-channel --remove nixpkgs - $ nix-channel --add https://nixos.org/channels/nixos-21.05 nixpkgs - -Finally, make all the channel changes effective: :: - - $ nix-channel --update - -Nix won't install packages without verifying their cryptographic signature. Add the M-Labs public key by creating the file ``~/.config/nix/nix.conf`` with the following contents: +Installing multiple packages and making them visible to the ARTIQ commands requires using the Nix language. Create an empty directory with a file ``flake.nix`` with the following contents: :: - substituters = https://cache.nixos.org https://nixbld.m-labs.hk - trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc= + { + inputs.artiq.url = "git+https://github.com/m-labs/artiq.git"; + inputs.extrapkg.url = "git+https://git.m-labs.hk/M-Labs/artiq-extrapkg.git"; + inputs.extrapkg.inputs.artiq.follows = "artiq"; + outputs = { self, artiq, extrapkg }: + let + pkgs = artiq.inputs.nixpkgs.legacyPackages.x86_64-linux; + aqmain = artiq.packages.x86_64-linux; + aqextra = extrapkg.packages.x86_64-linux; + in { + defaultPackage.x86_64-linux = pkgs.buildEnv { + name = "artiq-env"; + paths = [ + # ======================================== + # EDIT BELOW + # ======================================== + (pkgs.python3.withPackages(ps: [ + # List desired Python packages here. + aqmain.artiq + #ps.paramiko # needed if and only if flashing boards remotely (artiq_flash -H) + #aqextra.flake8-artiq -The easiest way to obtain ARTIQ is then to install it into the user environment with ``$ nix-env -iA artiq-full.artiq-env``. This provides a minimal installation of ARTIQ where the usual commands (``artiq_master``, ``artiq_dashboard``, ``artiq_run``, etc.) are available. + # The NixOS package collection contains many other packages that you may find + # interesting. Here are some examples: + #ps.pandas + #ps.numpy + #ps.scipy + #ps.numba + #ps.matplotlib + # or if you need Qt (will recompile): + #(ps.matplotlib.override { enableQt = true; }) + #ps.bokeh + #ps.cirq + #ps.qiskit + ])) + #aqextra.korad_ka3005p + #aqextra.novatech409b + # List desired non-Python packages here + #aqmain.openocd-bscanspi # needed if and only if flashing boards + # Other potentially interesting packages from the NixOS package collection: + #pkgs.gtkwave + #pkgs.spyder + #pkgs.R + #pkgs.julia + # ======================================== + # EDIT ABOVE + # ======================================== + ]; + }; + }; + } -This installation is however quite limited, as Nix creates a dedicated Python environment for the ARTIQ commands alone. This means that other useful Python packages that you may want (pandas, matplotlib, ...) are not available to them, and this restriction also applies to the M-Labs packages containing board binaries, which means that ``artiq_flash`` will not automatically find them. -Installing multiple packages and making them visible to the ARTIQ commands requires using the Nix language. Create a file ``my-artiq-env.nix`` with the following contents: +Then spawn a shell containing the packages with ``$ nix shell``. The ARTIQ commands with all the additional packages should now be available. -:: +You can exit the shell by typing Control-D. The next time ``$ nix shell`` is invoked, Nix uses the cached packages so the shell startup is fast. - let - # pkgs contains the NixOS package collection. ARTIQ depends on some of them, and - # you may want some additional packages from there. - pkgs = import {}; - artiq-full = import { inherit pkgs; }; - in - pkgs.mkShell { - buildInputs = [ - (pkgs.python3.withPackages(ps: [ - # List desired Python packages here. +You can create directories containing each a ``flake.nix`` that correspond to different sets of packages. If you are familiar with Conda, using Nix in this way is similar to having multiple Conda environments. - # You probably want these two. - artiq-full.artiq - artiq-full.artiq-comtools - - # You need a board support package if and only if you intend to flash - # a board (those packages contain only board firmware). - # The lines below are only examples, you need to select appropriate - # packages for your boards. - #artiq-full.artiq-board-kc705-nist_clock - #artiq-full.artiq-board-kasli-wipm - #ps.paramiko # needed if and only if flashing boards remotely (artiq_flash -H) - - # The NixOS package collection contains many other packages that you may find - # interesting for your research. Here are some examples: - #ps.pandas - #ps.numpy - #ps.scipy - #ps.numba - #(ps.matplotlib.override { enableQt = true; }) - #ps.bokeh - #ps.cirq - #ps.qiskit - ])) - - # List desired non-Python packages here - #artiq-full.openocd # needed if and only if flashing boards - # Other potentially interesting packages from the NixOS package collection: - #pkgs.gtkwave - #pkgs.spyder - #pkgs.R - #pkgs.julia - ]; - } - -Then spawn a shell containing the packages with ``$ nix-shell my-artiq-env.nix``. The ARTIQ commands with all the additional packages should now be available. - -You can exit the shell by typing Control-D. The next time ``$ nix-shell my-artiq-env.nix`` is invoked, Nix uses the cached packages so the shell startup is fast. - -You can edit this file according to your needs, and also create multiple ``.nix`` files that correspond to different sets of packages. If you are familiar with Conda, using Nix in this way is similar to having multiple Conda environments. - -If your favorite package is not available with Nix, contact us. +If your favorite package is not available with Nix, contact us using the helpdesk@ email. Installing via Conda (Windows, Linux) ------------------------------------- @@ -137,9 +127,9 @@ This activation has to be performed in every new shell you open to make the ARTI Upgrading ARTIQ (with Nix) -------------------------- -Run ``$ nix-channel --update`` to retrieve information about the latest versions, and then either reinstall ARTIQ into the user environment (``$ nix-env -i python3.6-artiq``) or re-run the ``nix-shell`` command. +Run ``$ nix profile upgrade`` if you installed ARTIQ into your user profile. If you used a ``flake.nix`` shell environment, make a back-up copy of the ``flake.lock`` file to enable rollback, then run ``$ nix flake update`` and re-enter ``$ nix shell``. -To rollback to the previous version, use ``$ nix-channel --rollback`` and then re-do the second step. You can switch between versions by passing a parameter to ``--rollback`` (see the ``nix-channel`` documentation). +To rollback to the previous version, respectively use ``$ nix profile rollback`` or restore the backed-up version of the ``flake.lock`` file. You may need to reflash the gateware and firmware of the core device to keep it synchronized with the software. @@ -165,20 +155,18 @@ Flashing gateware and firmware into the core device .. note:: If you have purchased a pre-assembled system from M-Labs or QUARTIQ, the gateware and firmware are already flashed and you can skip those steps, unless you want to replace them with a different version of ARTIQ. -You now need to write three binary images onto the FPGA board: +You need to write three binary images onto the FPGA board: 1. The FPGA gateware bitstream 2. The bootloader 3. The ARTIQ runtime or satellite manager -They are all shipped in the Nix and Conda packages, along with the required flash proxy gateware bitstreams. - Installing OpenOCD ^^^^^^^^^^^^^^^^^^ OpenOCD can be used to write the binary images into the core device FPGA board's flash memory. -With Nix, add ``artiq-full.openocd`` to the shell packages. Be careful not to add ``pkgs.openocd`` instead - this would install OpenOCD from the NixOS package collection, which does not support ARTIQ boards. +With Nix, add ``aqmain.openocd-bscanspi`` to the shell packages. Be careful not to add ``pkgs.openocd`` instead - this would install OpenOCD from the NixOS package collection, which does not support ARTIQ boards. With Conda, install ``openocd`` as follows:: @@ -218,6 +206,19 @@ On Windows, a third-party tool, `Zadig `_, is necessary. You may need to repeat these steps every time you plug the FPGA board into a port where it has not been plugged into previously on the same system. +Obtaining the board binaries +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you have an active firmware subscription with M-Labs or QUARTIQ, you can obtain firmware that corresponds to the currently installed version of ARTIQ using AFWS (ARTIQ firmware service). One year of subscription is included with most hardware purchases. You may purchase or extend firmware subscriptions by writing to the sales@ email. + +Run the command:: + + $ afws_client USERNAME build VARIANT AFWS_DIRECTORY + +Replace ``USERNAME`` with the login name that was given to you with the subscription, ``VARIANT`` with the name of your system variant, and ``AFWS_DIRECTORY`` to the name of an empty directory, which will be created by the command if it does not exist. Enter your password when prompted and wait for the build (if applicable) and download to finish. If you experience issues with the AFWS client, write to the helpdesk@ email. + +Without a subscription, you may build the firmware yourself from the open source code. See the section :ref:`Developing ARTIQ `. + Writing the flash ^^^^^^^^^^^^^^^^^ @@ -225,13 +226,13 @@ Then, you can write the flash: * For Kasli:: - $ artiq_flash -V [your system variant] + $ artiq_flash -d AFWS_DIRECTORY The JTAG adapter is integrated into the Kasli board; for flashing (and debugging) you simply need to connect your computer to the micro-USB connector on the Kasli front panel. * For the KC705 board:: - $ artiq_flash -t kc705 -V [nist_clock/nist_qc2] + $ artiq_flash -t kc705 -d AFWS_DIRECTORY The SW13 switches need to be set to 00001. @@ -301,4 +302,4 @@ Other options include: - ``int_150`` - internal crystal reference is used by Si5324 to synthesize a 150MHz RTIO clock. - ``ext0_bypass_125`` and ``ext0_bypass_100`` - explicit aliases for ``ext0_bypass``. -Availability of these options depends on the board and their configuration - specific setting may or may not be supported. \ No newline at end of file +Availability of these options depends on the board and their configuration - specific setting may or may not be supported. From 6a586c2e4dd78736a5e0df1e89079245a5aa63a1 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 21 Feb 2022 16:27:59 +0800 Subject: [PATCH 5/8] manual: kasli-soc flashing --- doc/manual/installing.rst | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/doc/manual/installing.rst b/doc/manual/installing.rst index d9090f695..145293d73 100644 --- a/doc/manual/installing.rst +++ b/doc/manual/installing.rst @@ -164,6 +164,9 @@ You need to write three binary images onto the FPGA board: Installing OpenOCD ^^^^^^^^^^^^^^^^^^ +.. note:: + This version of OpenOCD is not applicable to Kasli-SoC. + OpenOCD can be used to write the binary images into the core device FPGA board's flash memory. With Nix, add ``aqmain.openocd-bscanspi`` to the shell packages. Be careful not to add ``pkgs.openocd`` instead - this would install OpenOCD from the NixOS package collection, which does not support ARTIQ boards. @@ -177,6 +180,9 @@ With Conda, install ``openocd`` as follows:: Configuring OpenOCD ^^^^^^^^^^^^^^^^^^^ +.. note:: + These instructions are not applicable to Kasli-SoC. + Some additional steps are necessary to ensure that OpenOCD can communicate with the FPGA board. On Linux, first ensure that the current user belongs to the ``plugdev`` group (i.e. ``plugdev`` shown when you run ``$ groups``). If it does not, run ``$ sudo adduser $USER plugdev`` and re-login. @@ -213,9 +219,9 @@ If you have an active firmware subscription with M-Labs or QUARTIQ, you can obta Run the command:: - $ afws_client USERNAME build VARIANT AFWS_DIRECTORY + $ afws_client [username] build [variant] [afws_directory] -Replace ``USERNAME`` with the login name that was given to you with the subscription, ``VARIANT`` with the name of your system variant, and ``AFWS_DIRECTORY`` to the name of an empty directory, which will be created by the command if it does not exist. Enter your password when prompted and wait for the build (if applicable) and download to finish. If you experience issues with the AFWS client, write to the helpdesk@ email. +Replace ``[username]`` with the login name that was given to you with the subscription, ``[variant]`` with the name of your system variant, and ``[afws_directory]`` to the name of an empty directory, which will be created by the command if it does not exist. Enter your password when prompted and wait for the build (if applicable) and download to finish. If you experience issues with the AFWS client, write to the helpdesk@ email. Without a subscription, you may build the firmware yourself from the open source code. See the section :ref:`Developing ARTIQ `. @@ -226,13 +232,19 @@ Then, you can write the flash: * For Kasli:: - $ artiq_flash -d AFWS_DIRECTORY + $ artiq_flash -d [afws_directory] The JTAG adapter is integrated into the Kasli board; for flashing (and debugging) you simply need to connect your computer to the micro-USB connector on the Kasli front panel. +* For Kasli-SoC:: + + $ artiq_coremgmt [-D 192.168.1.75] config write -f boot [afws_directory]/boot.bin + +If the Kasli-SoC won't boot due to corrupted firmware and ``artiq_coremgmt`` cannot access it, extract the SD card and replace ``boot.bin`` manually. + * For the KC705 board:: - $ artiq_flash -t kc705 -d AFWS_DIRECTORY + $ artiq_flash -t kc705 -d [afws_directory] The SW13 switches need to be set to 00001. From 69ce09c7c00cbd29945ed428506fa5f9be79ae36 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 21 Feb 2022 18:44:18 +0800 Subject: [PATCH 6/8] manual: minor fixes --- doc/manual/installing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/manual/installing.rst b/doc/manual/installing.rst index 145293d73..3bc38cd41 100644 --- a/doc/manual/installing.rst +++ b/doc/manual/installing.rst @@ -16,7 +16,7 @@ Installing via Nix (Linux) First, install the Nix package manager. Some distributions provide a package for the Nix package manager, otherwise, it can be installed via the script on the `Nix website `_. Make sure you get Nix version 2.4 or higher. -Once Nix is installed, enable Flakes :: +Once Nix is installed, enable Flakes: :: $ mkdir -p ~/.config/nix $ echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf @@ -221,7 +221,7 @@ Run the command:: $ afws_client [username] build [variant] [afws_directory] -Replace ``[username]`` with the login name that was given to you with the subscription, ``[variant]`` with the name of your system variant, and ``[afws_directory]`` to the name of an empty directory, which will be created by the command if it does not exist. Enter your password when prompted and wait for the build (if applicable) and download to finish. If you experience issues with the AFWS client, write to the helpdesk@ email. +Replace ``[username]`` with the login name that was given to you with the subscription, ``[variant]`` with the name of your system variant, and ``[afws_directory]`` with the name of an empty directory, which will be created by the command if it does not exist. Enter your password when prompted and wait for the build (if applicable) and download to finish. If you experience issues with the AFWS client, write to the helpdesk@ email. Without a subscription, you may build the firmware yourself from the open source code. See the section :ref:`Developing ARTIQ `. From ad656d1e53b2892138c92f63087c6c3d21632541 Mon Sep 17 00:00:00 2001 From: Steve Fan <19037626d@connect.polyu.hk> Date: Tue, 22 Feb 2022 16:18:27 +0800 Subject: [PATCH 7/8] dashboard: add device database reload action in context menu (#1853) --- artiq/dashboard/explorer.py | 8 +++++++- artiq/frontend/artiq_dashboard.py | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/artiq/dashboard/explorer.py b/artiq/dashboard/explorer.py index 481596b24..f9dab39dd 100644 --- a/artiq/dashboard/explorer.py +++ b/artiq/dashboard/explorer.py @@ -159,7 +159,7 @@ class WaitingPanel(LayoutWidget): class ExplorerDock(QtWidgets.QDockWidget): def __init__(self, exp_manager, d_shortcuts, explist_sub, explist_status_sub, - schedule_ctl, experiment_db_ctl): + schedule_ctl, experiment_db_ctl, device_db_ctl): QtWidgets.QDockWidget.__init__(self, "Explorer") self.setObjectName("Explorer") self.setFeatures(QtWidgets.QDockWidget.DockWidgetMovable | @@ -251,6 +251,12 @@ class ExplorerDock(QtWidgets.QDockWidget): scan_repository_action.triggered.connect(scan_repository) self.el.addAction(scan_repository_action) + scan_ddb_action = QtWidgets.QAction("Scan device database", self.el) + def scan_ddb(): + asyncio.ensure_future(device_db_ctl.scan()) + scan_ddb_action.triggered.connect(scan_ddb) + self.el.addAction(scan_ddb_action) + self.current_directory = "" open_file_action = QtWidgets.QAction("Open file outside repository", self.el) diff --git a/artiq/frontend/artiq_dashboard.py b/artiq/frontend/artiq_dashboard.py index bd9127f9d..b1bfca59d 100755 --- a/artiq/frontend/artiq_dashboard.py +++ b/artiq/frontend/artiq_dashboard.py @@ -109,7 +109,7 @@ def main(): # create connections to master rpc_clients = dict() - for target in "schedule", "experiment_db", "dataset_db": + for target in "schedule", "experiment_db", "dataset_db", "device_db": client = AsyncioClient() loop.run_until_complete(client.connect_rpc( args.server, args.port_control, "master_" + target)) @@ -171,7 +171,8 @@ def main(): sub_clients["explist"], sub_clients["explist_status"], rpc_clients["schedule"], - rpc_clients["experiment_db"]) + rpc_clients["experiment_db"], + rpc_clients["device_db"]) smgr.register(d_explorer) d_datasets = datasets.DatasetsDock(sub_clients["datasets"], From 0da7b83176fbe21f7c59df87d08cde867c86eed3 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 23 Feb 2022 11:04:53 +0800 Subject: [PATCH 8/8] runtime: add nac3 exception symbols --- artiq/firmware/ksupport/api.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/artiq/firmware/ksupport/api.rs b/artiq/firmware/ksupport/api.rs index c085aa08b..06d7c1d89 100644 --- a/artiq/firmware/ksupport/api.rs +++ b/artiq/firmware/ksupport/api.rs @@ -115,6 +115,11 @@ static mut API: &'static [(&'static str, *const ())] = &[ /* exceptions */ api!(_Unwind_Resume = ::unwind::_Unwind_Resume), + api!(__nac3_personality = ::eh_artiq::personality), + api!(__nac3_raise = ::eh_artiq::raise), + api!(__nac3_resume = ::eh_artiq::resume), + api!(__nac3_end_catch = ::eh_artiq::end_catch), + /* legacy exception symbols */ api!(__artiq_personality = ::eh_artiq::personality), api!(__artiq_raise = ::eh_artiq::raise), api!(__artiq_resume = ::eh_artiq::resume),