From aabe53e5faada4bce5ab48172180778dfa6ff73d Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Thu, 25 Aug 2016 18:15:48 +0200 Subject: [PATCH] doc/rtio: handover vis, tweak other vis's --- doc/manual/rtio.rst | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/doc/manual/rtio.rst b/doc/manual/rtio.rst index 2dd88665c..b31ac413e 100644 --- a/doc/manual/rtio.rst +++ b/doc/manual/rtio.rst @@ -57,9 +57,9 @@ The following diagram shows what is going on at the different levels of the soft .. wavedrom:: { signal: [ - {name: 'kernel', wave: 'x22.2x', data: ['on()', 'delay(2*us)', 'off()'], node: '..A.XB'}, + {name: 'kernel', wave: 'x32.4x', data: ['on()', 'delay(2*us)', 'off()'], node: '..A.XB'}, {name: 'now_mu', wave: '2...2.', data: ['7000', '9000'], node: '..P..Q'}, - {name: 'slack', wave: 'x2x.2x', data: ['4400', '5800']}, + {name: 'slack', wave: 'x3x.4x', data: ['4400', '5800']}, {}, {name: 'rtio_counter', wave: 'x2x|2x|2x2x', data: ['2600', '3200', '7000', '9000'], node: ' V.W'}, {name: 'ttl', wave: 'x1.0', node: ' R.S', phase: -7.5}, @@ -129,20 +129,36 @@ Seamless handover The timeline cursor persists across kernel invocations. This is demonstrated in the following example where a pulse is split across two kernels::: + def run(): + k1() + k2() + @kernel - def kernel1(): + def k1(): ttl.on() delay(1*s) @kernel - def kernel2(): + def k2(): ttl.off() - def run(): - kernel1() - kernel2() +Here, ``run()`` calls ``k1()`` which exits leaving the cursor one second after the rising edge and ``k2()`` then submits a falling edge at that position. + +.. wavedrom:: + { + signal: [ + {name: 'kernel', wave: '3.3..5..|4.', data: ['k1: on()', 'k1: delay(dt)', 'k1->k2 swap', 'k2: off()'], node: '..A........B'}, + {name: 'now_mu', wave: '2....2...|.', data: ['t0', 't0+dt'], node: '..P........Q'}, + {}, + {}, + {name: 'rtio_counter', wave: 'x.........|2x|2', data: ['t0', 't0+dt'], node: '...........V..W'}, + {name: 'ttl', wave: 'x1..0', node: '.R..S', phase: -10.5}, + ], + edge: [ + 'A~>R', 'P~>R', 'V~>R', 'B~>S', 'Q~>S', 'W~>S' + ], + } -``kernel1()`` exits leaving the cursor one second after the rising edge and ``kernel2()`` then submits a falling edge at that position. Synchronization --------------- @@ -154,7 +170,7 @@ When a kernel should wait until all the events on a particular channel have been .. wavedrom:: { signal: [ - {name: 'kernel', wave: 'x2x.|2.|x', data: ['on()', 'sync()'], node: '..A.....Y'}, + {name: 'kernel', wave: 'x3x.|2.|x', data: ['on()', 'sync()'], node: '..A.....Y'}, {name: 'now_mu', wave: '2..', data: ['7000'], node: '..P'}, {}, {},