From a94786788749b1541c926b137f8e0fe897fd3c74 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 14 Jun 2019 15:48:05 +0800 Subject: [PATCH] runtime: support Kasli Si5324 bypass via rtio_clock=e --- artiq/firmware/runtime/rtio_clocking.rs | 7 ++++++- doc/manual/core_device.rst | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/artiq/firmware/runtime/rtio_clocking.rs b/artiq/firmware/runtime/rtio_clocking.rs index f4c926890..c979f9189 100644 --- a/artiq/firmware/runtime/rtio_clocking.rs +++ b/artiq/firmware/runtime/rtio_clocking.rs @@ -137,7 +137,12 @@ fn setup_si5324_as_synthesizer() { pub fn init() { #[cfg(si5324_as_synthesizer)] - setup_si5324_as_synthesizer(); + { + match get_rtio_clock_cfg() { + RtioClock::Internal => setup_si5324_as_synthesizer(), + RtioClock::External => si5324::bypass(si5324::Input::Ckin2) + } + } #[cfg(has_drtio)] unsafe { diff --git a/doc/manual/core_device.rst b/doc/manual/core_device.rst index d5de73a75..9488e4d33 100644 --- a/doc/manual/core_device.rst +++ b/doc/manual/core_device.rst @@ -164,5 +164,6 @@ See :mod:`artiq.coredevice.i2c` for more details. Clocking ++++++++ -The KC705 supports an internal 125MHz RTIO clock (based on its crystal oscillator) and an external clock, that can be selected using the ``rtio_clock`` configuration entry. +The KC705 supports an internal 125MHz RTIO clock (based on its crystal oscillator) and an external clock, that can be selected using the ``rtio_clock`` configuration entry. Valid values are ``i`` and ``e``, and the default is ``i``. The selected option can be observed in the core device boot logs. +On Kasli, when set to ``e``, the ``rtio_clock`` setting overrides the built-in (and variant-dependent) Si5324 synthesizer configuration and disables the Si5324. The user must apply a clock at the RTIO frequency on the Kasli front panel SMA. As the Si5324 is bypassed in this mode, its skew is deterministic, which is useful to distribute clocks externally to Kasli and Urukul when Urukul phase synchronization is desired.