Commit 3cc54d71 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

WR Training: Lab1 slides

parent 86785d76
all : lab1.pdf
.PHONY : all clean
lab1.pdf : lab1.tex
pdflatex $^
pdflatex $^
clean :
rm -f *.eps *.pdf *.dat *.log *.out *.aux *.dvi *.ps *.nav *.snm *.toc *.vrb
\documentclass[compress, red]{beamer}
\mode<presentation>
\usepackage{etex}
\setbeamertemplate{navigation symbols}{}
%\usepackage{pgfpages}
%\usepackage{listings}
\usetheme{Warsaw}
% define your own colors:
\definecolor{Red}{rgb}{1,0,0}
\definecolor{Blue}{rgb}{0,0,1}
\definecolor{Green}{rgb}{0,1,0}
\definecolor{magenta}{rgb}{1,0,.6}
\definecolor{lightblue}{rgb}{0,.5,1}
\definecolor{lightpurple}{rgb}{.6,.4,1}
\definecolor{gold}{rgb}{.6,.5,0}
\definecolor{orange}{rgb}{1,0.4,0}
\definecolor{hotpink}{rgb}{1,0,0.5}
\definecolor{newcolor2}{rgb}{.5,.3,.5}
\definecolor{newcolor}{rgb}{0,.3,1}
\definecolor{newcolor3}{rgb}{1,0,.35}
\definecolor{darkgreen1}{rgb}{0, .35, 0}
\definecolor{darkgreen}{rgb}{0, .6, 0}
\definecolor{darkred}{rgb}{.75,0,0}
\xdefinecolor{olive}{cmyk}{0.64,0,0.95,0.4}
\xdefinecolor{purpleish}{cmyk}{0.75,0.75,0,0}
\useoutertheme[subsection=false]{smoothbars}
% include packages
\usepackage{subfigure}
\usepackage{multicol}
\usepackage{amsmath}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage[all]{xy}
%\xyoption{arc}
\usepackage{url}
\usepackage{multimedia}
\usepackage{hyperref}
\usepackage{helvet}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{changepage}
\usepackage{textcomp}
\newcommand{\backupbegin}{
\newcounter{framenumberappendix}
\setcounter{framenumberappendix}{\value{framenumber}}
}
\newcommand{\backupend}{
\addtocounter{framenumberappendix}{-\value{framenumber}}
\addtocounter{framenumber}{\value{framenumberappendix}}
}
\graphicspath{ {../../../figures/} }
\usepackage[font=small,skip=0pt]{caption}
\captionsetup{labelformat=empty,labelsep=none}
%\setlength{\abovecaptionskip}{5pt plus 3pt minus 2pt}
\AtBeginSection[]
{
\begin{frame}<beamer>{Outline}
\tableofcontents[currentsection]
\end{frame}
}
\begin{document}
\title{White Rabbit Training}
\subtitle{Lab 1}
\author[G.Daniluk]{Greg Daniluk}
\institute[]{CERN BE-CO-HT}
\date{October 4, 2016}
%\makebeamertitle
\begin{frame}
\titlepage
\end{frame}
\begin{frame}<beamer>{Outline}
\tableofcontents
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{WR Devices}
\subsection{}
\begin{frame}{WR network}
\begin{center}
\includegraphics[height=.8\textheight]{network/wr_network-enhanced_pro.pdf}
\end{center}
\end{frame}
\begin{frame}[t,fragile]{WR Switch}
\begin{center}
\includegraphics[width=\textwidth]{switch/wrSwitch_v3_3.jpg}
\begin{itemize}
\item Central element of WR network
\item 18 port gigabit Ethernet switch with WR features
\item Optical transceivers: up to 10km, single-mode fiber
\item Fully open design, commercially available
\end{itemize}
\end{center}
\end{frame}
\begin{frame}{WR Switch operation modes}
\begin{itemize}
\item {\bf Freerunning Master}: source of time for WR network
\item {\bf GrandMaster}: source of time for WR network, synchronized to
external reference
\item {\bf BoundaryClock}: synchronizes to WR Master and provides
synchronization to other WR Slaves
\end{itemize}
\end{frame}
\begin{frame}{WR Switch - inside}
\begin{center}
\includegraphics[width=.8\textwidth]{switch/switch_simple_diagram_h.pdf}
\end{center}
\end{frame}
\begin{frame}{WR network}
\begin{center}
\includegraphics[height=.8\textheight]{network/wr_network-enhanced_pro.pdf}
\end{center}
\end{frame}
\begin{frame}{WR Node: FMC carriers and mezzanines}
\begin{center}
\includegraphics[width=7cm]{node/spec.jpg}
\end{center}
\begin{columns}[c]
\column{.01\textwidth}
\column{.98\textwidth}
\begin{block}{FMC-based Hardware Kit}
\begin{itemize}
\item Carrier boards in PCI-Express, VME, PXIe
\item All carrier cards are equipped with a White Rabbit port.
\item Mezzanines can use the accurate clock signal and ``TAI''
\\ (synchronous sampling clock, trigger time tag, ...).
\item White Rabbit PTP Core running in the FPGA
\end{itemize}
\end{block}
\column{.01\textwidth}
\end{columns}
\end{frame}
\begin{frame}{White Rabbit PTP Core}
\begin{itemize}
\item HDL IP-Core running on both Xilinx and Altera FPGAs
\item Ethernet MAC implementation
\item Implements White Rabbit protocol for precise timing
\item Provides user shell over UART for configuration
\item SNMP for configuration and monitoring in next stable release
\end{itemize}
\end{frame}
\begin{frame}{WRPC operation modes}
\begin{itemize}
\item {\bf Master}: propagates WR time
\item {\bf GrandMaster}: WR Master externally disciplined
\item {\bf Slave}: synchronizes to another WR Master
\end{itemize}
\end{frame}
\begin{frame}{WRPC interfaces}
\begin{columns}
\column{.6\textwidth}
\begin{itemize}
\item clocks, oscillators control and reset
\item PHY (SerDes) interface
\item timecode and 1-PPS output
\item frame interface (WR Fabric)
\end{itemize}
\column{.4\textwidth}
\begin{center}
\includegraphics[width=1.1\textwidth]{node/wrpc_overview.pdf}
\end{center}
\end{columns}
\end{frame}
\begin{frame}{WRPC interfaces}
\begin{columns}
\column{.6\textwidth}
\begin{itemize}
\item \emph{UART}: WRPC shell
\item \emph{SPI}: external Flash
\item $I^2C$: SFP identification
\item \emph{1-Wire}: digital thermometer
\item \emph{GPIO}: LEDs, SFP detection
\end{itemize}
\column{.4\textwidth}
\begin{center}
\includegraphics[width=1.1\textwidth]{node/wrpc_overview.pdf}
\end{center}
\end{columns}
\end{frame}
\begin{frame}{WRPC in FPGA design}
\begin{center}
\includegraphics[width=\textwidth]{node/wrpc_basic_top.pdf}
\end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\section{Exercise 1}
%\subsection{}
%
%\begin{frame}{Exercise 1}
% WRPC synthesis
%\end{frame}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Running WRPC}
\subsection{}
\begin{frame}{Few steps to run the WR PTP Core}
\begin{itemize}
\item <1-> develop your own FPGA firmware with WRPC
\item <2-> ...or download demo FPGA firmware from OHWR
\item <3-> program SPEC board with the FPGA firmware
\item <4-> configure the WRPC through UART
\item <5-> verify the synchronization quality
\end{itemize}
\end{frame}
\begin{frame}{Download demo FPGA firmware from OHWR}
\begin{itemize}
\item check our wiki page for the latest stable release:\\
\url{www.ohwr.org/projects/wr-cores/wiki/Current_release}
\item FPGA binary already downloaded for you
\item can be found in \texttt{/lib/firmware/fmc/spec-3.0.bin}
\end{itemize}
\end{frame}
\begin{frame}{program SPEC board with the FPGA firmware}
\begin{itemize}
\item use Linux drivers and user tools package for SPEC board
\item available in the \emph{git} repositry:\\
\texttt{git://ohwr.org/fmc-projects/spec/spec-sw.git}
\pause
\item already downloaded in \texttt{\string~/spec-sw}
\item to build drivers and tools:\\\texttt{cd \string~/spec-sw}\\ \texttt{make clean;
make}
\end{itemize}
\end{frame}
\begin{frame}{Loading kernel drivers for SPEC board}
\begin{itemize}
\item \texttt{sudo insmod fmc-bus/kernel/fmc.ko}
\item \texttt{sudo insmod kernel/spec.ko}
\item \texttt{sudo insmod fmc-bus/kernel/fmc-trivial.ko
gateware=fmc/spec-3.0.bin}
\end{itemize}
\begin{itemize}
\item <2-> At this point you have the card programmed.
\item <3-> To connect to the WRPC shell:\\
\texttt{picocom -b 115200 /dev/ttyUSB0}
\end{itemize}
\end{frame}
%\begin{frame}{SDBFS filesystem image for Flash}
% \begin{itemize}
% \item used to store configuration of the WRPC
% \begin{itemize}
% \item <2-> MAC address
% \item <3-> init script
% \item <4-> SFP database with calibration values
% \end{itemize}
% \item <5-> empty filesystem structure has to be written to Flash
% \end{itemize}
%\end{frame}
\begin{frame}{WRPC user shell}
Some most important commands:
\begin{itemize}
\item \texttt{mode $<$slave/master/gm$>$} - sets the timing mode
\item \texttt{ptp $<$start/stop$>$} - starts/stops the synchronization
\item \texttt{gui} - shows the synchronization status
\item \texttt{stat} - same as \texttt{gui} but in a parsing-friendly format
\end{itemize}
\begin{block}{}
Full list available in the WRPC manual.
\end{block}
\end{frame}
\begin{frame}{Init script}
\begin{block}{}
Set of shell commands executed on every power-up
\end{block}
\pause
\begin{itemize}
\item \texttt{init erase} - erases all commands in the init script
\item \texttt{init add $<$command$>$} - adds a new command
\item \texttt{init show} - shows current content of the script
\item \texttt{init boot} - executes the script
\end{itemize}
\end{frame}
\begin{frame}{Exercise 1}
Type your own init script and verify the synchronization quality.
\pause
\begin{itemize}
\item \texttt{init erase}
\item \texttt{init add ptp stop}
\item \texttt{init add mode slave}
\item \texttt{init add ptp start}
\item \texttt{init show}
\end{itemize}
\end{frame}
\begin{frame}{Link delay model}
\begin{center}
\includegraphics[width=0.9\textwidth]{calibration/link-model.pdf}
\end{center}
\begin{itemize}
\item static hardware delays: $\Delta_{TXM}$, $\Delta_{RXM}$, $\Delta_{TXS}$, $\Delta_{RXS}$
\item semi-static hardware delays: $\epsilon_M$, $\epsilon_S$
\item fiber asymmetry coefficient: $\alpha = \frac{\delta_{MS} - \delta_{SM}}{\delta_{SM}}$
\end{itemize}
\pause
\begin{block}{}
\begin{itemize}
\item default calibration parameters:
\url{www.ohwr.org/projects/white-rabbit/wiki/Calibration}
\item calibration procedure to find best $\Delta_{TXM}$, $\Delta_{RXM}$,
$\Delta_{TXS}$, $\Delta_{RXS}$ and $\alpha$ for your setup.
\end{itemize}
\end{block}
\end{frame}
\begin{frame}{Entering calibration values}
\begin{block}{}
Calibration values: $\Delta_{TX}$, $\Delta_{RX}$, $\alpha$ associated with
SFP transceiver - we call it SFP database
\end{block}
\pause
\begin{itemize}
\item \texttt{sfp erase} - erases all entries in the SFP database
\item \texttt{sfp add $<$part number$>$ $<\Delta_{TX}>$ $<\Delta_{RX}>$
$<\alpha>$} - adds a new entry to the SFP database
\item \texttt{sfp show} - shows all stored entries
\item \texttt{sfp detect} - reads the part number of currently used SFP
\item \texttt{sfp match} - loads calibration values from the SFP database
for currently used transceiver
\end{itemize}
\end{frame}
\begin{frame}{Exercise 2}
1. Enter calibration values to improve the synchronization quality.
\pause
\begin{itemize}
\item \texttt{sfp erase}
\item \texttt{sfp add AXGE-1254-0531 180625 148451 72169888}
\item \texttt{sfp add AXGE-3454-0531 180625 148451 -73685416}
\item \texttt{sfp show}
\end{itemize}
\end{frame}
\begin{frame}{Exercise 2}
2. Improve init script to automatically load calibration values.
\pause
\begin{itemize}
\item \texttt{init erase}
\item \texttt{init add ptp stop}
\item {\color{red} \texttt{init add sfp detect}}
\item {\color{red} \texttt{init add sfp match}}
\item \texttt{init add mode slave}
\item \texttt{init add ptp start}
\end{itemize}
\end{frame}
\begin{frame}{Exercise 2}
3. Re-program the SPEC board to make sure everything is set properly.
\pause
\begin{itemize}
\item open a new terminal
\item \texttt{cd \string~/spec-sw}
\item \texttt{sudo rmmod fmc-trivial}
\pause
\item \texttt{sudo insmod fmc-bus/kernel/fmc-trivial.ko
gateware=fmc/spec-3.0.bin}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{WR Switch diagnostics}
\subsection{}
\begin{frame}{WR Switch monitoring and configuration}
\begin{itemize}
\item Monitoring
\begin{itemize}
\item SNMP
\item Syslog
\end{itemize}
\item Configuration
\begin{itemize}
\item local configuration file
\item fetching configuration on boot time (HTTP / TFTP / FTP)
\item web-interface
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}{WR Switch SNMP}
\begin{center}
\includegraphics<1>[width=.6\textwidth]{switch/snmp_expert_obj.pdf}
\end{center}
\end{frame}
\begin{frame}{Exercise 3}
Let's create some errors on the switch.
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{}
\begin{frame}{Need more information?}
\begin{itemize}
\item WR PTP Core project page:\\
\url{www.ohwr.org/projects/wr-cores/wiki/Wrpc_core}
\item WR Switch project page:\\
\url{www.ohwr.org/projects/white-rabbit/wiki/Switch}
\end{itemize}
\end{frame}
\begin{frame}{Backup}
\end{frame}
\begin{frame}{WRPC: Clocks and reset}
\begin{columns}
\column{.5\textwidth}
\begin{itemize}
\item system clock (62.5 MHz)
\item reference clock (125 MHz)
\item DMTD clock ($\sim$62.5 MHz)
\item disciplines two VCXOs
\item optional external clock\\(10 MHz) input
\end{itemize}
\column{.6\textwidth}
%\begin{left}
\includegraphics[width=\textwidth]{node/wrpc_clkif.pdf}
%\end{left}
\end{columns}
\end{frame}
\begin{frame}{WRPC: PHY (SerDes) interface}
\begin{columns}
\column{.5\textwidth}
\begin{itemize}
\item has to be used with PHY component from WR repositories
\item transmission and reception paths
\item fed with 125 MHz reference clock
\end{itemize}
\column{.6\textwidth}
%\begin{left}
\includegraphics[width=\textwidth]{node/wrpc_phyif.pdf}
%\end{left}
\end{columns}
\end{frame}
\begin{frame}{WRPC: Timecode and 1-PPS interface}
\begin{columns}
\column{.5\textwidth}
\begin{itemize}
\item link up/down indicator
\item time valid indicator
\item WR time
\begin{itemize}
\item seconds
\item fractional part of second\\ (in 8ns cycles)
\end{itemize}
\item 1 pulse-per-second output
\end{itemize}
\column{.6\textwidth}
%\begin{left}
\includegraphics[width=.45\textwidth]{node/wrpc_tmif.pdf}
%\end{left}
\end{columns}
\end{frame}
\begin{frame}{WRPC: Miscellaneous interfaces}
\begin{columns}
\column{.5\textwidth}
\begin{itemize}
\item \emph{UART}: WRPC shell
\item \emph{SPI}: external Flash
\item $I^2C$: SFP identification
\item \emph{1-Wire}: digital thermometer
\item \emph{GPIO}: LEDs, SFP detection
\end{itemize}
\column{.6\textwidth}
\includegraphics[width=\textwidth]{node/wrpc_miscif.pdf}
\end{columns}
\end{frame}
\begin{frame}{WRPC: Fabric interface}
\begin{columns}
\column{.5\textwidth}
\begin{itemize}
\item for sending/receiving user-defined Ethernet frames
\item two separate pipelined Wishbone buses
\item \emph{WRF Source} = WB Master
\item \emph{WRF Sink} = WB Slave
\end{itemize}
\column{.6\textwidth}
\includegraphics[width=\textwidth]{node/wrpc_fabricif.pdf}
\end{columns}
\end{frame}
\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