Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1465fe6f8196
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 617c416124d2
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Feb 15, 2016

  1. Commit missing parts of 1465fe6.

    whitequark committed Feb 15, 2016
    Copy the full SHA
    a5977a5 View commit details
  2. Add documentation for rtio_log (#206).

    whitequark committed Feb 15, 2016
    Copy the full SHA
    617c416 View commit details
Showing with 22 additions and 1 deletion.
  1. +1 −1 artiq/coredevice/analyzer.py
  2. +19 −0 doc/manual/getting_started_core.rst
  3. +2 −0 doc/manual/utilities.rst
2 changes: 1 addition & 1 deletion artiq/coredevice/analyzer.py
Original file line number Diff line number Diff line change
@@ -288,7 +288,7 @@ def get_vcd_log_channels(log_channel, messages):
message_payload = _extract_log_chars(message.data)
log_entry += message_payload
if len(message_payload) < 4:
channel_name, log_message = log_entry.split(":", maxsplit=1)
channel_name, log_message = log_entry.split("\x1E", maxsplit=1)
l = len(log_message)
if channel_name in vcd_log_channels:
if vcd_log_channels[channel_name] < l:
19 changes: 19 additions & 0 deletions doc/manual/getting_started_core.rst
Original file line number Diff line number Diff line change
@@ -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
------------------------------

2 changes: 2 additions & 0 deletions doc/manual/utilities.rst
Original file line number Diff line number Diff line change
@@ -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
------------------------------