From adf552e8d183b4ea1345f02ec1e9879756936974 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 13 Jan 2016 14:40:44 -0700 Subject: [PATCH] manual: artiq.coredevice.runtime_exceptions -> artiq.coredevice.exceptions --- doc/manual/core_drivers_reference.rst | 6 +++--- doc/manual/getting_started_core.rst | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/manual/core_drivers_reference.rst b/doc/manual/core_drivers_reference.rst index 667305859..604d823b5 100644 --- a/doc/manual/core_drivers_reference.rst +++ b/doc/manual/core_drivers_reference.rst @@ -24,8 +24,8 @@ These drivers are for the core device and the peripherals closely integrated int .. automodule:: artiq.coredevice.dds :members: -:mod:`artiq.coredevice.runtime_exceptions` module -------------------------------------------------- +:mod:`artiq.coredevice.exceptions` module +----------------------------------------- -.. automodule:: artiq.coredevice.runtime_exceptions +.. automodule:: artiq.coredevice.exceptions :members: diff --git a/doc/manual/getting_started_core.rst b/doc/manual/getting_started_core.rst index 20d7482b6..81a183c91 100644 --- a/doc/manual/getting_started_core.rst +++ b/doc/manual/getting_started_core.rst @@ -110,11 +110,11 @@ Create a new file ``rtio.py`` containing the following: :: Connect an oscilloscope or logic analyzer to TTL0 and run ``artiq_run.py led.py``. Notice that the generated signal's period is precisely 4 microseconds, and that it has a duty cycle of precisely 50%. This is not what you would expect if the delay and the pulse were implemented with CPU-controlled GPIO: overhead from the loop management, function calls, etc. would increase the signal's period, and asymmetry in the overhead would cause duty cycle distortion. -Instead, inside the core device, output timing is generated by the gateware and the CPU only programs switching commands with certain timestamps that the CPU computes. This guarantees precise timing as long as the CPU can keep generating timestamps that are increasing fast enough. In case it fails to do that (and attempts to program an event with a timestamp in the past), the :class:`artiq.coredevice.runtime_exceptions.RTIOUnderflow` exception is raised. The kernel causing it may catch it (using a regular ``try... except...`` construct), or it will be propagated to the host. +Instead, inside the core device, output timing is generated by the gateware and the CPU only programs switching commands with certain timestamps that the CPU computes. This guarantees precise timing as long as the CPU can keep generating timestamps that are increasing fast enough. In case it fails to do that (and attempts to program an event with a timestamp in the past), the :class:`artiq.coredevice.exceptions.RTIOUnderflow` exception is raised. The kernel causing it may catch it (using a regular ``try... except...`` construct), or it will be propagated to the host. Try reducing the period of the generated waveform until the CPU cannot keep up with the generation of switching events and the underflow exception is raised. Then try catching it: :: - from artiq.coredevice.runtime_exceptions import RTIOUnderflow + from artiq.coredevice.exceptions import RTIOUnderflow def print_underflow():