Skip to content

Commit 984e82b

Browse files
committedJul 1, 2015
doc: update slides with new API
1 parent e5e035d commit 984e82b

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed
 

Diff for: ‎doc/slides/artiq_overview.tex

+8-6
Original file line numberDiff line numberDiff line change
@@ -91,18 +91,19 @@
9191

9292
\begin{minted}[frame=leftline]{python}
9393
trigger.sync() # wait for trigger input
94-
start = now() # capture trigger time
94+
start = now_mu() # capture trigger time
9595
for i in range(3):
9696
delay(5*us)
9797
dds.pulse(900*MHz, 7*us) # first pulse 5 µs after trigger
98-
at(start + 1*ms) # re-reference time-line
98+
# re-reference time-line
99+
at(start + seconds_to_mu(1*ms))
99100
dds.pulse(200*MHz, 11*us) # exactly 1 ms after trigger
100101
\end{minted}
101102

102103
\begin{itemize}
103104
\item Written in a subset of Python
104105
\item Executed on a CPU embedded on a FPGA (the \emph{core device})
105-
\item \verb!now(), at(), delay()! describe time-line of an experiment
106+
\item \verb!now_mu(), at_mu(), delay_mu(), delay()! describe time-line of an experiment
106107
\item Exact time is kept in an internal variable
107108
\item That variable only loosely tracks the execution time of CPU instructions
108109
\item The value of that variable is exchanged with the RTIO fabric that
@@ -148,11 +149,12 @@
148149
for i in range(n):
149150
delay(dt) # must round to native cycles
150151

151-
dt_raw = time_to_cycles(dt) # integer number of cycles
152+
dt_raw = seconds_to_mu(dt) # integer number of cycles
152153
f_raw = dds.frequency_to_ftw(f) # integer frequency tuning word
153154

154-
# determine correct phase despite accumulation of rounding errors
155-
phi = n*cycles_to_time(dt_raw)*dds.ftw_to_frequency(f_raw)
155+
# determine correct (to FP precision) phase
156+
# despite accumulation of rounding errors
157+
phi = mu_to_seconds(n*dt_raw)*dds.ftw_to_frequency(f_raw)
156158
\end{minted}
157159

158160
\begin{itemize}

Diff for: ‎doc/slides/taaccs.tex

+8-6
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,19 @@
105105

106106
\begin{minted}[frame=leftline]{python}
107107
trigger.sync() # wait for trigger input
108-
start = now() # capture trigger time
108+
start = now_mu() # capture trigger time
109109
for i in range(3):
110110
delay(5*us)
111111
dds.pulse(900*MHz, 7*us) # first pulse 5 µs after trigger
112-
at(start + 1*ms) # re-reference time-line
112+
# re-reference time-line
113+
at_mu(start + seconds_to_mu(1*ms))
113114
dds.pulse(200*MHz, 11*us) # exactly 1 ms after trigger
114115
\end{minted}
115116

116117
\begin{itemize}
117118
\item Written in a subset of Python
118119
\item Executed on a CPU embedded on a FPGA (the \emph{core device})
119-
\item \verb!now(), at(), delay()! describe time-line of an experiment
120+
\item \verb!now_mu(), at_mu(), delay_mu(), delay()! describe time-line of an experiment
120121
\item Exact time is kept in an internal variable
121122
\item That variable only loosely tracks the execution time of CPU instructions
122123
\item The value of that variable is exchanged with the RTIO fabric that
@@ -162,11 +163,12 @@
162163
for i in range(n):
163164
delay(dt) # must round to native cycles
164165

165-
dt_raw = time_to_cycles(dt) # integer number of cycles
166+
dt_raw = seconds_to_mu(dt) # integer number of cycles
166167
f_raw = dds.frequency_to_ftw(f) # integer frequency tuning word
167168

168-
# determine correct phase despite accumulation of rounding errors
169-
phi = n*cycles_to_time(dt_raw)*dds.ftw_to_frequency(f_raw)
169+
# determine correct (to FP precision) phase
170+
# despite accumulation of rounding errors
171+
phi = n*mu_to_seconds(dt_raw)*dds.ftw_to_frequency(f_raw)
170172
\end{minted}
171173

172174
\begin{itemize}

0 commit comments

Comments
 (0)
Please sign in to comment.