From 1e01e6b83440ad0a6df20319e625b77b6f614b25 Mon Sep 17 00:00:00 2001 From: Marius Weber Date: Tue, 14 May 2019 13:38:54 +0100 Subject: [PATCH] Scheduler documentation: interaction between experiments (#1320) --- doc/manual/management_system.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/manual/management_system.rst b/doc/manual/management_system.rst index 7cd3b3059..eec66edc4 100644 --- a/doc/manual/management_system.rst +++ b/doc/manual/management_system.rst @@ -54,6 +54,11 @@ Experiments are divided into three phases that are programmed by the user: The three phases of several experiments are then executed in a pipelined manner by the scheduler in the ARTIQ master: experiment A executes its preparation stage, then experiment A executes its running stage while experiment B executes its preparation stage, and so on. +.. note:: + The next experiment (B) may start :meth:`~artiq.language.environment.Experiment.run` ing before all events placed into (core device) RTIO buffers by the previous experiment (A) have triggered. These events can then trigger when experiment B is :meth:`~artiq.language.environment.Experiment.run` ing. Using :meth:`~artiq.coredevice.core.Core.reset` clears the RTIO buffers, discarding untriggered events, including those left over from A. + + Interactions between events of different experiments, can be avoided by preventing the :meth:`~artiq.language.environment.Experiment.run` method of experiment A from returning before all events have triggered. This can be achieved using :meth:`~artiq.coredevice.core.Core.wait_until_mu`. In most cases, :func:`~artiq.language.core.now_mu` will return an appropriate timestamp. + Priorities and timed runs -------------------------