From e8b73876ab60e202bec0a2e5119bd7b740d0c78d Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 12 Apr 2020 17:25:14 +0800 Subject: [PATCH] comm_kernel: add Zynq runtime identifier --- artiq/coredevice/comm_kernel.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/artiq/coredevice/comm_kernel.py b/artiq/coredevice/comm_kernel.py index e17bb3298..d3a73c20e 100644 --- a/artiq/coredevice/comm_kernel.py +++ b/artiq/coredevice/comm_kernel.py @@ -211,21 +211,23 @@ class CommKernel: self._read_header() self._read_expect(Reply.SystemInfo) runtime_id = self._read(4) - if runtime_id != b"AROR": + if runtime_id == b"AROR": + gateware_version = self._read_string().split(";")[0] + if gateware_version != software_version and not self.warned_of_mismatch: + logger.warning("Mismatch between gateware (%s) " + "and software (%s) versions", + gateware_version, software_version) + CommKernel.warned_of_mismatch = True + + finished_cleanly = self._read_bool() + if not finished_cleanly: + logger.warning("Previous kernel did not cleanly finish") + elif runtime_id == b"ARZQ": + pass + else: raise UnsupportedDevice("Unsupported runtime ID: {}" .format(runtime_id)) - gateware_version = self._read_string().split(";")[0] - if gateware_version != software_version and not self.warned_of_mismatch: - logger.warning("Mismatch between gateware (%s) " - "and software (%s) versions", - gateware_version, software_version) - CommKernel.warned_of_mismatch = True - - finished_cleanly = self._read_bool() - if not finished_cleanly: - logger.warning("Previous kernel did not cleanly finish") - def load(self, kernel_library): self._write_header(Request.LoadKernel) self._write_bytes(kernel_library)