forked from sinara-hw/datasheets
2118-2128: add <8ns short pulse example
This commit is contained in:
parent
f5ce9e19e9
commit
2a5066ac5f
@ -508,10 +508,19 @@ The channel should be configured as output in both the gateware and hardware.
|
||||
|
||||
\newpage
|
||||
|
||||
\subsection{Sub-coarse-RTIO-cycle pulse}
|
||||
With the use of the ARTIQ RTIO, only 1 event can be enqueued per coarse RTIO cycle, which is typically 8ns.
|
||||
Therefore, to emit a pulse that is less than 8ns, additional delay is needed such that the \texttt{ttl.on()} \& \texttt{ttl.off()} event are submitted at different coarse RTIO cycles.
|
||||
The TTL pulse parameter must satisfy the minimum pulse width stated in the electircal specifications.
|
||||
|
||||
\inputcolorboxminted{firstline=88,lastline=92}{examples/ttl.py}
|
||||
|
||||
\subsection{Morse code}
|
||||
This example demonstrates some basic algorithmic features of the ARTIQ-Python language.
|
||||
\inputcolorboxminted{firstline=22,lastline=39}{examples/ttl.py}
|
||||
|
||||
\newpage
|
||||
|
||||
\subsection{Counting rising edges in a 1ms window}
|
||||
The channel should be configured as input in both the gateware and hardware.
|
||||
\inputcolorboxminted{firstline=47,lastline=52}{examples/ttl.py}
|
||||
@ -520,7 +529,7 @@ This example code uses the software counter, which has a maximum count rate of a
|
||||
If the gateware counter is enabled on the TTL channel, it can typically count up to 125 million events per second:
|
||||
\inputcolorboxminted{firstline=60,lastline=65}{examples/ttl.py}
|
||||
|
||||
\newpage
|
||||
To count falling edges or both rising \& falling edges, use \texttt{gate\char`_falling()} or \texttt{gate\char`_both()}.
|
||||
|
||||
\subsection{Responding to an external trigger}
|
||||
One channel needs to be configured as input, and the other as output.
|
||||
|
@ -78,3 +78,15 @@ class ExternalTrigger(EnvExperiment):
|
||||
timestamp_mu = self.ttlin.timestamp_mu(gate_end_mu)
|
||||
at_mu(timestamp_mu + self.core.seconds_to_mu(10*ms))
|
||||
self.ttlout.pulse(1*us)
|
||||
|
||||
|
||||
class ShortPulse(EnvExperiment):
|
||||
def build(self):
|
||||
self.setattr_device("core")
|
||||
self.ttl0 = self.get_device("ttl0")
|
||||
|
||||
@kernel
|
||||
def run(self):
|
||||
self.core.reset()
|
||||
delay(6*ns)
|
||||
self.ttl0.pulse(3*ns)
|
||||
|
Loading…
Reference in New Issue
Block a user