Commit ef1f2fb3 authored by Maciej Lipinski's avatar Maciej Lipinski

added figure of FSM and example events flow during WR Link Setup

parent 6306d76a
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.
......@@ -77,13 +77,16 @@
\begin{table}[ht]
%\caption{White Rabbit Specification Revision History Table }
\centering
\begin{tabular}{| c | c | c | p{5cm} |} \hline
\begin{tabular}{| c | c | c | p{6cm} |} \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
0.2 & 7/09/2010 & T.W., M.L. & Added introduction about PTP. \\ \hline
0.3 & 8/09/2010 & J.S., M.L. & Language\&Style-related corrections, plus reference to Peter's paper \\ \hline
0.4 & 14/09/2010 & E.V.D.B, M.L.& 1.~Changed the FSMs of the Slave and the Master into single and linear FSM,\\
& & & 2.~Changed message ID,\\
& & & 3.~Added authors, this rev. table, explanation figures and descriptions.
\\ \hline
\end{tabular}
\label{tab:revHist}
\end{table}
......@@ -103,8 +106,8 @@ node uses a traceable clock to encode data over the physical layer, while the sl
recovers this clock (syntonization) and bases its timekeeping on it. Absolute time
synchronisation between master and slave is achieved by adjusting
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).
The \textit{offset} refers to the clock (e.g. time defined in Coordinated Universal Time standard),
while the \textit{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.
......@@ -127,7 +130,7 @@ 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 grandmaster must be distributed
over the physical layer, resulting in a \textit{cascade} of master
and slave nodes. As a result of this topology, WR network consists of two WR node kinds:
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
......@@ -272,7 +275,7 @@ 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.
The correlation between $\delta_{ms}$ and $\delta_{sm}$ is represented in
this document by Alpha ($\alpha$).
this document by \textit{medium correlation parameter} ($\alpha$).
The rest of this section presents a well-known physical medium correlation.
......@@ -390,7 +393,7 @@ for Gigabit Ethernet over Fiber Optic. WRPTP extends the PTP messages and Data S
\centering
% \vspace{-1.3cm}
\includegraphics[width=0.80\textwidth]{fig/wrptpMSGs.ps}
\caption{Simplified overview of message flow in WRPTP. }
\caption{Simplified overview of a message flow in WRPTP. }
\label{fig:wrptpMSGs}
\end{figure}
......@@ -475,7 +478,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 & \textit{medium correlation 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
......@@ -786,6 +789,7 @@ The WR Master node shall enter the PTP UNCALBRATED state, and start execution of
\paragraph{State Description}
Table~\ref{tab:wrFSMdesc} specifies White Rabbit states used in Figure~\ref{fig:wrFSM}.
\begin{table}[hp!]
\caption{WR state definition}
......@@ -796,7 +800,8 @@ The WR Master node shall enter the PTP UNCALBRATED state, and start execution of
\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
M\_LOCK & Waiting for the WR Slave to finish successfully the locking process. \\ \hline
S\_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,
......@@ -811,7 +816,7 @@ RESP\_CALIB\_REQ & The nodes action in this state depends on the value of the
\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}
\label{tab:wrFSMdesc}
\end{table}
......@@ -821,8 +826,8 @@ WR\_LINK\_ON & The value of \textit{wrMode} is set to TRUE and the \texti
\begin{figure}[ht!]
\centering
% \vspace{-1.3cm}
\includegraphics[width=0.80\textwidth]{fig/WRfsm.ps}
\caption{WR FSM.}
\includegraphics[width=1.00\textwidth]{fig/wrFSM.ps}
\caption{White Rabbit state machine.}
\label{fig:wrFSM}
\end{figure}
......@@ -835,7 +840,7 @@ WR\_LINK\_ON & The value of \textit{wrMode} is set to TRUE and the \texti
\begin{description}
\item[]
\item[Start] Power up.
\item[POWERUP] Turning on power to the device or reset.
\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.
......@@ -853,16 +858,14 @@ WR\_LINK\_ON & The value of \textit{wrMode} is set to TRUE and the \texti
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}.
\item[RETRY $n_{name}$] White Rabbit state machine can be waiting for a transition event on one state only for a limited time (\textit{TIMEOUT})
The states to which this rule applies are the following: \textit{M\_LOCK},
\textit{REQ\_CALIBRATEION}, \textit{CALIBRATED}, \textit{PRESENT}, \textit{S\_LOCK},
\textit{LOCKED}, \textit{RESP\_CALIB\_REQ}. After the \textit{TIMEOUT}, the state is re-entered for \\
$n_{\{M\_LOCK, REQ\_CAL, CALIBed, PRESENT, S\_LOCK, LOCKED, RESP\_CALIB\_RESP\}}$ number of times.
\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}
\newpage
\begin{center}
......@@ -950,78 +953,18 @@ SLAVE & \small The port is synchronizing to the selected master po
\label{tab:wrManagementId}
\end{table}
\newpage
\section{OLD FSM}
\section{Flow of events (no exceptions) during WR Link Setup}
\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}
\centering
% \vspace{-1.3cm}
\includegraphics[width=1.0\textwidth]{fig/wrMSGsExchangeFlow.ps}
\caption{Flow of events (no exceptions) during WR Link Setup.}
\label{fig:wrFSMcommun}
\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