Commit 75ef4b10 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

doc: adding release test procedure for WRPC

parent b2588dc4
all : wrpc-rel-tests.pdf
.PHONY : all clean
wrpc-rel-tests.pdf : wrpc-rel-tests.tex
pdflatex -dPDFSETTINGS=/prepress -dSubsetFonts=true -dEmbedAllFonts=true -dMaxSubsetPct=100 -dCompatibilityLevel=1.4 $^
pdflatex -dPDFSETTINGS=/prepress -dSubsetFonts=true -dEmbedAllFonts=true -dMaxSubsetPct=100 -dCompatibilityLevel=1.4 $^
clean :
rm -f *.eps *.pdf *.dat *.log *.out *.aux *.dvi *.ps *.toc
%Introduction
\section{Introduction}
This document describes a set of acceptance tests for White Rabbit PTP Core (\emph{WRPC}). Developers of the core have to make sure, all of them are passed before each new stable release is announced. Users of the \emph{WRPC} can also use the document as an example of test scenarios for their projects combining WR PTP Core with other modules.
\vspace{-0.5cm}
\section{Requirements}
Hardware required to perform the release tests:
\begin{packed_item}
\item 2x Simple PCIe FMC Carrier (SPEC) with FMC DIO 5-channel module
\item 1x WR Switch
\item 1x 2-channel oscilloscope (200 MHz, 2 GS/s)
\item 1x non-WR PTP (IEEE1588-2008) Switch
\end{packed_item}
\section{Acceptance tests}
\begin{enumerate}[label*=\arabic*.]
\item Verify with Xilinx ISE that all timing constraints for Release Candidate gateware synthesis are met.
\item Compile \emph{wrpc-sw} trying different Kconfig settings and make sure the compilation succeeds without warnings and errors (\emph{make -s}):
\begin{enumerate}[label*=\arabic*]
\item compile with Etherbone support disabled
\item compile with Etherbone support enabled
\end{enumerate}
\item Compile \emph{wrpc-sw} with default SPEC configuration (PPSI engine selected) for further tests.
\item Calibrate Release Candidate gateware to WR Switch
\item Create a basic WRPC init script:
\lstset{frame=single, captionpos=b, caption=, basicstyle=\scriptsize, backgroundcolor=\color{light-gray}, label=lst:init_src}
\begin{lstlisting}
wrc# init erase
wrc# init add ptp stop
wrc# init add sfp detect
wrc# init add sfp match
wrc# init add mode master
wrc# init add calibration
wrc# init add ptp start
\end{lstlisting}
Execute it on SPEC using \emph{init boot} shell command and verify if the output doesn't contain any information about errors. Example of correct output:
\lstset{frame=single, captionpos=b, caption=, basicstyle=\scriptsize, backgroundcolor=\color{light-gray}, label=lst:init_src}
\begin{lstlisting}
wrc# init boot
executing: ptp stop
executing: sfp detect
AXGE-3454-0531
executing: sfp match
SFP matched, dTx=180456, dRx=148066, alpha=-73685416
executing: mode master
Locking PLL...
executing: calibration
Found phase transition in EEPROM: 6850ps
executing: ptp start
\end{lstlisting}
\item Set WRPC mode to Grand Master (\emph{mode gm}) and try setting current time manually using \emph{time set}, \emph{time setsec}, \emph{time setnsec} commands. Check if those commands work independently e.g. if \emph{time setsec} does not reset the nanoseconds counter. You can check that by observing on the oscilloscope the offset between 1-PPS from the WRPC and from an external time source to which the WRPC is synchronized.
\item \label{item:4} Set WRPC to Master mode (\emph{mode master}) and connect it to the Slave port of a WR Switch, connect another SPEC running the WRPC in Slave mode to one of the Master ports of the WR Switch. Don't forget to run automated t24p calibration on both SPECs (for that you must set Master WRPC to Slave state for a moment and let it calibrate):
\begin{enumerate}[label*=\arabic*]
\item check if 1-PPS signals from 2 SPECs are in sync with the 1-PPS of WR Switch
\item check if SPEC produces stable 1-PPS (use oscilloscope with persistent mode turned on)
\item run \emph{stat cont} and \emph{gui} commands for few minutes and check if they don't they disturb timing by measuring 1-PPS offset/jitter on the oscilloscope
\item collect logs from \emph{stat cont} WRPC Shell command to the file and use \emph{wr\_graph.py} script to analyze them:
\begin{enumerate}[label=(\alph*)]
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
\item check if \emph{lock} is always 1
\item check, once WR link is established in Slave mode, if the WR servo is always in \emph{TRACK\_PHASE} state
\item check if \emph{sec} counts up monotonically
\item check if \emph{mu} changes without any sudden few-ns jumps
\item check if \emph{cko} is always in a range -50ps; +50ps
\end{enumerate}
Expected output from \emph{wr\_graph.py} if all tests are passed:
\lstset{frame=single, captionpos=b, caption=, basicstyle=\scriptsize, backgroundcolor=\color{light-gray}, label=lst:init_src}
\begin{lstlisting}
LOCK: Success, always locked
STATE: Success, always TRACK_PHASE
TIME: Success, always growing
RTT: Success, no jumps detected
CKO: Success, no values outside accepted range
\end{lstlisting}
\end{enumerate}
\item Without restarting the PTP deamon, disconnect the Slave SPEC and connect it to another port of the WR Switch:
\begin{enumerate}[label*=\arabic*.]
\item check if the Slave has synchronized to the new WR Switch port
\item check \emph{gui} or \emph{stat [cont]} to verify the servo state is \emph{TRACK\_PHASE} and clock offset is in the range -50ps; +50ps
\end{enumerate}
\item Connect two SPECs together, configure one as WR Slave, second as WR Master
\begin{itemize}
\item perform the same tests as in scenario described in point \ref{item:4}
\end{itemize}
\item Connect two SPECs together, configure one as Slave, second as Grand Master
\begin{itemize}
\item perform the same tests as in scenario described in point \ref{item:4}
\end{itemize}
\item Connect SPEC to a regular Gigabit network card, run \emph{Wireshark} or \emph{tcpdump} to collect frames sent by SPEC:
\begin{enumerate}[label*=\arabic*.]
\item set mode to Grand Master, wait until it's locked and check if the clock class in the captured Announce Message is {\bf 6}
\item check with the oscilloscope if SPEC produces 1-PPS output in Grand Master mode
\item re-lock SPEC to Grand Master mode few times and check if the 1-PPS skew to the external clock (e.g. Cesium) doesn't change on each lock
\item while SPEC is running, disconnect 10MHz input and check if the clock class in captured Announce Message was degraded to {\bf 52}
\item try locking Grand Master (\emph{mode gm}) when 10MHz is not connected, it should fail with \emph{Lock timeout. Command "mode": error -116} error message. Check then if the clock class in the Announce Message is {\bf 52}
\item set mode to Master, check if the clock class in captured Announce Message is {\bf 187}
\item check with the oscilloscope if SPEC produces 1-PPS output in Master mode
\end{enumerate}
\item Connect SPEC to WR Switch and set its mode to Slave, then without restarting the PTP daemon, unplug the fiber and connect SPEC to a non-WR Master (e.g. a regular PTP Switch)
\begin{enumerate}[label*=\arabic*.]
\item check if WR PTP Core switched to non-WR Slave mode
\item connect back to WR-Switch and check if SPEC switched back to WR Slave mode
\end{enumerate}
\end{enumerate}
\section{Tests results}
\begin{multicols}{5}
\begin{tabular}{|p{1cm}|p{0.8cm}|}
\hline {\bf 1.} & \\
\hline {\bf 2.1} & \\
\hline {\bf 2.2} & \\
\hline {\bf 3.} & \\
\hline {\bf 4.} & \\
\hline {\bf 5.} & \\
\hline {\bf 6.} & \\
\hline {\bf 7.1} & \\
\hline {\bf 7.2} & \\
\hline
\end{tabular}
\columnbreak
\begin{tabular}{|p{1cm}|p{0.8cm}|}
\hline {\bf 7.3} & \\
\hline {\bf 7.4.a} & \\
\hline {\bf 7.4.b} & \\
\hline {\bf 7.4.c} & \\
\hline {\bf 7.4.d} & \\
\hline {\bf 7.4.e} & \\
\hline {\bf 8.1} & \\
\hline {\bf 8.2} & \\
\hline
\end{tabular}
\columnbreak
\begin{tabular}{|p{1cm}|p{0.8cm}|}
\hline {\bf 9.1} & \\
\hline {\bf 9.2} & \\
\hline {\bf 9.3} & \\
\hline {\bf 9.4.a} & \\
\hline {\bf 9.4.b} & \\
\hline {\bf 9.4.c} & \\
\hline {\bf 9.4.d} & \\
\hline {\bf 9.4.e} & \\
\hline
\end{tabular}
\columnbreak
\begin{tabular}{|p{1cm}|p{0.8cm}|}
\hline {\bf 10.1} & \\
\hline {\bf 10.2} & \\
\hline {\bf 10.3} & \\
\hline {\bf 10.4.a} & \\
\hline {\bf 10.4.b} & \\
\hline {\bf 10.4.c} & \\
\hline {\bf 10.4.d} & \\
\hline {\bf 10.4.e} & \\
\hline
\end{tabular}
\columnbreak
\begin{tabular}{|p{1cm}|p{0.8cm}|}
\hline {\bf 11.1} & \\
\hline {\bf 11.2} & \\
\hline {\bf 11.3} & \\
\hline {\bf 11.4} & \\
\hline {\bf 11.5} & \\
\hline {\bf 11.6} & \\
\hline {\bf 12.1} & \\
\hline {\bf 12.2} & \\
\hline
\end{tabular}
\end{multicols}
\def\us{\char`\_}
\documentclass[a4paper, 12pt]{article}
%\documentclass{article}
\usepackage{fullpage}
\usepackage{pgf}
\usepackage{tikz}
\usetikzlibrary{arrows,automata,shapes}
\usepackage{multirow}
\usepackage{color}
\usepackage[latin1]{inputenc}
\usepackage{verbatim}
\usepackage{amsmath}
\usepackage{times,mathptmx}
\usepackage{chngcntr}
\usepackage{hyperref}
\usepackage{enumitem}
\usepackage{multicol}
%\usepackage{draftwatermark}
\usepackage{listings}
\definecolor{light-gray}{gray}{0.95}
\usepackage{cancel}
\graphicspath{ {../../../figures/} }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% creating subsubsubsection notation
% src: http://www.latex-community.org/forum/viewtopic.php?f=5&t=791
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{secnumdepth}{6}
\renewcommand\theparagraph{\Alph{paragraph}}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{0.0001pt \@plus .2ex}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{0.0001pt \@plus .2ex}%
{\normalfont\normalsize\bfseries}}
%\renewcommand{\thefootnote}{\fnsymbol{footnote}}
%\renewcommand{\thefootnote}{\alph{footnote}}
\counterwithin{paragraph}{subsubsection}
\counterwithin{subparagraph}{paragraph}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\eqoffset}[1]{%
{\ensuremath{%
{\text{offset}}_{#1}}%
}%
}
\newcommand{\eqdelay}[1]{{\text{delay}}_{#1}}
\newcommand{\eqasymm}{{\text{asymmetry}}}
\newenvironment{packed_item}{
\begin{itemize}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{\end{itemize}}
\newenvironment{packed_enum}{
\begin{enumerate}
\setlength{\itemsep}{1pt}
\setlength{\parskip}{0pt}
\setlength{\parsep}{0pt}
}{\end{enumerate}}
\begin{document}
\title{White Rabbit PTP Core release tests}
\author{Grzegorz Daniluk\\ CERN BE-CO-HT}
%\date{November 2012}
%\maketitle
%\thispagestyle{empty}
\begin{figure}[ht!]
\centering
%\includegraphics[width=0.10\textwidth]{../../../figures/logo/WRlogo.pdf}
\includegraphics[width=0.10\textwidth]{logo/WRlogo.pdf}
\label{fig:wr_logo}
\end{figure}
\begin{center}
{\huge {\bf White Rabbit PTP Core release tests}}\\[0.2 cm]
{\large CERN BE-CO-HT}\\[0.1 cm]
Grzegorz Daniluk, 19 December 2013
\end{center}
\input{tests.tex}
\end{document}
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