From e6d2891423898b9930450f59c065304d94f0bb3c Mon Sep 17 00:00:00 2001 From: Tom <9285131+tomhepz@users.noreply.github.com> Date: Tue, 9 Dec 2025 13:00:56 +0000 Subject: [PATCH 1/8] Add note on PYNQ compat --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0394a586..57e0fb6a 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,9 @@ See our [Read the Docs site](https://qick-docs.readthedocs.io/) for: The QICK firmware and software is still very much a work in progress. We strive to be consistent with the APIs but cannot guarantee backwards compatibility. +> [!NOTE] +> The current version of QICK only supports the PYNQ v3.0.1 images from https://github.com/Xilinx/PYNQ/releases. v3.1.x was recently released which is not yet comptible. Please do not (yet) update your SD image for a better experience. + Frequent updates to the QICK firmware and software are made as pull requests. Each pull request will be documented with a description of the notable changes, including any changes that will require you to change your code. We hope that this will help you decide whether or not to update your local code to the latest version. From a55fe6527b54c57315b2f582133f501a3b09af64 Mon Sep 17 00:00:00 2001 From: "QICK actions [bot]" <129547417+qickbot@users.noreply.github.com> Date: Tue, 9 Dec 2025 13:03:04 +0000 Subject: [PATCH 2/8] update version --- qick_lib/qick/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qick_lib/qick/VERSION b/qick_lib/qick/VERSION index 553ada7d..864256e9 100644 --- a/qick_lib/qick/VERSION +++ b/qick_lib/qick/VERSION @@ -1 +1 @@ -0.2.380 +0.2.381 From 3e1a8f36dad33ac7af8350e1c3dd1ac5f01243c3 Mon Sep 17 00:00:00 2001 From: Diego Martin Date: Tue, 9 Dec 2025 10:34:52 -0600 Subject: [PATCH 3/8] [#381] Added a PYNQ version check when importing QICK library --- qick_lib/qick/__init__.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/qick_lib/qick/__init__.py b/qick_lib/qick/__init__.py index c9fdc9ce..e8f0aaee 100644 --- a/qick_lib/qick/__init__.py +++ b/qick_lib/qick/__init__.py @@ -37,6 +37,25 @@ def bitfile_path(): src = os.path.join(os.path.dirname(qick.__file__), filename) return src + +# Check for supported PYNQ versions that are compatible with QICK library + +import pkg_resources + +try: + pynq_version = pkg_resources.get_distribution("pynq").version +except pkg_resources.DistributionNotFound: + raise RuntimeError("PYNQ is not installed.") + +print(f"Detected PYNQ version: {pynq_version}") + +if pkg_resources.parse_version(pynq_version) > pkg_resources.parse_version("3.0.1"): + raise RuntimeError( + f"Unsupported PYNQ version {pynq_version}. " + "This code requires PYNQ 3.0.1 or lower." + ) + + # tie in to rpyc, if using try: from rpyc.utils.classic import obtain From fd630eb5f00dd456f95415165742cbd383cd6320 Mon Sep 17 00:00:00 2001 From: Diego Martin Date: Tue, 9 Dec 2025 11:28:07 -0600 Subject: [PATCH 4/8] [#381] Skip PYNQ version check if not running on Zynq board --- qick_lib/qick/__init__.py | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/qick_lib/qick/__init__.py b/qick_lib/qick/__init__.py index e8f0aaee..6568100a 100644 --- a/qick_lib/qick/__init__.py +++ b/qick_lib/qick/__init__.py @@ -39,21 +39,24 @@ def bitfile_path(): # Check for supported PYNQ versions that are compatible with QICK library - -import pkg_resources - -try: - pynq_version = pkg_resources.get_distribution("pynq").version -except pkg_resources.DistributionNotFound: - raise RuntimeError("PYNQ is not installed.") - -print(f"Detected PYNQ version: {pynq_version}") - -if pkg_resources.parse_version(pynq_version) > pkg_resources.parse_version("3.0.1"): - raise RuntimeError( - f"Unsupported PYNQ version {pynq_version}. " - "This code requires PYNQ 3.0.1 or lower." - ) +# only do the check if running on a Zynq +if platform.machine() in ['aarch64', 'armv7l']: + import pkg_resources + + try: + pynq_version = pkg_resources.get_distribution("pynq").version + except pkg_resources.DistributionNotFound: + raise RuntimeError("PYNQ is not installed.") + + print(f"Detected PYNQ version: {pynq_version}") + + if pkg_resources.parse_version(pynq_version) > pkg_resources.parse_version("3.0.1"): + raise RuntimeError( + f"Unsupported PYNQ version {pynq_version}. " + "QICK library requires PYNQ 3.0.1 or lower." + ) +else: + print(f"PYNQ version check skipped") # tie in to rpyc, if using From 88f70ebde40626239bd1dca6f269254a94f06036 Mon Sep 17 00:00:00 2001 From: Sho Uemura Date: Tue, 9 Dec 2025 19:08:47 -0600 Subject: [PATCH 5/8] limit pynq version in install_requires; always recommend offline install --- qick_demos/000_Install_qick_package.ipynb | 16 ++++++++-------- setup.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/qick_demos/000_Install_qick_package.ipynb b/qick_demos/000_Install_qick_package.ipynb index ec7d1256..29dd3433 100644 --- a/qick_demos/000_Install_qick_package.ipynb +++ b/qick_demos/000_Install_qick_package.ipynb @@ -21,7 +21,7 @@ "## pynq library\n", "Let's check that the Xilinx pynq library is installed: you should see (among things) a version number, which should match the version of the PYNQ Linux image you installed.\n", "\n", - "The QICK software supports pynq versions 2.6.0 and above." + "The QICK software supports pynq versions 2.6 through 3.0 (including 3.0.1). Version 3.1 is not supported at this time." ] }, { @@ -165,7 +165,11 @@ "source": [ "### Installing using pip (recommended option)\n", "\n", - "You could run these `pip3` commands from the shell over SSH - they need to be run as root (using `sudo`), and on pynq 2.7 you must additionally enable the pynq `venv`. Running the commands inside a notebook, as we do here, conveniently ensures that the commands run in (and install to) the same environment that the notebook runs in." + "You could run these `pip3` commands from the shell over SSH - they need to be run as root (using `sudo`), and on pynq 2.7 you must additionally enable the pynq `venv`. Running the commands inside a notebook, as we do here, conveniently ensures that the commands run in (and install to) the same environment that the notebook runs in.\n", + "\n", + "The options `--no-index --no-build-isolation` are important for two reasons:\n", + "1. they allow pip to run even if the board doesn't have Internet access\n", + "2. they prevent pip from attempting to install the `pynq` library, which may happen if you've somehow broken your board's Python environment or your `pynq` version is unsupported; pip can't actually install `pynq` correctly so this is unhelpful" ] }, { @@ -205,11 +209,7 @@ "# It is recommended if you expect to update the git repo, or you want to test changes to the QICK library, \n", "# and don't want to reinstall the library every time.\n", "\n", - "!pip3 install -e ../\n", - "\n", - "# If your board doesn't have Internet access, you may need to add some extra options:\n", - "\n", - "# !pip3 install --no-index --no-build-isolation -e ../\n", + "!pip3 install --no-index --no-build-isolation -e ../\n", "\n", "# Use the line below instead for a normal pip install, which copies the library files to a central location.\n", "# In contrast to an editable install, you will need to re-install whenever you modify or update the qick library;\n", @@ -217,7 +217,7 @@ "# This is only recommended if for some reason you want to delete the git repo after installing,\n", "# or the git repo is on a temporarily available filesystem (e.g. flash drive).\n", "\n", - "# !pip3 install ../\n" + "# !pip3 install --no-index --no-build-isolation ../" ] }, { diff --git a/setup.py b/setup.py index 37d8618e..d3b88845 100644 --- a/setup.py +++ b/setup.py @@ -157,7 +157,7 @@ def get_version(rel_path): # We may therefore lose compatibility with the QICK library on a PC running NumPy 2.0. install_requires=[ "numpy", - "pynq>=2.6;platform_machine=='aarch64' or platform_machine=='armv7l'", + "pynq>=2.6,<3.1; platform_machine=='aarch64' or platform_machine=='armv7l'", "tqdm", # Optional ], From ab04c00a5b1d589a4ded3019b999c0dfb2eef91a Mon Sep 17 00:00:00 2001 From: Sho Uemura Date: Tue, 9 Dec 2025 21:10:04 -0600 Subject: [PATCH 6/8] rework the new warning --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 57e0fb6a..f2b72e76 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ The QICK firmware and software is still very much a work in progress. We strive to be consistent with the APIs but cannot guarantee backwards compatibility. > [!NOTE] -> The current version of QICK only supports the PYNQ v3.0.1 images from https://github.com/Xilinx/PYNQ/releases. v3.1.x was recently released which is not yet comptible. Please do not (yet) update your SD image for a better experience. +> QICK does not yet support PYNQ v3.1. The [QICK quick-start guide](https://docs.qick.dev/latest/quick_start.html) lists the currently recommended PYNQ OS images for your SD card. Frequent updates to the QICK firmware and software are made as pull requests. Each pull request will be documented with a description of the notable changes, including any changes that will require you to change your code. From 81af1cdca97136a12d273f85909968724046d833 Mon Sep 17 00:00:00 2001 From: Sho Uemura Date: Tue, 9 Dec 2025 21:14:00 -0600 Subject: [PATCH 7/8] tweak the README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f2b72e76..f5334a2c 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,10 @@ It consists of: * The `qick` Python package, which includes the interface to the firmware and an API for writing QICK programs * [Jupyter notebooks](qick_demos) demonstrating usage -See our [Read the Docs site](https://qick-docs.readthedocs.io/) for: +See our [Read the Docs site](https://docs.qick.dev/) for: * Documentation of the firmware and software -* A quick-start guide for setting up your board and running the example Jupyter notebooks -* Ways to communicate with QICK developers and the community +* A [quick-start guide](https://docs.qick.dev/latest/quick_start.html) for setting up your board and running the example Jupyter notebooks +* [Ways to communicate](https://docs.qick.dev/latest/contact.html) with QICK developers and the community * Extensions to QICK for added functionailty ## Updates @@ -28,7 +28,7 @@ The QICK firmware and software is still very much a work in progress. We strive to be consistent with the APIs but cannot guarantee backwards compatibility. > [!NOTE] -> QICK does not yet support PYNQ v3.1. The [QICK quick-start guide](https://docs.qick.dev/latest/quick_start.html) lists the currently recommended PYNQ OS images for your SD card. +> QICK does not yet support PYNQ v3.1. The QICK quick-start guide (linked above) lists the currently recommended PYNQ OS images for your SD card. Frequent updates to the QICK firmware and software are made as pull requests. Each pull request will be documented with a description of the notable changes, including any changes that will require you to change your code. From f274eb59cabe12b28c4517600e79ba4de5ebb087 Mon Sep 17 00:00:00 2001 From: Sho Uemura Date: Tue, 9 Dec 2025 21:44:17 -0600 Subject: [PATCH 8/8] trim noisy prints --- qick_lib/qick/__init__.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/qick_lib/qick/__init__.py b/qick_lib/qick/__init__.py index 6568100a..4f756355 100644 --- a/qick_lib/qick/__init__.py +++ b/qick_lib/qick/__init__.py @@ -37,27 +37,17 @@ def bitfile_path(): src = os.path.join(os.path.dirname(qick.__file__), filename) return src - # Check for supported PYNQ versions that are compatible with QICK library # only do the check if running on a Zynq if platform.machine() in ['aarch64', 'armv7l']: import pkg_resources - try: - pynq_version = pkg_resources.get_distribution("pynq").version - except pkg_resources.DistributionNotFound: - raise RuntimeError("PYNQ is not installed.") - - print(f"Detected PYNQ version: {pynq_version}") - - if pkg_resources.parse_version(pynq_version) > pkg_resources.parse_version("3.0.1"): + pynq_version = pkg_resources.get_distribution("pynq").version + if pkg_resources.parse_version(pynq_version) >= pkg_resources.parse_version("3.1"): raise RuntimeError( f"Unsupported PYNQ version {pynq_version}. " - "QICK library requires PYNQ 3.0.1 or lower." + "QICK library requires PYNQ < 3.1." ) -else: - print(f"PYNQ version check skipped") - # tie in to rpyc, if using try: