mirror of https://github.com/m-labs/artiq.git
Add documentation for rtio_log (#206).
This commit is contained in:
parent
a5977a5b62
commit
617c416124
|
@ -134,6 +134,25 @@ Try reducing the period of the generated waveform until the CPU cannot keep up w
|
||||||
except RTIOUnderflow:
|
except RTIOUnderflow:
|
||||||
print_underflow()
|
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
|
Parallel and sequential blocks
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
|
|
@ -163,6 +163,8 @@ Core device log download tool
|
||||||
:ref: artiq.frontend.artiq_corelog.get_argparser
|
:ref: artiq.frontend.artiq_corelog.get_argparser
|
||||||
:prog: artiq_corelog
|
:prog: artiq_corelog
|
||||||
|
|
||||||
|
.. _core-device-rtio-analyzer-tool:
|
||||||
|
|
||||||
Core device RTIO analyzer tool
|
Core device RTIO analyzer tool
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue