Commit 3b1e9930 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

doc: Amost finished PTS system setup guide

parent c4e9a8ff
......@@ -3,6 +3,7 @@ FILE=setup
all:
$(MAKE) -C fig
pdflatex -synctex=1 -interaction=nonstopmode $(FILE).tex *.tex
bibtex $(FILE).aux
pdflatex -synctex=1 -interaction=nonstopmode $(FILE).tex *.tex
pdflatex -synctex=1 -interaction=nonstopmode $(FILE).tex *.tex
evince $(FILE).pdf &
......
......@@ -9,7 +9,7 @@
\noindent \rule{\textwidth}{.1cm}
\hfill DATE
\hfill January 12, 2015
\vspace*{3cm}
......
@misc{coding-guidelines,
author = "Patrick Loschmidt and Nata{\v s}a Simani\'c and C\'esar Prados and Pablo Alvarez and Javier Serrano",
title = {{Guidelines for VHDL Coding}},
month = 04,
year = 2011,
note = {\url{http://www.ohwr.org/documents/24}}
@misc{board-id,
title = {{Converter board IDs page on OHWR}},
note = {\url{http://www.ohwr.org/projects/conv-common-gw/wiki/Board-id}}
}
......@@ -77,7 +77,7 @@ work, see \\
\hline
\multicolumn{1}{c}{\textbf{Date}} & \multicolumn{1}{c}{\textbf{Version}} & \multicolumn{1}{c}{\textbf{Change}} \\
\hline
DATE & 0.1 & First draft \\
12-01-2015 & 0.1 & First draft \\
\hline
\end{tabular}
}
......@@ -89,9 +89,6 @@ work, see \\
\pdfbookmark[1]{\contentsname}{toc}
\tableofcontents
\listoffigures
\listoftables
%------------------------------------------------------------------------------
% List of abbreviations
%------------------------------------------------------------------------------
......@@ -99,6 +96,8 @@ work, see \\
\section*{List of abbreviations}
\begin{tabular}{l l}
FM & Front Module \\
PTS & Production Test Suite \\
RTM & Rear-Transition Module \\
\end{tabular}
\addcontentsline{toc}{section}{List of abbreviations}
......@@ -201,7 +200,8 @@ the details in the next section to test our system and network was properly inst
%>
\end{verbatim}
\item If the prompt appears as above, the setup is fine. Now we need to disable the telnet ping
that the SysMon does, so it doesn't get in the way of our Python scripts:
that the SysMon does, so it doesn't get in the way of our Python scripts, which use Telnet
to talk to the CONV-TTL-RS485 FPGA:
\begin{verbatim}
%> telnetping 0
%> saveenv
......@@ -215,7 +215,156 @@ the details in the next section to test our system and network was properly inst
%==============================================================================
% SEC: Test environment
%==============================================================================
\pagebreak
\section{Preparing the laptop test environment}
\label{sec:environment}
After Ubuntu has been set up and the ELMA connection tested, we need to set up the
actual test scripts and a way of running them. This entails copying the PTS folder
structure for the CONV-TTL-RS485 PTS to the laptop, copying the shortcuts to the
Desktop so that a user can run them and creating a dedicated Ubuntu user for the
CONV-TTL-RS485 PTS.
Note that there are two ways of obtaining the PTS folder structure:
\begin{itemize}
\item Download the ready-made archive from OHWR
\item Build the test system from the repository
\end{itemize}
We will detail here the simplest of the two, downloading the ready-made archive.
See Appendix~\ref{app:build} for details on the second.
\begin{enumerate}
\item Log in to the \verb=pts= user on the laptop
\item Open up a terminal window, download the PTS folder structure tarball from OHWR
to the home folder of the \verb=pts= user and extract the archive:
\begin{verbatim}
cd ~
wget http://www.ohwr.org/attachments/download/3745/ubuntu.tar.gz
tar xzvf ubuntu.tar.gz
\end{verbatim}
\item Check that all extracted files and folders have write permissions:
\begin{small}
\begin{verbatim}
$ cd ubuntu/t485/
$ ls -l
total 56
drwxrwxr-x 7 tstana tstana 4096 Jan 8 11:45 ./
drwxrwxr-x 3 tstana tstana 4096 Jan 8 11:45 ../
drwxrwxr-x 2 tstana tstana 4096 Jan 8 11:45 boot/
drwxrwxr-x 3 tstana tstana 4096 Jan 8 11:45 config/
lrwxrwxrwx 1 tstana tstana 17 Jan 8 11:45 flashtest.py -> pyts/flashtest.py
-rwxrwxr-x 1 tstana tstana 10933 Jan 8 11:45 jpts*
drwxrwxr-x 2 tstana tstana 4096 Jan 8 11:45 log/
-rwxrwxr-x 1 tstana tstana 2949 Jan 8 11:45 one*
-rwxrwxr-x 1 tstana tstana 9906 Jan 8 11:45 pts*
drwxrwxr-x 2 tstana tstana 4096 Jan 8 11:45 pyts/
drwxrwxr-x 2 tstana tstana 4096 Jan 8 11:45 shell/
lrwxrwxrwx 1 tstana tstana 20 Jan 8 11:45 test01.py -> pyts/dac_vcxo_pll.py
lrwxrwxrwx 1 tstana tstana 12 Jan 8 11:45 test02.py -> pyts/leds.py
lrwxrwxrwx 1 tstana tstana 24 Jan 8 11:45 test03.py -> pyts/ttl_pulse_switch.py
lrwxrwxrwx 1 tstana tstana 23 Jan 8 11:45 test04.py -> pyts/rs485_pulse_rtm.py
lrwxrwxrwx 1 tstana tstana 16 Jan 8 11:45 test05.py -> pyts/therm_id.py
lrwxrwxrwx 1 tstana tstana 18 Jan 8 11:45 test06.py -> pyts/sfp_eeprom.py
lrwxrwxrwx 1 tstana tstana 16 Jan 8 11:45 test07.py -> pyts/sfp_test.py
\end{verbatim}
\end{small}
\item If they do not have write permissions, as in the case above, make sure they do:
\begin{verbatim}
chmod a+w *
\end{verbatim}
\item Now we that have the test scripts on the system we can create a dedicated
user that will be used to run the PTS for the CONV-TTL-RS485. Open up Ubuntu's
\textbf{User Accounts} window (click the \verb=pts= user account name at the top
left of the screen), unlock this window by providing the \verb=pts= user account's
password (\verb=pts-user=) and create a new user with the following settings:
\begin{itemize}
\item \textbf{Account Type:} Standard
\item \textbf{Full name:} conv-ttl-rs485
\item \textbf{Username:} conv-ttl-rs485
\end{itemize}
\item While still in the \textbf{User Accounts} window, click the new
\verb=conv-ttl-rs485= user account
\item Under \textbf{Login options}, click the \textbf{Password} dialog which should
at this moment be set to \textit{Account disabled}
\item In the dialog that opens up, set the following parameters:
\begin{itemize}
\item \textbf{Action: } Set a password now
\item \textbf{New password: } pts-user
\end{itemize}
\item Log in to the new \verb=conv-ttl-rs485= user account
\item Open up a terminal window here, and copy
the desktop shortcuts from the extracted PTS tarball to this user's desktop:
\begin{verbatim}
cd ~/Desktop/
cp /home/pts/ubuntu/t485/config/*.desktop .
\end{verbatim}
\item You should now have a working PTS test system. Navigate to the desktop and
try to run the new \textbf{Run CONV-TTL-RS485 PTS} executable here. Plug in a card
to see if the PTS system communicates to it (no need to set up daisy-chains or anything
for this test, you can do that later).
\end{enumerate}
%==============================================================================
\pagebreak
\begin{appendices}
%==============================================================================
\section{Building the test system from the repository}
\label{app:build}
The CONV-TTL-RS485 test system is devised to be built using a simple \verb=make=
command. The system contains a Makefile which, based on a few PTS-specific options,
builds up a folder structure for the PTS as the designer wants it. The \verb=make=
options for the PTS are:
\begin{itemize}
\item \textbf{BOARD} -- in the case of converter boards, it is the board ID~\cite{board-id}; this
option also specifies what is the starting string of the PTS log files (in the
case of CONV-TTL-RS485: \verb=t485-*.log=, \verb=t485-*.inf= )
\item \textbf{ELMAIP} -- the IP or hostname of the ELMA crate the PTS is built for
\item \textbf{ELMAPWD} -- the password for the admin account of the ELMA crate
the PTS is built for
\item \textbf{ELMASLOT} -- the slot number where the CONT-TTL-RS485 card is placed during testing
\end{itemize}
As an example, the PTS folder structure for the CONV-TTL-RS485 was built using the following
command:
\begin{verbatim}
make ELMAIP=elma ELMAPWD=ADMIN ELMASLOT=5
\end{verbatim}
This built a system that communicates with the ELMA crate with the hostname \verb=elma= that
has the RS485 pulse repeaters placed in slot 5 when the PTS is run.
In order to build a test system from scratch, follow these steps:
\begin{enumerate}
\item Clone the repository for the CONV-TTL-RS485 (\verb=git= is needed for this):
\begin{small}
\begin{verbatim}
git clone git://ohwr.org/level-conversion/conv-ttl-rs485/conv-ttl-rs485-tst.git
\end{verbatim}
\end{small}
\item Run \verb=make= in the \verb=pts-fm/= folder, setting the options as appropriate
in your case:
\begin{verbatim}
cd conv-ttl-rs485-tst/pts-fm/
make # ... set options here ...
\end{verbatim}
\end{enumerate}
This will generate an archive similar to that downloaded in Section~\ref{sec:environment},
that should be copied to the test system as described in Section~\ref{sec:environment}.
%==============================================================================
\end{appendices}
%==============================================================================
\pagebreak
\bibliographystyle{ieeetr}
\bibliography{setup}
\addcontentsline{toc}{section}{References}
\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