forked from M-Labs/artiq
1
0
Fork 0

comm_kernel: add Zynq runtime identifier

This commit is contained in:
Sebastien Bourdeauducq 2020-04-12 17:25:14 +08:00
parent de57039e6e
commit e8b73876ab
1 changed files with 14 additions and 12 deletions

View File

@ -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)