Commit 47d5a081 authored by Maciej Lipinski's avatar Maciej Lipinski

calification added, FSM changed, neds few iterations before publishing next version

parent 8814cdcc
TODO:
- authors
- change format to A4
- wr bountry clock/ordinary clock/switch
Figure~\ref{fig:hybrid-network} depicts the topology of a \emph{hybrid}
WR/IEEE1588 network.
White Rabbit adds to PTP a mechanism (called \textit{White Rabbit Link Setup})
which enables to obtain the value of delay asymmetry.
The mechanism is active only at the beginning of each WR-to-WR node connection.
\subsubsection{wrPortMode}
TODO ?
\subsubsection{calibrated}
TODO ?
\subsubsection{deltaTx}
TODO ?
\subsubsection{deltaRx}
TODO ?
\subsubsection{calPeriod}
TODO ?
\subsubsection{calPattern}
TODO ?
\subsubsection{calPatternLen}
TODO ?
\subsubsection{wrMode}
TODO ?
\subsubsection{wrAlpha}
TODO ?
\subsubsection{grandmasterWrPortMode}
TODO ?
\subsubsection{grandmasterDeltaTx}
TODO ?
\subsubsection{grandmasterDeltaRx}
TODO ?
\subsubsection{grandmasterWrMode}
TODO ?
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,8 +8,10 @@
% asymmetry 6.2.c, 7.4.2 (positive if t_MS > t_SM)
%
\documentclass[11pt]{article}
\documentclass[a4paper, 12pt]{article}
%\documentclass{article}
\usepackage{fullpage}
\usepackage{pgf}
\usepackage{tikz}
\usetikzlibrary{arrows,automata,shapes}
......@@ -54,77 +56,129 @@
\begin{document}
\title{White Rabbit Specification: \\Draft for Comments}
% \author{}
\author{Emilio G. Cota\\ Maciej Lipinski \\ Tomasz Wlostowski}
\date{September 2010}
\maketitle
\section{What is White Rabbit?}
\begin{figure}[ht!]
\centering
\vspace{1.3cm}
\includegraphics[width=0.50\textwidth]{fig/wr_logo.ps}
\label{fig:hybrid-network}
\end{figure}
\newpage
\begin{center}
\large Revision History Table
\end{center}
\begin{table}[ht]
%\caption{White Rabbit Specification Revision History Table }
\centering
\begin{tabular}{| c | c | c | p{5cm} |} \hline
\textbf{Version} & \textbf{Date} & \textbf{Authors} & \textbf{Description} \\
& & &\\ \hline
0.1 & 10/09/2010 & E.G., M.L. & First draft for comments. \\ \hline
0.2 & 7/09/2010 & T.W., M.L. & Added introduction about PTP \\ \hline
0.3 & 8/09/2010 & J.S., M.L. & Added loads of 'a' and 'the', plus reference to Peter's paper \\ \hline
0.4 & 14/09/2010 & E.V.D.B, M.L.& a lot of changes .... \\ \hline
\end{tabular}
\label{tab:revHist}
\end{table}
\newpage
\section{Introduction}
White Rabbit (WR) is a protocol developed to synchronize nodes in
a packet-based network with sub-ns accuracy. The protocol results
from the combination of IEEE1588-2008 (PTP) with two further
from the combination of IEEE1588-2008 (PTP)\cite{IEEE1588} with two further
requirements: precise knowledge of the link delay and clock
syntonization over the physical layer.
syntonization\footnote{The adjustment of two electronic circuits or devices in term of frequency.} over the physical layer.
A WR link is formed by a pair of nodes, master and slave. The master
node distributes a traceable clock over the physical layer, while the slave
recovers this clock and bases its timekeeping on it. Absolute time
A WR link is formed by a pair of nodes, master and slave (Figure~\ref{fig:wrNodes}). The master
node uses a traceable clock to encode data over the physical layer, while the slave
recovers this clock (syntonization) and bases its timekeeping on it. Absolute time
synchronisation between master and slave is achieved by adjusting
the slave's clock's phase and offset to that of the master's. This adjustment
is done through the two-way exchange of PTP sync messages, which are corrected
the clock phase and offset of the slave to that of the master.
The offset refers to clock (e.g. time defined in Coordinated Universal Time standard),
while the phase refers to the clock signal (e.g. 125 MHz clock signal).
This adjustment is done through the two-way exchange of PTP sync messages, which are corrected
to achieve sub-ns accuracy due to the precise knowledge of the link delay.
\begin{figure}[ht!]
\centering
% \vspace{-1.3cm}
\includegraphics[width=1.00\textwidth]{fig/clocks.ps}
\caption{Synchronization and syntonization in a White Rabbit link.}
\label{fig:wrNodes}
\end{figure}
\newpage
The precise knowledge of the link delay is obtained by accurate hardware
timestamps and calculation of the delay asymmetry (see section~\ref{sec:delayAsymCal}).
The described single-link synchronization can be replicated.
Multi-link WR networks are obtained by chaining WR links forming a
hierarchical topology. This hierarchy is imposed by the fact that
a frequency traceable to a common grandparent must be distributed
a frequency traceable to a common grandmaster must be distributed
over the physical layer, resulting in a \textit{cascade} of master
and slave nodes. As a result of this topology, all WR nodes are
PTP boundary clocks. It should be noted that the problem of non-linear
and slave nodes. As a result of this topology, WR network consists of two WR node kinds:
\textit{WR boundary clocks} (WR switches) and \textit{WR ordinary clocks}
(see section~\ref{sec:wrptpOverview}). It should be noted that the problem of non-linear
error accumulation of chained boundary clocks does not apply, or is at
least greatly diminished by the clock recovery mechanism.
\begin{figure}[ht!]
\centering
% \vspace{-1.3cm}
\includegraphics[width=0.80\textwidth]{fig/wr_net_topology.ps}
\caption{White Rabbit network; it forms a hierarchical topology.}
\label{fig:wrNetwork}
\end{figure}
Some applications need WR and IEEE1588-2008 nodes to coexist. Examples
of this are existing IEEE1588 installations which are to be migrated
progressively to White Rabbit, and networks where the need for highly
progressively to White Rabbit and networks where the need for highly
accurate time synchronisation is concentrated on a certain group of
nodes. For this purpose the WR protocol enables WR nodes to defer to
IEEE1588 behaviour when not connected to another WR node.
Figure~\ref{fig:hybrid-network} depicts the topology of a \emph{hybrid}
WR/IEEE1588 network.
\begin{figure}[ht!]
\centering
\vspace{-1.3cm}
\includegraphics[width=0.80\textwidth]{fig/hybrid.ps}
\caption{Hybrid WR/IEEE1588 network. White Rabbit nodes work
transparently with PTP nodes. WR ordinary clock 3 is more accurately
synchronised to the grandmaster than WR ordinary clock 2, which
is below a PTP boundary clock.}
\label{fig:hybrid-network}
\end{figure}
\newpage
\section{Precision Time Protocol}
\label{sec:ptp}
The IEEE1588-2008 standard \cite{IEEE1588}, known as Precise Time Protocol (PTP),
The IEEE1588-2008 standard, known as Precise Time Protocol (PTP),
is repeatedly referenced in this document. Knowledge of basic PTP concepts is
required to read this specification, therefore they are explained in this section.
Full comprehension of the White Rabbit protocol requires fluency in PTP and a copy
of the standard at hand.
PTP is a packet-based protocol designed to synchronize devices in distributed systems.
The standard defines two kinds of messages which are exchanged between \textit{PTP nodes}:
\textit{event messages} and \textit{general messages}. The time of transmission and
reception of event messages is \textit{timestamped} (measured). General messages
\textit{event messages} and \textit{general messages}. Both, the time of transmission and
the time of reception of event messages are \textit{timestamped}. General messages
are used by PTP nodes to identify other PTP nodes, establish clock hierarchy and
exchange data, i.e.~timestamps, settings, parameters. PTP defines several methods
exchange data, e.g.~timestamps, settings or parameters. PTP defines several methods
for node' synchronization. Figure~\ref{fig:wrPTPmsgs} presents the messages used when
the \textit{delay request-response mechanism} (with \textit{two-step clock}) is used,
which is the case in White Rabbit. For simplicity reasons, a PTP node is
considered as an \textit{ordinary clock} in the remainder of this section; such clocks
considered an \textit{ordinary clock} in the remainder of this section; such clocks
have only one port.
\begin{figure}[ht!]
\centering
\includegraphics[width=0.30\textwidth]{fig/ptpMSGs.ps}
\caption{PTP messages used by WRPTP.}
\label{fig:wrPTPmsgs}
\end{figure}
An \textit{Announce Message} is periodically broadcast by the PTP node which is
in the Master state. The message carries information about its originator and
the originator's clock source quality. This enables other PTP nodes receiving
......@@ -133,18 +187,13 @@ The algorithm defines the role of each PTP node in PTP network hierarchy;
the outcome of the algorithm is the recommended next state of the PTP node and
the node's synchronization source (grandparent). In other words, a PTP node
decides to which other PTP node it should synchronize based on the information
provided in announce messages and using BMC algorithm. A PTP node which is in
provided in announce messages and using the BMC algorithm. A PTP node which is in
the SLAVE state synchronizes to the clock of another PTP node. A PTP node
which is in the MASTER state is regarded as a source of synchronization
for other PTP nodes. The full PTP state machine with state descriptions
is included in Appendix~\ref{ptpFSM}.
\begin{figure}[ht!]
\centering
\includegraphics[width=0.70\textwidth]{fig/ptpMSGs.ps}
\caption{PTP messages used by WRPTP (messages annotated with * are extended by WR Protocol). }
\label{fig:wrPTPmsgs}
\end{figure}
\textit{Sync Messages} and \textit{Delay\_Req Messages} are timestamped
($t_{1}$, $t_{2}$, $t_{3}$, $t_{4}$) and these timestamps are used to calculate
......@@ -155,8 +204,25 @@ and Slave (in the case of a two-step clock).
\textit{Management Messages} are used only for configuration and
administrative purposes. They are not essential for PTP synchronization.
Adjustment of the Slave's clock using the offset and the delay calculated with timestamps
($t_{1}$, $t_{2}$, $t_{3}$, $t_{4}$) results in the Slave's synchronization with the Master clock.
The flow of events in PTP delay request-respons (two-step clock) mechanism is the following
(simplified overview):
\begin{enumerate}
\item The master sends periodically Announce messages.
\item The slave receives the Announce message, uses the BMC algorithm to establish its place in the network hierarchy.
\item The master sends periodically a Sync message (timestamped on transmission, $t_1$) followed by a Follow\_UP message which carries $t_1$.
\item The slave receives the Sync message sent by the master (timestamped on reception, $t_2$).
\item The slave receives the Follow\_Up message sent by the master.
\item The slave sends a Delay\_Req message (timestamped on transmission, $t_3$).
\item The master receives the Delay\_Req message sent by the master (timestamped on reception, $t_4$).
\item The master sends the Delay\_Resp message which carries $t_4$.
\item The slave receives the Delay\_Resp.
\item The slave adjusts its clock using the offset and the delay calculated with timestamps
($t_{1}$, $t_{2}$, $t_{3}$, $t_{4}$). It results in the Slave's synchronization with the Master clock.
\item Repeat 1-10.
\end{enumerate}
\newpage
\section{Link Delay Model}
\label{sec:delaymodel}
......@@ -204,7 +270,9 @@ provides correlations obtained empirically for one scenario.
An accurate correlation between both variable delays on the transmission line
is essential for obtaining an acceptable estimate of the delay asymmetry on a
WR link. The origin of this correlation is highly implementation-dependent.
Thus this document just assumes that such correlation exists and is known.
Thus this document just assumes that such correlation exists and is known.
The correlation between $\delta_{ms}$ and $\delta_{sm}$ is represented in
this document by Alpha ($\alpha$).
The rest of this section presents a well-known physical medium correlation.
......@@ -273,14 +341,14 @@ The delay asymmetry can then be derived from equations \eqref{eq:delayms}, \eqre
\eqasymm = \Delta_{tx_m} + \Delta_{rx_s} - \frac{\Delta - \alpha \mu + \alpha \Delta}{2 + \alpha}
\end{equation}
\\
It can be noticed that if $\Delta << \mu$, the above equation can be simplified:
It can be noted that if $\Delta << \mu$, the above equation can be simplified:
\begin{equation}
\label{eq:aqasymmSympl}
\eqasymm = \Delta_{tx_m} + \Delta_{rx_s} - \frac{\Delta - \alpha \mu}{2 + \alpha}
\end{equation}.
\newpage
\section{Fixed delays}
\label{sec:fixedDelays}
......@@ -288,66 +356,98 @@ The knowledge of fixed delays $\Delta_{\{tx_m, rx_s, tx_s, rx_m\}}$ is necessary
delay asymmetry \eqref{eq:aqasymm}. Such delays may be constant for the lifetime of the hardware,
its up-time or the duration of the link connection. Therefore, the method for obtaining fixed
delays is medium-specific and implementation-dependent. The delays are measured (if necessary)
and distributed across the link during the process of establishing the WR link, which is called
\textit{WR Link Setup} in this document. A WR~node participates in the measurement of another
and the information about its values is distributed across the link during the process of
establishing the WR link, which is called \textit{WR Link Setup} in this document.
A WR~node participates in the measurement of another
WR node's reception fixed delay ($\Delta_{\{rx_m, rx_s\}}$) upon request, e.g. by sending
a calibration pattern in Gigabit Ethernet. The method for obtaining fixed delays for
Gigabit Ethernet is described in the rest of this section.
a calibration pattern in Gigabit Ethernet. Measurement of fixed delays during WR Link Setup
is optional. It is only required if a non-deterministic reception/transmission elements are used.
\subsection{Measurement of fixed delays for Gigabit Ethernet over Optic Fiber}
\label{sec:calibForGigbitE}
An example implementation of the method to obtain fixed delays for non-deterministic Gigabit Ethernet PHY
is described in Appendix.
The variation of $\Delta_{\{tx_m, rx_s, tx_s, rx_m\}}$ delays is often caused by
the PHY's serializer / deserializer (SerDes), phase locked loop (PLL) or clock and
data recovery circuitry (CDR). The delay on the PHY can be measured by detecting
the phase shift between SerDes I/O and Tx/Rx clock. This can be done by sending
a repeated pattern of five "0" and five "1" (0000011111) over Gigabit Ethernet.
Such signal creates a 125~MHz clock on the SerDes I/O. Since the Tx/Rx clock
frequency is 125~MHz, the phase shift between the SerDes I/O and the Tx/Rx
clocks is equal to the fixed delay of the PHY (see Figure~\ref{fig:wrCalibration}).
The repeated pattern of five "0" and five "1" is an example of
\textit{calibration pattern} which is defined by the node requesting calibration.
\begin{figure}[ht!]
\centering
\includegraphics[width=0.60\textwidth]{fig/calibrate.ps}
\caption{Measurement of fixed delays $\Delta_{\{tx, rx\}}$ in Gigabit Ethernet-based WR node with not full-deterministic PHY.}
\label{fig:wrCalibration}
\end{figure}
Measurement of fixed delays for Gigabit Ethernet over optic fiber, and any other medium, is optional.
It is not needed if deterministic PHYs or internal FPGA transceivers which can be internally
characterized (\cite{Peek2010}) are used. In such case, know fixed delays are distributed across
the link without preceding measurement.
% \newpage
\newpage
\section{White Rabbit PTP Extension}
\subsection{Overview}
\label{sec:wrptpOverview}
White Rabbit extends the IEEE1588-2008 (PTP) standard to achieve sub-ns accuracy while still benefiting
from PTP's synchronization and management mechanisms. From now on in this document,
the White Rabbit extension to the PTP standard will be referred to as \textit{WRPTP}. WRPTP introduces
\textit{the White Rabbit Link Setup} (WR Link Setup), which is a process for establishing the WR link.
It includes syntonization of the local clock over the physical layer, measurement of fixed delays
and their distribution over the link. The WR extension takes advantage of the Link Delay Model
to obtain an accurate delay estimation, i.e. it uses the delay asymmetry equation \eqref{eq:aqasymm}
\textit{the White Rabbit Link Setup} (WR Link Setup), which is a process for establishing the WR link
(Figure~\ref{fig:wrptpMSGs}).
It includes syntonization of the local clock over the physical layer, measurement of fixed delays (calibration)
and distribution of information about fixed delays over the link. The WR extension takes advantage of the Link Delay Model
to obtain an accurate delay estimation, i.e. it uses the delay asymmetry equation \eqref{eq:aqasymm}
for Gigabit Ethernet over Fiber Optic. WRPTP extends the PTP messages and Data Sets (DS).
\begin{figure}[ht!]
\centering
% \vspace{-1.3cm}
\includegraphics[width=0.80\textwidth]{fig/wrptpMSGs.ps}
\caption{Simplified overview of message flow in WRPTP. }
\label{fig:wrptpMSGs}
\end{figure}
The flow of events for standard PTP which is presented in section~\ref{sec:ptp} is extended
as depicted in Figure~\ref{fig:wrptpMSGs} and described below (simplified overview):
\newpage
\begin{enumerate}
\item The WR Master sends periodically WR Announce message with the custom suffix.
\item The WR Slave receives an Announce message, recognizes it as the WR Announce message and uses the modified BMC algorithm to establish its place in the WR network hierarchy.
\item The WR Slave starts WR Link Setup by sending S\_PRESENT WR Management message.
\item The WR Master starts sends LOCK WR Management message to request the WR Slave to start syntonization.
\item The WR Slave sends LOCKED WR Management message as soon as the syntonization process is finished (notification from the hardware).
\item The WR Master sends CALIBRATE WR Management message to request calibration of its reception fixed delay.
\item The WR Master sends CALIBRATED WR Management message as soon as the calibration is finished (notification from hardware).
\item The WR Slave sends CALIBRATE WR Management message to request calibration of its reception fixed delay.
\item The WR Slave sends CALIBRATED WR Management message as soon as the calibration is finished (notification from hardware).
\item The WR Master sends WR\_MODE\_ON WR Management message to indicate completion of WR Link Setup process.
\item The WR Master sends periodically a Sync message (timestamped on transmission, $t_1$) followed by a Follow\_UP message which carries $t_1$.
\item The WR Slave receives the Sync message sent by the master (timestamped on reception, $t_2$).
\item The WR Slave receives the Follow\_Up message sent by the master.
\item The WR Slave sends a Delay\_Req message (timestamped on transmission, $t_3$).
\item The WR Master receives the Delay\_Req message sent by the master (timestamped on reception, $t_4$).
\item The WR Master sends a Delay\_Resp message which carries $t_4$.
\item The WR Slave receives the Delay\_Resp.
\item The WR Slave adjusts its clock using the offset and the delay calculated with timestamps
($t_{1}$, $t_{2}$, $t_{3}$, $t_{4}$) corrected with asymmetry and $\mu_MS$. It results in the Slave's synchronization with the Master clock.
\item Repeat 1, 11-18.
\end{enumerate}
Since the WR Link Setup is performed in the PTP UNCALIBRATED state, it is essential for a
WR node to implement this state as specified in the PTP state machine (Appendix~\ref{ptpFSM}):
a transition state between the LISTENING or PRE\_MASTER or MASTER or PASSIVE state and the SLAVE state.
A \textit{White Rabbit Switch} (WRSW) is not a PTP-compliant boundary clock. It is considered as a set of
A \textit{White Rabbit Switch} (WRSW) is not a PTP-compliant boundary clock. It is considered a set of
ordinary clocks with predefined functionality (WR Master or WR Slave) rather than a clock with multiple
PTP ports. As a consequence, WRPTP messages are never forwarded. In this document, the term \textit{node}
is used interchangeably with \textit{port}. A WR Master node/port is an ordinary clock with predefined
Master functionality, working as a Master on the link. A WR Slave node/port is an ordinary clock with
predefined Slave functionality, working as a Slave on the link. Proper performance of a WR network
is ensured by connecting a WR Slave port to a WR Master port. Additionally, optimal performance of
a hybrid WR/IEEE1588 network can only be achieved by connecting a non-WR port to WR Master port.
is ensured by connecting a WR Slave port to a WR Master port.
Figure~\ref{fig:hybrid-network} depicts the topology of a \emph{hybrid} WR/IEEE1588
network where optimal synchronization with grandmaster is
achieved by connecting a non-WR Slaves to WR Masters.
\begin{figure}[ht!]
\centering
% \vspace{-1.3cm}
\includegraphics[width=0.80\textwidth]{fig/hybrid.ps}
\caption{Hybrid WR/IEEE1588 network. White Rabbit nodes work
transparently with PTP nodes. WR ordinary clock 3 is more accurately
synchronised to the grandmaster than WR ordinary clock 2, which
is below a PTP boundary clock.}
\label{fig:hybrid-network}
\end{figure}
......@@ -355,15 +455,15 @@ a hybrid WR/IEEE1588 network can only be achieved by connecting a non-WR port to
\label{sec:wrDS}
The PTP standard defines data sets (DS) to store the static and dynamic variables needed for the operation of
the protocol (section 8, IEEE1588 \cite{IEEE1588}). WRPTP requires additional DS fields to store the WR-specific
parameters. Table~\ref{tab:wrDS} defines and describes required DS fields.
the protocol (section 8, PTP). WRPTP requires additional DS fields to store the WR-specific
parameters. Table~\ref{tab:wrDS} defines and describes the additional required DS fields that are not a part of PTP standard.
\begin{table}[ph!]
\caption{WRPTP Data Sets fields}
\centering
\begin{tabular}{| c | c | p{2.5cm} | p{3.5cm} |} \hline
\begin{tabular}{| c | c | p{2.5cm} | p{4cm} |} \hline
\textbf{DS member} & \textbf{DS name}&\textbf{Values} & \textbf{Description} \\
& & & \\ \hline
......@@ -375,7 +475,7 @@ calPeriod & portDS & 32 bit value & Calibration peri
calPattern & portDS & 32 bit value & Medium specific calibration pattern. \\ \hline
calPatternLen & portDS & 16 bit value & Number of bits of calPattern to be repeated. \\ \hline
wrMode & portDS & TRUE, FALSE & If TRUE, the port is working in WR mode. \\ \hline
wrAlpha & portDS & 32 bit value & $\alpha$ parameter as described in section \ref{sec:singlefiber}. \\ \hline
wrAlpha & portDS & 32 bit value & $\alpha$ parameter as described in section~\ref{sec:singlefiber}. \\ \hline
grandmasterWrPortMode & parentDS & NON\_WR, WR\_SLAVE, WR\_MASTER & Determines predefined function of the PTP grandmaster. \\ \hline
grandmasterDeltaTx & parentDS & 64 bit value & Grandmaster's $\Delta_{tx}$ measured in picoseconds and multiplied by ${2^{16}}$. \\ \hline
grandmasterDeltaRx & parentDS & 64 bit value & Grandmaster's $\Delta_{rx}$ measured in picoseconds and multiplied by ${2^{16}}$. \\ \hline
......@@ -391,8 +491,8 @@ grandmasterWrMode & parentDS & TRUE, FALSE & If TRUE, the
\label{sec:wrBMC}
The Best Master Clock algorithm is used in PTP to compare local clocks, determine which
clock is the \textit{"best"} and recommend the next state of the PTP state machine (section 9.3, IEEE1588 \cite{IEEE1588}).
The Best Master Clock algorithm is used in PTP to compare local clocks, to determine which
clock is the \textit{"best"} and to recommend the next state of the PTP state machine (section 9.3, PTP).
It is required from modified BMC that the comparison of a WR Master with a WR Slave or
non-WR clock results in the WR Master being the \textit{"best"} clock. To ensure a proper
......@@ -405,20 +505,21 @@ BMC outcome, the WR Master $clockClass$ value shall be in the range of 1 through
\subsubsection{Overview}
White Rabbit benefits from PTP's messaging facilities. It uses two-step clock delay
request-response mechanism, and customizes Announce and Management messages (Figure~\ref{fig:wrPTPmsgs}).
In particular, it adds suffix to Announce message, defines \textit{WR Type-Length-Valu}e
White Rabbit benefits from PTP's messaging facilities. It uses a two-step clock delay
request-response mechanism and customizes Announce and Management messages (Figure~\ref{fig:wrPTPmsgs}).
In particular, it adds a suffix to the Announce message, defines a \textit{WR Type-Length-Valu}e
(WR TLV) type, WR management action and management~IDs.
A White Rabbit Master node announces its presence by adding a WR TLV suffix to the Announce message.
The suffix is ignored by standard PTP nodes, but read and interpreted by White Rabbit nodes.
The suffix is defined by PTP standard as a set of TLV entities (section 13.4, PTP),
unrecognized TLVs are ignored by standard PTP nodes (section 14.1, PTP), but read and interpreted by White Rabbit nodes.
The information provided in the WRPTP Announce message is sufficient for a WR Slave to decide
whether the WR link can be established and maintained. The WR link is established through the WR Link
Setup process in the PTP UNCALIBRATED state. If a WR Link Setup is required, the WR Slave starts
the process and requests the WR Master to do the same. During the WR Link Setup, communication
between the WR Master and the WR Slave is performed using the PTP Management mechanism extended
for White Rabbit requirements. Once the WR link has been established, the WR nodes use a
PTP delay request-response mechanism (section 11.3, IEEE1588 \cite{IEEE1588}).
PTP delay request-response mechanism (section 11.3, PTP).
\subsubsection{WR Type-Length-Value Type}
......@@ -468,7 +569,7 @@ TLV stores the $wrFlags$ which are defined in Table~\ref{tab:wrFlags}.
\begin{table}[ht!]
\caption{White Rabbit flags (unused flags are reserved)}
\caption{White Rabbit flags (unused flags are reserved and shall be written to 0, ignored when read)}
\centering
\begin{tabular}{| c | c | c | c | p{5.3cm} |} \hline
......@@ -488,9 +589,9 @@ TLV stores the $wrFlags$ which are defined in Table~\ref{tab:wrFlags}.
\subsubsection{WRPTP Management Messages}
\label{wrManagementMSG}
White Rabbit extends the default PTP management mechanism described in section 15.2 of IEEE1588.
White Rabbit extends the default PTP management mechanism described in section 15.2 of PTP.
The extension conforms to the PTP management message format presented in Table~\ref{tab:wrManagemetnMSG}.
It uses the reserved range of \textit{actionField} values (Table 38, IEEE1588 \cite{IEEE1588}) to define a
It uses the reserved range of \textit{actionField} values (Table 38, PTP) to define a
\textit{White Rabbit Command} (WRC) as described in Table~\ref{tab:wrActionField}.
WRC management messages trigger transitions in WR state machines. They are recognized by the \textit{managementId}
field of \textit{managementTLV} (Table~\ref{tab:wrOtherTLV}, \ref{tab:wrCalibrateTLV} \& \ref{tab:wrCalibratedTLV}).
......@@ -499,7 +600,7 @@ exchanged only within one link connection (no forwarding), therefore the \textit
\textit{boundaryHops} fields are unused and set to 0x0. The rest of this subsection describes the WR management messages in detail.
\begin{table}[h!]
\caption{PTP Management Message (Table 37, IEEE1588 \cite{IEEE1588}) }
\caption{PTP Management Message (Table 37, PTP) }
\centering
\begin{tabular}{| c | c | c | c | c | c | c | c | c | c |}
\hline
......@@ -547,11 +648,9 @@ field of the TLV indicates the specific event which triggers transition in WR FS
SLAVE\_PRESENT & 0x6000 & WR\_CMD & port \\ \hline
LOCK & 0x6001 & WR\_CMD & port \\ \hline
LOCKED & 0x6002 & WR\_CMD & port \\ \hline
MASTER\_CALIBRATE & 0x6003 & WR\_CMD & port \\ \hline
MASTER\_CALIBRATED & 0x6004 & WR\_CMD & port \\ \hline
SLAVE\_CALIBRATE & 0x6005 & WR\_CMD & port \\ \hline
SLAVE\_CALIBRATED & 0x6006 & WR\_CMD & port \\ \hline
WR\_MODE\_ON & 0x6007 & WR\_CMD & port \\ \hline
CALIBRATE & 0x6003 & WR\_CMD & port \\ \hline
CALIBRATED & 0x6004 & WR\_CMD & port \\ \hline
WR\_MODE\_ON & 0x6005 & WR\_CMD & port \\ \hline
\end{tabular}
\label{tab:wrManagementId}
\end{table}
......@@ -591,15 +690,15 @@ The message shall have the format specified in Table~\ref{tab:wrOtherTLV}.
\paragraph{MASTER\_CALIBRATE and SLAVE\_CALIBRATE} Messages sent to request calibration pattern
(see \ref{sec:calibForGigbitE}). \textit{SLAVE\_CALIBRATE} is sent by WR~Slave to WR~Master.
\textit{MASTER\_CALIBRATE} is sent by WR~Master to WR~Slave. Both messages carry a set of parameters defining
\paragraph{CALIBRATE} Messages sent by the WR node entering REQ\_CALIBRATION state. It informs the other node
whether sending calibration pattern (see section~\ref{sec:fixedDelays}) is required (defined by the value of \textit{sendPattern} flag).
If calibration is required, it carries a set of parameters defining the parameters of
the calibration pattern to be sent. The message format and parameters are described in Table~\ref{tab:wrCalibrateTLV}.
\begin{table}[h!]
\caption{CALIBRATE WR Management TLV}
\centering
\begin{tabular}{| c | c | c | c | c | c | c | c | c | c | p{4.5cm} |}
\begin{tabular}{| c | c | c | c | c | c | c | c | c | c | p{5cm} |}
\hline
\multicolumn{8}{|c|}{\textbf{Bits}} & \textbf{Octets} & \textbf{TLV} &\\
%\hline
......@@ -609,9 +708,10 @@ the calibration pattern to be sent. The message format and parameters are descri
\multicolumn{8}{|c|}{tlvType } & 2 & 0 & 0x2004, see \ref{sec:wrTLVtype}. \\ \hline
\multicolumn{8}{|c|}{lengthField } & 2 & 2 & 0xC, section 15.5.2.3 IEEE1588 \cite{IEEE1588}.\\ \hline
\multicolumn{8}{|c|}{managementId } & 2 & 4 & MASTER\_CALIBRATE or SLAVE\_CALIBRATE.\\ \hline
\multicolumn{8}{|c|}{calibrationPeriod} & 4 & 6 & The value defines the time (in microseconds) for which the calibration pattern should be sent by receiving node.\\ \hline
\multicolumn{8}{|c|}{calibrationPattern} & 4 & 10 & The value defines the calibration pattern which should be sent by the receiving node.\\ \hline
\multicolumn{8}{|c|}{calibrationPatternLen} & 2 & 12 & The value defines the number of bits of \textit{calibrationPattern} field which should be used as repeated pattern (starting with the LSB). \\\hline
\multicolumn{8}{|c|}{sendPattern } & 2 & 6 & The value determines whether calibration pattern should be sent. If the value is 0x1, the calibration pattern is sent. If the value is 0x0 the calibration pattern is not sent. \\ \hline
\multicolumn{8}{|c|}{calibrationPeriod} & 4 & 8 & The value defines the time (in microseconds) for which the calibration pattern should be sent by receiving node.\\ \hline
\multicolumn{8}{|c|}{calibrationPattern} & 4 & 12 & The value defines the calibration pattern which should be sent by the receiving node.\\ \hline
\multicolumn{8}{|c|}{calibrationPatternLen} & 2 & 14 & The value defines the number of bits of \textit{calibrationPattern} field which should be used as repeated pattern (starting with the LSB). \\\hline
\end{tabular}
\label{tab:wrCalibrateTLV}
\end{table}
......@@ -620,9 +720,8 @@ the calibration pattern to be sent. The message format and parameters are descri
\paragraph{MASTER\_CALIBRATED} Message sent by~WR Master to WR~Slave. If preceeded by \textit{MASTER\_CALIBRATE},
it indicates successful calibration. Otherwise, it indicates that master does not need calibration. In both cases,
the message provides the WR Slave with the values of the Master's fixed delays ($\Delta_{tx_m}$ and $\Delta_{rx_m}$).
\paragraph{CALIBRATED} Message sent by the WR node entering \textit{CALIBRATED} state. If preceded by \textit{CALIBRATE} with \textit{sendPattern} set to TRUE,
it indicates successful completion of calibration. The message provides the other node with the values of its fixed delays ($\Delta_{tx}$ and $\Delta_{rx}$).
The messages shall have the format specified in Table~\ref{tab:wrCalibratedTLV}.
\begin{table}[ht]
......@@ -647,212 +746,160 @@ The messages shall have the format specified in Table~\ref{tab:wrCalibratedTLV}.
\paragraph{WR\_MODE\_ON} Message sent by WR Slave to WR Master. It indicates successful completion of
the WR Link Setup process and requests the WR~Master to enter WR~mode. The message shall have the
\paragraph{WR\_MODE\_ON} Message sent by WR Master to WR Slave. It indicates successful completion of
the WR Link Setup process and requests the WR~Slave to enter WR~mode. The message shall have the
format specified in Table~\ref{tab:wrOtherTLV}.
\newpage
\subsection{White Rabbit State Machines}
\subsection{White Rabbit State Machine}
\label{wrFSM}
The White Rabbit finite state machines (WR FSMs) control the process of establishing a White Rabbit
The White Rabbit finite state machine (WR FSM) controls the process of establishing a White Rabbit
link between a WR Master and a WR Slave (WR Link Setup). It involves recognition of two compatible
WR nodes, syntonization over the physical layer, measurement of fixed delays and exchange of
their values across the link. The procedure differs between WR Master and WR Slave, therefore
two separate FSM are defined.
The fields of the WR Data Set (Table~\ref{tab:wrFlags}) determine whether the WR Master FSM, the WR Slave FSM,
or no WR FSM shall be executed in the PTP UNCALIBRATED state.
two states of the FSM are entered only by the the node in WR Slave mode (Slave-only states). The WR FSM shall be
executed in the PTP UNCALIBRATED state, it is depicted in Figure~\ref{fig:wrFSM} and described in the rest of
this section.
\subsubsection{WR Slave FSM}
\subsubsection{Condition to start WR FSM by WR Slave}
\label{wrSlaveFSM}
The WR Slave FSM exits the IDLE state (is executed) only when the PTP state machine (Appendix~\ref{ptpFSM})
The WR FSM in WR Slave exits the IDLE state (is executed) only when the PTP state machine (Appendix~\ref{ptpFSM})
is in the PTP UNCALIBRATED state and the following conditions are met:
\begin{itemize}
\item the node is WR Slave: \\ ($portDS.wrPortMode = WR\_SLAVE$) \textbf{AND}
\item the parent node is WR Master: \\ ($parentDS.grandmasterWrPortMode = WR\_MASTER$) \textbf{AND}
\item the node or parent node or both nodes are not in WR Mode: \\ (\textit{portDS.wrMode = FALSE OR parentDS.grandmasterWrMode = FALSE}).
\end{itemize}
The state machine is presented in Figure~\ref{fig:wrSlaveFSM} and described in the rest of this subsection.
\newpage
\subsubsection{Condition to start WR FSM by WR Master}
\label{wrMasterFSM}
\paragraph{WR Slave FSM Transition Events and Conditions}
\begin{description}
\item[]
\item[Start] Power up.
\item[WR LINK SETUP REQUIRED] (abrv. WR\_SETUP\_REQ) Event indicating that WR Link Setup is required and WR Slave FSM should be executed, explanation above.
\item[LOCK] WR $LOCK$ Management message which triggers frequency locking over the physical layer.
\item[LOCKED] Notification from the hardware that the frequency locking has been completed successfully.
\item[MASTER\_CALIBRATE] (abrv. M\_CALIBRATE) WR Management message. Upon reception, WR Slave starts sending calibration pattern for the period of time indicated by $calibrationPeriod$.
\item[MASTER\_CALIBRATED] (abrv. M\_CALIBRATED) WR Management message. It indicates that the WR Master is calibrated. If the \textit{MASTER\_CALIBRATED} message is received in the $LOCKED$ state, it means that the WR Master knows its fixed delays, it does not need to be calibrated, therefore the \textit{MASTER\_CALIBRATE} state can be skipped. If the message is received in \textit{MASTER\_CALIBRATE} state, it indicates successful completion of the WR Master's calibration.
\item[PORT IS CALIBRATED] (abrv. IS\_CAL) Information stored in portDS ($calibrated$) indicating that the fixed delays for the port are known.
\item[PORT IS NOT CALIBRATED] (abrv. NOT\_CAL) Information stored in the portDS (\textit{calibrated}) indicating that the fixed delays for port are not known.
\item[ANY\_TIMEOUT] The time spent by the WR FSM in the following states: $present$, $lock$, $locked$, $calib\_m$, $calib\_s$ is limited by timeouts. Exceeding any of these timeouts is represented by $ANY\_TIMEOUT$.
\end{description}
The WR Master node shall enter the PTP UNCALBRATED state, and start execution of the WR FSM by entering \textit{LOCK} state, when it receives a SLAVE\_PRESENT WR Management message (Table~\ref{tab:wrManagementId}).
\paragraph{State Description}
\newpage
\begin{description}
\item[]
\item[Idle] WR FSM shall be in the Init state if the PTP FSM is in a state other than UNCALIBRATED.
\item[Present] WR Slave sends SLAVE\_PRESENT message to WR Master and waits for the $LOCK$ message.
\item[Lock] Locking of WR Slave's logic to the frequency distributed over physical layer by the WR Master. When finished successfully, a LOCKED message is sent to the WR Master.
\item[Locked] WR Slave waits for MASTER\_CALIBRATE or MASTER\_CALIBRATED message.
\item[Calibrate Master] (abrv. $calib\_m$) Reception fixed delay is measured for the WR Master. The WR Slave sends the calibration pattern for the period indicated by $calibratePeriod$ in the message received from the WR Master. When the MASTER\_CALIBRATED message is received from the WR Master, the state is exited.
\item[Calibrate Slave] (abrv. $calib\_s$) Reception fixed delay is measured for the WR Slave. It sends a SLAVE\_CALIBRATE message to the WR Master (indicating the period of calibration pattern). As soon as the measurement is finished successfully, a SLAVE\_CALIBRATED message is issued and the state is exited.
\item[Calibration\_completed] (abrv. cal\_cmp) WR Slave sends WR\_MODE\_ON message to WR Master, enters WR Idle state; PTP UNCALIBRATED state is exited.
\item[Any] Any state.
\end{description}
\begin{figure}[ht!]
\begin{tikzpicture}[->,>=stealth', shorten >=2pt, auto, node distance=5cm, semithick, inner sep=5pt]
\tikzstyle{every state}=[minimum height=1.3cm]
\node[state,initial](IDLE) {$idle$};
\node[state] (PRESENT) [above right of=IDLE,node distance=5.7cm] {$present$};
\node[state] (LOCK) [right of=PRESENT,node distance=4.5cm] {$lock$};
\node[state] (LOCKED) [below of=LOCK,node distance=5.2cm] {$locked$};
\node[state] (CALIBRATE-SLAVE) [below left of=LOCKED] {$calib\_s$};
\node[state] (CALIBRATE-MASTER) [below right of=CALIBRATE-SLAVE] {$calib\_m$};
\node[state] (CALIBRATE-COMPLETED) [left of=CALIBRATE-SLAVE] {$cal\_cmp$};
\node[state] (ANY) [right of=IDLE]{$any$};
\paragraph{State Description}
\path
(IDLE) edge [left] node {WR\_SETUP\_REQ} (PRESENT)
(PRESENT) edge [above] node {LOCK} (LOCK)
edge [loop above] node {retry $n_{present,s}$} (LOCK)
(LOCK) edge [left] node {LOCKED} (LOCKED)
edge [loop above] node {retry $n_{lock,s}$ } (LOCK)
(LOCKED) edge [bend left=50] node [anchor=south,left,text width=2.5cm]
{
M\_CALIBRATE
} (CALIBRATE-MASTER)
% node [anchor=west,left]{M\_CALIBRATED }
% node [anchor=west,left]{\& NOT\_CAL} (CALIBRATE-MASTER)
edge [above] node [anchor=south,above,text width=4.4cm]
{
M\_CALIBRATED \\
\& NOT\_CAL
} (CALIBRATE-SLAVE)
% edge [bend right=20] node {M\_CALIBRATE \& IS\_CAL} (CALIBRATE-SLAVE)
edge [loop right] node [anchor=north,above]{retry $n_{locked,s}$ } (LOCKED)
edge [bend right=25] node[anchor=south,above,text width=3.5cm]
{
M\_CALIBRATED \\
\& IS\_CAL
}(CALIBRATE-COMPLETED)
% edge [bend right=20] node [anchor=south,below] {M\_CALIBRATED }
% node [anchor=left,below]{\& }
% node [anchor=south,below]{IS\_CAL} (CALIBRATE-COMPLETED)
(CALIBRATE-MASTER) edge [below] node[anchor=north,below,text width=4.4cm]
{
NOT\_CAL \& \\
M\_CALIBRATED
}(CALIBRATE-SLAVE)
\begin{table}[hp!]
\caption{WR state definition}
\centering
\begin{tabular}{| c | p{11cm} |} \hline
\textbf{PTP portState} & \textbf{Description} \\
& \\ \hline
\small
IDLE & WR FSM shall be in the IDLE state if the PTP FSM is in a state other than UNCALIBRATED. \\ \hline
PRESENT & Slave-only state. The WR Slave sends SLAVE\_PRESENT message to the WR Master and waits for the $LOCK$ message.\\ \hline
LOCK & Locking of WR Slave's logic to the frequency distributed over physical layer by the WR Master. \\ \hline
LOCKED & Slave-only state. The WR Slave sends \textit{LOCKED} message the WR Master and waits for \textit{CALIBRATE} message. \\ \hline
REQ\_CALIBRATION & In this state optional calibration of the node's reception fixed delay can be performed.
The node sends \textit{CALIBRATE} message to the other node. If the calibration is needed,
(\textit{calibrated} is set to false), the \textit{sentPattern} flag in the \textit{CALIBRATE} message
is sent to TRUE (0x1). If the calibration is not needed, the \textit{sentPattern} flag is set to FALSE (0x0).
If calibration is not needed, next state is entered, otherwise an indication from the hardware
that the calibration has been finished successfully is awaited. \\ \hline
CALIBRATED & The node sends \text{CALIBRATED} message with information about its fixed delays. \\ \hline
RESP\_CALIB\_REQ & The nodes action in this state depends on the value of the \textit{sendPattern} flag received in \textit{CALIBRATE} message. TRUE value of the flag
indicates that calibration pattern shall be enabled. The pattern shall be disabled after \textit{calibrationPeriod}
or on reception of \textit{CALIBRATED} message. If the value of the \textit{sendPattern} flag is FALSE,
\textit{CALIBRATED} message is awaited for a default timeout. On reception of \textit{CALIBRATED} message the next state is entered.\\ \hline
WR\_LINK\_ON & The value of \textit{wrMode} is set to TRUE and the \textit{IDLE} state is entered. \\ \hline
\end{tabular}
\label{tab:wrSlaveFSMdesc}
\end{table}
% node {M\_CALIBRATED \& NOT\_CAL} (CALIBRATE-SLAVE)
edge [loop below] node {retry $n_{calib\_m,s}$ } (CALIBRATE-MASTER)
edge [bend left=25] node[anchor=south,below,text width=3.5cm]
{
IS\_CAL \\
\& M\_CALIBRATED
}(CALIBRATE-COMPLETED)
% edge [bend left=40] node {M\_CALIBRATED \& IS\_CAL} (CALIBRATE-COMPLETED)
(CALIBRATE-SLAVE) edge [above] node {IS\_CAL} (CALIBRATE-COMPLETED)
edge [loop right] node [anchor=north,above]{$n_{calib\_s,s}$} (CALIBRATE-SLAVE)
(CALIBRATE-COMPLETED) edge [above] node { } (IDLE)
% edge [loop below] node {retry $n_{cal\_cmp,s}$ } (IDLE)
(ANY) edge [above] node {ANY\_TIMEOUT} (IDLE);
\end{tikzpicture}
\caption{White Rabbit Slave FSM.}
\label{fig:wrSlaveFSM}
\end{figure}
\newpage
\subsubsection{Master FSM}
\label{wrMasterFSM}
\begin{figure}[ht!]
\centering
% \vspace{-1.3cm}
\includegraphics[width=0.80\textwidth]{fig/WRfsm.ps}
\caption{WR FSM.}
\label{fig:wrFSM}
\end{figure}
The WR Master node shall enter the PTP UNCALBRATED state, and start execution of the WR Master FSM, when it receives a SLAVE\_PRESENT WR Management message (Table~\ref{tab:wrManagementId}). The state machine is presented in Figure~\ref{fig:wrMasterFSM} and described in the rest of this subsection.
\paragraph{WR Slave FSM Transition Events and Conditions}
\begin{description}
\item[]
\item[Start] Power up.
\item[SLAVE\_PRESENT] (abrv. S\_PRESENT) WR Management message received from WR Slave. It indicates that a WR Link Setup is required. Reception of this message forces the PTP FSM to enter the UNCALIBRATED state and starts execution of the WR FSM.
\item[LOCKED] WR Management message. It indicates that the syntonization has been finished by the WR Slave.
\item[PORT IS CALIBRATED] (abrv. IS\_CAL) Information stored in the portDS (\textit{calibrated}) indicating that the fixed delays for the port are known.
\item[PORT IS NOT CALIBRATED] (abrv. NOT\_CAL) Information stored in portDS (\textit{calibrated}) indicating that the fixed delays for the port are not known.
\item[SLAVE\_CALIBRATE] (abrv. S\_CALIBRATE) WR Management message. Upon reception, the WR Master starts sending a calibration pattern for the period of time indicated by $calibrationPeriod$.
\item[SLAVE\_CALIBRATED] (abrv. S\_CALIBRATED) WR Management message. It indicates that the WR Slave is calibrated. If $SLAVE\_CALIBRATED$ is received without a preceding \textit{SLAVE\_CALIBRATE} message, it means that the WR Slave knows its fixed delays, it does not need to be calibrated. If the message is received after a $SLAVE\_CALIBRATE$ message, it indicates successful completion of the WR Slave's calibration.
\item[WR\_MODE\_ON] WR Management message. It indicates that the WR Slave has finished calibration and requests WR Master to turn on White Rabbit mode.
\item[ANY\_TIMEOUT] The time spent by the WR FSM in the following states: $lock$, $locked$, $calib\_m$, $calib\_s$, $cal\_cmp$ is limited by timeouts. Exceeding any of these timeouts is represented by \textit{ANY\_TIMEOUT}.
\end{description}
\paragraph{State Description}
\paragraph{WR FSM Transition Events and Conditions}
\begin{description}
\item[]
\item[Idle] WR FSM shall be in the Init state if the PTP FSM is in a state other than UNCALIBRATED.
\item[Lock] Locking of WR Slave's logic to the frequency distributed over physical layer by the WR Master. When finished successfully, a LOCKED message is received from the WR Slave.
\item[Locked] If the WR Master needs to measure its reception fixed delay (\textit{calibrated} is FALSE), it enters the \textit{calib\_m} state. Otherwise, it sends \\a \textit{MASTER\_CALIBRATED} message and enters \textit{calib\_s}.
\item[Calibrate Master] (abrv. $calib\_m$) WR Master's reception fixed delay is measured. When this state is entered, a \textit{MASTER\_CALIBRATE} message is sent to the WR Slave. On measurement successful completion, \\a \textit{MASTER\_CALIBRATED} message is sent and the calib\_s state is entered.
\item[Calibrate Slave] (abrv. $calib\_s$) WR Slave's reception fixed delay is measured. WR Master waits for a SLAVE\_CALIBRATE or a SLAVE\_CALIBRATED message. On reception of a SLAVE\_CALIBRATE message, the WR Master starts sending a calibration pattern for the period indicated by $calibratePeriod$. When a SLAVE\_CALIBRATED message is received, the state is exited.
\item[Calibration\_completed] (abrv. cal\_cmp). WR Master waits for a WR\_MODE\_ON message. On reception of the message, $wrMode$ is set to TRUE, the WR Idle state is entered and the PTP UNCALIBRATED state is exited.
\item[Any] Any state.
\item[Start] Power up.
\item[WR LINK SETUP REQUIRED DECISION] (abrv. D\_WR\_SETUP\_REQ) Event indicating that WR Link Setup is required and WR FSM should be executed starting with
\textit{PRESENT} state, explanation above.
\item[LOCK MESSAGE] (abrv. M\_LOCK) WR $LOCK$ Management message which triggers frequency locking over the physical layer.
\item[LOCKED HARDWARE EVENT] (abrv. HW\_LOCKED) Indication from the hardware that frequency locking has been completed successfully.
\item[LOCKED MESSAGE] (abrv. M\_LOCKED) WR $LOCKED$ Management message which notifies that frequency locking has been completed
successfully by the message sender.
\item[CALIBRATE MESSAGE] (abrv. M\_CALIBRATE) WR $CALIBRATE$ Management message. It request the recipient to enter
\textit{RESP\_CALIB\_REQ} state, indicates whether sending of the calibration pattern is required and
provides calibration parameters.
\item[CALIBRATED HARDWARE EVENT] (abrv. HW\_CALIBRATE) Notification from the hardware indicating that calibration has been completed successfully.
\item[CALIBRATED MESSAGE] (abrv. M\_CALIBRATED) WR \text{CALIBRATED} Management message. It indicates that the node is calibrated.
If the \textit{CALIBRATED} message is received when calibration is being sent by the recipient,
sending of the pattern shall be disabled. The message carries information about fixed delays of the sending node.
\item[WR LINK ON] (abrv. WR\_LINK\_ON) WR \textit{WR\_LINK\_ON} Management message. It indicates that the WR Master finished successfully
WR Link Setup and set the \text{wrMode} flag to TRUE.
\item[EXCEED TIMEOUT RETRIES] (abrv. EXC\_TIMEOUT\_RETRY) Indicates that the state has been re-entered for a set number of times. The following states are re-entered
after timeouts: \textit{LOCK}, \textit{LOCKED}, \textit{REQ\_CALIBRATION}, \textit{CALIBRATED}, \textit{RESP\_CALIB\_REQ}.
\end{description}
\begin{figure}[ht!]
\centering
% \vspace{-1.3cm}
\includegraphics[width=0.80\textwidth]{fig/FSMs_communication.ps}
\caption{WR FSM.}
\label{fig:wrFSMcommun}
\end{figure}
\begin{figure}[hp!]
\begin{tikzpicture}[->,>=stealth', shorten >=2pt, auto, node distance=5cm, semithick, inner sep=5pt]
\tikzstyle{every state}=[minimum height=1.3cm]
\newpage
\begin{center}
\huge Appendix
\end{center}
\node[state,initial](IDLE) {$idle$};
\node[state] (LOCK) [right of=IDLE] {$lock$};
\node[state] (LOCKED) [below of=LOCK] {$locked$};
\node[state] (CALIBRATE-MASTER) [below right of=LOCKED,node distance=3.5cm] {$calib\_m$};
\node[state] (CALIBRATE-SLAVE) [below left of=LOCKED,node distance=3.5cm] {$calib\_s$};
\node[state] (CALIBRATE-COMPLETED) [above left of=CALIBRATE-SLAVE] {$cal\_cmp$};
\node[state] (ANY) [below right of=IDLE, node distance=4cm]{$any$};
\normalsize
\appendix
\section{Measurement of fixed delays for Gigabit Ethernet over Optic Fiber}
\label{sec:calibForGigbitE}
\path
(IDLE) edge [above] node {S\_PRESENT} (LOCK)
(LOCK) edge [right] node {LOCKED} (LOCKED)
edge [loop above] node {retry $n_{lock,m}$ } (LOCK)
(LOCKED) edge [right] node {NOT\_CAL} (CALIBRATE-MASTER)
edge [left] node {IS\_CAL} (CALIBRATE-SLAVE)
edge [loop right] node {retry $n_{lock,m}$ } (LOCKED)
(CALIBRATE-MASTER) edge [below] node {IS\_CAL} (CALIBRATE-SLAVE)
edge [loop below] node {retry $n_{calib\_m,m}$ } (CALIBRATE-MASTER)
(CALIBRATE-SLAVE) edge node {S\_CALIBRATED} (CALIBRATE-COMPLETED)
edge [loop below] node {retry $n_{calib\_s,m}$ } (CALIBRATE-SLAVE)
(CALIBRATE-COMPLETED) edge [left] node {WR\_MODE\_ON} (IDLE)
edge [loop right] node {retry $n_{lock,m}$ } (IDLE)
(ANY) edge [above right] node {ANY\_TIMEOUT} (IDLE);
The variation of $\Delta_{\{tx_m, rx_s, tx_s, rx_m\}}$ delays is often caused by
the PHY's serializer / deserializer (SerDes), phase locked loop (PLL) or clock and
data recovery circuitry (CDR). The delay on the PHY can be measured by detecting
the phase shift between SerDes I/O and Tx/Rx clock. This can be done, in example, by sending
a repeated pattern of five "0" and five "1" (0000011111) over Gigabit Ethernet.
Such signal creates a 125~MHz clock on the SerDes I/O. Since the Tx/Rx clock
frequency is 125~MHz, the phase shift between the SerDes I/O and the Tx/Rx
clocks is equal to the fixed delay of the PHY (see Figure~\ref{fig:wrCalibration}).
The repeated pattern of five "0" and five "1" is an example of
\textit{calibration pattern} which is defined by the node requesting calibration.
\end{tikzpicture}
\caption{White Rabbit Master FSM}
\label{fig:wrMasterFSM}
\begin{figure}[ht!]
\centering
\includegraphics[width=0.60\textwidth]{fig/calibrate.ps}
\caption{Measurement of fixed delays $\Delta_{\{tx, rx\}}$ in Gigabit Ethernet-based WR node with not full-deterministic PHY.}
\label{fig:wrCalibration}
\end{figure}
\newpage
Measurement of fixed delays for Gigabit Ethernet over optic fiber, and any other medium, is optional.
It is not needed if deterministic PHYs or internal FPGA transceivers which can be internally
characterized \cite{Peek2010} are used. In such case, the information about the fixed delays is distributed across
the link without preceding measurement.
\newpage
\appendix
\section{PTP State Machine}
\label{ptpFSM}
......@@ -903,6 +950,78 @@ SLAVE & \small The port is synchronizing to the selected master po
\label{tab:wrManagementId}
\end{table}
\newpage
\section{OLD FSM}
\begin{figure}[ht!]
\begin{tikzpicture}[->,>=stealth', shorten >=2pt, auto, node distance=5cm, semithick, inner sep=5pt]
\tikzstyle{every state}=[minimum height=1.3cm]
\node[state,initial](IDLE) {$idle$};
\node[state] (PRESENT) [above right of=IDLE,node distance=5.7cm] {$present$};
\node[state] (LOCK) [right of=PRESENT,node distance=4.5cm] {$lock$};
\node[state] (LOCKED) [below of=LOCK,node distance=5.2cm] {$locked$};
\node[state] (CALIBRATE-SLAVE) [below left of=LOCKED] {$calib\_s$};
\node[state] (CALIBRATE-MASTER) [below right of=CALIBRATE-SLAVE] {$calib\_m$};
\node[state] (CALIBRATE-COMPLETED) [left of=CALIBRATE-SLAVE] {$cal\_cmp$};
\node[state] (ANY) [right of=IDLE]{$any$};
\path
(IDLE) edge [left] node {WR\_SETUP\_REQ} (PRESENT)
(PRESENT) edge [above] node {LOCK} (LOCK)
edge [loop above] node {retry $n_{present,s}$} (LOCK)
(LOCK) edge [left] node {LOCKED} (LOCKED)
edge [loop above] node {retry $n_{lock,s}$ } (LOCK)
(LOCKED) edge [bend left=50] node [anchor=south,left,text width=2.5cm]
{
M\_CALIBRATE
} (CALIBRATE-MASTER)
% node [anchor=west,left]{M\_CALIBRATED }
% node [anchor=west,left]{\& NOT\_CAL} (CALIBRATE-MASTER)
edge [above] node [anchor=south,above,text width=4.4cm]
{
M\_CALIBRATED \\
\& NOT\_CAL
} (CALIBRATE-SLAVE)
% edge [bend right=20] node {M\_CALIBRATE \& IS\_CAL} (CALIBRATE-SLAVE)
edge [loop right] node [anchor=north,above]{retry $n_{locked,s}$ } (LOCKED)
edge [bend right=25] node[anchor=south,above,text width=3.5cm]
{
M\_CALIBRATED \\
\& IS\_CAL
}(CALIBRATE-COMPLETED)
% edge [bend right=20] node [anchor=south,below] {M\_CALIBRATED }
% node [anchor=left,below]{\& }
% node [anchor=south,below]{IS\_CAL} (CALIBRATE-COMPLETED)
(CALIBRATE-MASTER) edge [below] node[anchor=north,below,text width=4.4cm]
{
NOT\_CAL \& \\
M\_CALIBRATED
}(CALIBRATE-SLAVE)
% node {M\_CALIBRATED \& NOT\_CAL} (CALIBRATE-SLAVE)
edge [loop below] node {retry $n_{calib\_m,s}$ } (CALIBRATE-MASTER)
edge [bend left=25] node[anchor=south,below,text width=3.5cm]
{
IS\_CAL \\
\& M\_CALIBRATED
}(CALIBRATE-COMPLETED)
% edge [bend left=40] node {M\_CALIBRATED \& IS\_CAL} (CALIBRATE-COMPLETED)
(CALIBRATE-SLAVE) edge [above] node {IS\_CAL} (CALIBRATE-COMPLETED)
edge [loop right] node [anchor=north,above]{$n_{calib\_s,s}$} (CALIBRATE-SLAVE)
(CALIBRATE-COMPLETED) edge [above] node { } (IDLE)
% edge [loop below] node {retry $n_{cal\_cmp,s}$ } (IDLE)
(ANY) edge [above] node {ANY\_TIMEOUT} (IDLE);
\end{tikzpicture}
\caption{White Rabbit Slave FSM.}
\label{fig:wrSlaveFSM}
\end{figure}
\newpage
\begin{thebibliography}{9}
......
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