Commit b2588dc4 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

Merge branch 'calib_for_ieee'

parents 7f4c52ad 009866b3
......@@ -330,3 +330,108 @@ that the actual hardware asymmetry is reduced only partially. The remaining,
uncompensated part equals the asymmetry of the primary calibrator \emph{C1}, so
that the new calibrator \emph{C2} behaves for all practical purposes as the old
calibrator \emph{C1}.
\subsection{1-PPS skew measurement}
Reading proposed calibration procedure one can start wondering what is the
influence of 1-PPS propagation time - from the inside of FPGA to the physical
connector - on the 1-PPS skew measurement.
Let's consider one more time two WR Devices (\emph{D1}, \emph{D2}) being
calibrated to the calibrator \emph{C}. This time we take into account the 1-PPS
propagation delay from the inside of FPGA to the physical connector where we take
it for skew measurement (figure \ref{fig:ppsdel:calibration}). Those delays are
marked $\tau_C$, $\tau_1$, $\tau_2$ for the calibrator, device under calibration
1 and device under calibration 2.
\caption{Calibration with 1-PPS delays taken into account}
Therefore e.g. 1-PPS signal generated inside the FPGA of the WR Calibrator at
time $t_{CPPS}$ is observed on the oscilloscope at time $t_{CPPS} + \tau_C$.
Taking this into account, our skew measured in section \ref{subsec:devices} can
be expanded as:
skew'_{1C} &= (t_{1PPS} + \tau_1) - (t_{CPPS} + \tau_C) \nonumber\\
&= (t_{1PPS} - t_{CPPS}) + (\tau_1 - \tau_C) \nonumber\\
&= skew_{1C} + (\tau_1 - \tau_C)
According to the calibration procedure we apply the measured skew (in our case
$skew'_{1C}$) as an asymmetry factor ($\beta_{C1}$ in section
\ref{subsec:apx:devices}) to calculate fixed hardware delays
$\Delta_{TX}$, $\Delta_{RX}$ for the device under calibration. Thus, our
asymmetry factor also contains the difference in 1-PPS propagation times:
\beta'_{C1} = \beta_{C1} + (\tau_1 - \tau_C)
As a consequence, fixed transmission and reception delays for device $D_1$
calculated from the coarse delay and asymmetry factor $\beta'_{C1}$ will also
contain 1-PPS propagation times:
\Delta'_{TX1} &= \frac{1}{2}\Delta_1 - \beta'_{C1} = \frac{1}{2}\Delta_1 -
\beta_{C1} - (\tau_1 - \tau_C) = \Delta_{TX1} - (\tau_1 - \tau_C)\\
\Delta'_{RX1} &= \frac{1}{2}\Delta_1 + \beta'_{C1} = \frac{1}{2}\Delta_1 +
\beta_{C1} + (\tau_1 - \tau_C) = \Delta_{RX1} + (\tau_1 - \tau_C)
By analogy we get the same result for device $D_2$ calibration:
\Delta'_{TX2} &= \frac{1}{2}\Delta_2 - \beta'_{C2} = \frac{1}{2}\Delta_2 -
\beta_{C2} - (\tau_2 - \tau_C) = \Delta_{TX2} - (\tau_2 - \tau_C)\\
\Delta'_{RX2} &= \frac{1}{2}\Delta_2 + \beta'_{C2} = \frac{1}{2}\Delta_2 +
\beta_{C2} + (\tau_2 - \tau_C) = \Delta_{RX2} + (\tau_2 - \tau_C)
We can see that after performing the calibration procedure, both of these
devices have their fixed hardware delays distorted by the difference in 1-PPS
propagation delay of the device and the calibrator.
\caption{Synchronization of WR Devices calibrated to the same calibrator}
When we connect two devices together and let them synchronize (figure
\ref{fig:ppsdel:sync}), the propagation delay of calibrator's PPS signal gets
canceled in the one-way delay calculation:
delay'_{MS} &= \delta_{MS} + \Delta'_{TX1} + \Delta'_{RX2} = \delta_{MS} +
(\Delta_{TX1} - \tau_1 + \tau_C) + (\Delta_{RX2} + \tau_2 - \tau_C)\\
delay'_{MS} &= delay_{MS} + (\tau_2 - \tau_1)
Now, the one-way delay is distorted only by the difference between $D_2$
and $D_1$ 1-PPS propagation delays. Having in mind the formula for a
correction factor applied on the Slave side ($corr_{ideal}$ in section
\ref{subsec:apx:devices}) we can see that in our case the distortion of
$delay_{MS}$ directly affects $corr_{ideal}$ as well:
corr = corr_{ideal} + (\tau_2 - \tau_1)
The change in the $corr$ value shifts the timescale of the slave device ahead by
$(\tau_2 - \tau_1)$ so for this connection every 1-PPS pulse from $D_2$ is
generated earlier than it should be in the ideal case:
t'_{2PPS} = t_{2PPS} - (\tau_2 - \tau_1)
$skew'_{12}$ between $D_1$ and $D_2$ measured with the oscilloscope is:
skew'_{21} &= (t'_{2PPS} + \tau_2) - (t_{1PPS} + \tau_1) = t_{2PPS} - \tau_2 +
\tau_1 + \tau_2 - t_{1PPS} - \tau_1\\
skew'_{21} &= t_{2PPS} - t_{1PPS}
This shows that the difference between 1-PPS propagation delays causes Slave
device to have its internal time shifted to compensate for this difference when
two devices (calibrated earlier to the same calibrator) are connected together.
Therefore when these devices are synchronized, their 1-PPS signals will be
aligned and the difference in their propagation times is properly compensated.
1-PPS socket is our calibration reference plane. One can move the reference
plane to any other point, also to the inside of the FPGA. However, this requires
the knowledge of precise 1-PPS delay value to be taken into account in the PPS
skew measurements.
......@@ -53,7 +53,7 @@
\title{White Rabbit calibration procedure\\[0.5cm]
\large {version 1.0}}
\large {version 1.1}}
\author{Grzegorz Daniluk\\ CERN BE-CO-HT}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment