Commit d2eb5d04 by Grzegorz Daniluk

calibration: 1-pps skew measurement for IEEE guys

parent 391af199
 ... ... @@ -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. \begin{figure}[ht] \begin{center} \includegraphics[width=\textwidth]{calibration/calibration_pps_delay.pdf} \caption{Calibration with 1-PPS delays taken into account} \label{fig:ppsdel:calibration} \end{center} \end{figure} 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: \begin{align} 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) \end{align} 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: \begin{align} \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) \end{align} By analogy we get the same result for device $D_2$ calibration: \begin{align} \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) \end{align} 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. \begin{figure}[ht] \begin{center} \includegraphics[width=.5\textwidth]{calibration/wr_devices_pps_delay.pdf} \caption{Synchronization of WR Devices calibrated to the same calibrator} \label{fig:ppsdel:sync} \end{center} \end{figure} 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: \begin{align} 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) \end{align} 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: \begin{align} 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} \end{align} 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 @@ \begin{document} \title{White Rabbit calibration procedure\\[0.5cm] \large {version 1.0}} \large {version 1.1}} \author{Grzegorz Daniluk\\ CERN BE-CO-HT} \maketitle ... ...