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,10 +211,7 @@ class CommKernel:
self._read_header()
self._read_expect(Reply.SystemInfo)
runtime_id = self._read(4)
if runtime_id != b"AROR":
raise UnsupportedDevice("Unsupported runtime ID: {}"
.format(runtime_id))
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) "
@ -225,6 +222,11 @@ class CommKernel:
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))
def load(self, kernel_library):
self._write_header(Request.LoadKernel)