diff --git a/artiq/coredevice/comm_kernel.py b/artiq/coredevice/comm_kernel.py index e829b2fc3..a847115ab 100644 --- a/artiq/coredevice/comm_kernel.py +++ b/artiq/coredevice/comm_kernel.py @@ -689,7 +689,12 @@ class CommKernel: if service_id == 0: def service(*values): - counter = 0 + if embedding_map.expects_return: + embedding_map.return_value = values[0] + counter = 1 + else: + counter = 0 + for obj in embedding_map.attributes_writeback: old_val = obj["obj"] if "fields" in obj: diff --git a/artiq/coredevice/core.py b/artiq/coredevice/core.py index 146baadce..a7ea27269 100644 --- a/artiq/coredevice/core.py +++ b/artiq/coredevice/core.py @@ -123,6 +123,10 @@ class Core: self._run_compiled(kernel_library, embedding_map) + # set by NAC3 + if embedding_map.expects_return: + return embedding_map.return_value + def _run_compiled(self, kernel_library, embedding_map): if self.first_run: self.comm.check_system_info()