2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

Add documentation for rtio_log (#206).

This commit is contained in:
whitequark 2016-02-15 21:43:02 +00:00
parent a5977a5b62
commit 617c416124
2 changed files with 21 additions and 0 deletions

View File

@ -134,6 +134,25 @@ Try reducing the period of the generated waveform until the CPU cannot keep up w
except RTIOUnderflow:
print_underflow()
The core device records the real-time IO waveforms into a circular buffer. It is possible to dump any Python object so that it appears alongside the waveforms using the ``rtio_log`` function, which accepts a channel name (i.e. a log target) as the first argument: ::
from artiq.experiment import *
class Tutorial(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("ttl0")
@kernel
def run(self):
for i in range(100):
self.ttl0.pulse(...)
rtio_log("ttl0", "i", i)
delay(...)
Afterwards, the recorded data can be extracted and written to a VCD file using ``artiq_coreanalyzer -w rtio.vcd`` (see: :ref:`core-device-rtio-analyzer-tool`).
Parallel and sequential blocks
------------------------------

View File

@ -163,6 +163,8 @@ Core device log download tool
:ref: artiq.frontend.artiq_corelog.get_argparser
:prog: artiq_corelog
.. _core-device-rtio-analyzer-tool:
Core device RTIO analyzer tool
------------------------------