Commit 11bb7282 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

doc: Updated gateware test procedure to v0.2

parent 8c76fa81
......@@ -9,7 +9,7 @@
\noindent \rule{\textwidth}{.1cm}
\hfill December 16, 2014
\hfill January 27, 2015
\vspace*{3cm}
......
......@@ -73,6 +73,7 @@ work, see \\
\multicolumn{1}{c}{\textbf{Date}} & \multicolumn{1}{c}{\textbf{Version}} & \multicolumn{1}{c}{\textbf{Change}} \\
\hline
16-12-2014 & 0.1 & First draft \\
27-01-2015 & 0.2 & Added steps for testing remote reprogramming \\
\hline
\end{tabular}
}
......@@ -107,6 +108,7 @@ a new gateware version. The following features are tested:
\item TTL to TTL-BAR (basic pulse inversion)
\end{itemize}
\item no pulses generated on power-on
\item remote reprogramming
\end{itemize}
%==============================================================================
......@@ -224,7 +226,6 @@ on the external channel.
\item Connect \textbf{1x short LEMO 0S cable} to the \textbf{0S side of the adapter}
\item This cable will be used to display the RS-485 signal on the oscilloscope
\item \textbf{Turn on the ELMA crate}
\item Download gateware version to be tested to the on-board flash
\end{itemize}
%==============================================================================
......@@ -268,10 +269,53 @@ It is recommended to go through each of the following subsections in sequence
and follow the steps one by one, ticking on completion. If any error
appears, check your gateware and restart the procedure.
%==============================================================================
\subsection{Preparing the bitstream to the flash}
\label{sec:proc-bstream-download}
%==============================================================================
\begin{enumerate}
\item Navigate to the gateware releases page and download the binary bundle
(golden+release) for the latest release:
\begin{itemize}
\item \small \url{http://www.ohwr.org/projects/conv-ttl-rs485-gw/wiki/Releases}
\end{itemize}
\item Program the bundle to the flash. The steps below show how to download the
\textit{.bin} binary bundle via \verb=xc3sprog=, by downloading a bistream
providing a JTAG-to-SPI bridge, for programming the SPI flash:
\begin{small}
\begin{verbatim}
wget http://www.ohwr.org/attachments/download/3710/flash_load.bit
xc3sprog -c xpc flash_load.bit
xc3sprog -c xpc -I golden-v0.*.bin:W:0:bin
\end{verbatim}
\end{small}
\item Once this is done, we can now download the new release file (named here
\verb=conv_ttl_rs485.bin=) to the flash. Note that this bitstream needs to be downloaded
to address \verb=0x170000=. Using \verb=xc3sprog=:
\begin{small}
\begin{verbatim}
xc3sprog -c xpc flash_load.bit
xc3sprog -c xpc -I conv_ttl_rs485.bin:W:1507328:bin
\end{verbatim}
\end{small}
\item The on-board flash should now contain the following memory map, we are ready for testing:
\begin{itemize}
\item \verb=0x000000= -- Header bitstream to jump to release bitstream
\item \verb=0x000044= -- Golden bitstream for fallback on error
\item \verb=0x170000= -- New release bitstream to be tested
\end{itemize}
\end{enumerate}
%==============================================================================
\subsection{TTL to RS485 pulse conversion}
\label{sec:proc-ttl-rs485}
%==============================================================================
\begin{figure}[h]
\centerline{\includegraphics[width=.8\textwidth]{fig/switches}}
\caption{\label{fig:switches} \textbf{On-board switches}}
\end{figure}
\begin{enumerate}
\item Make sure the \textbf{TTL switch} (Figure~\ref{fig:switches}) of the CONV-TTL-RS485 is in the \textbf{TTL position (on)}
\item Make sure the \textbf{glitch filter switch} (Figure~\ref{fig:switches}) is in the \textbf{OFF} position
......@@ -325,11 +369,6 @@ appears, check your gateware and restart the procedure.
\item Change the \textbf{glitch filter switch} (Figure~\ref{fig:switches}) back to the \textbf{OFF position}
\end{enumerate}
\begin{figure}[h]
\centerline{\includegraphics[width=.8\textwidth]{fig/switches}}
\caption{\label{fig:switches} \textbf{On-board switches}}
\end{figure}
\begin{figure}
\centerline{\includegraphics[width=.8\textwidth]{fig/ttl-rs485.png}}
\caption{TTL to RS485 conversion waveforms}
......@@ -341,12 +380,6 @@ appears, check your gateware and restart the procedure.
\subsection{TTL-BAR to RS485 pulse conversion}
\label{sec:proc-ttlbar-rs485}
%==============================================================================
\begin{figure}[h]
\centerline{\includegraphics[width=.8\textwidth]{fig/ttlbar-rs485.png}}
\caption{TTL-BAR to RS485 conversion waveforms}
\label{fig:ttlbar-rs485}
\end{figure}
\begin{enumerate}
\item Make sure the \textbf{TTL switch} (Figure~\ref{fig:switches}) of the CONV-TTL-RS485 is in the \textbf{TTL-BAR position (off)}
\item Make sure the \textbf{glitch filter switch} (Figure~\ref{fig:switches}) is in the \textbf{OFF} position
......@@ -383,6 +416,7 @@ appears, check your gateware and restart the procedure.
ticking the \textbf{TTL} and \textbf{RS485} columns on the \textbf{Rear panel} side of the
table in Appendix~\ref{app:pulse-validation-ttlbar}
\end{enumerate}
\pagebreak
\item \label{item:ttlbar-proc-end} Test the \textbf{remaining rear panel channel 6 input} by this procedure:
\begin{enumerate}
\item Using a \textbf{LEMO 00 cable}, connect \textbf{INV-TTL channel A OUT} to \textbf{TTL channel 1 IN}
......@@ -400,7 +434,14 @@ appears, check your gateware and restart the procedure.
\item Change the \textbf{glitch filter switch} (Figure~\ref{fig:switches}) back to the \textbf{OFF position}
\end{enumerate}
\begin{figure}
\centerline{\includegraphics[width=.8\textwidth]{fig/ttlbar-rs485.png}}
\caption{TTL-BAR to RS485 conversion waveforms}
\label{fig:ttlbar-rs485}
\end{figure}
%==============================================================================
\pagebreak
\subsection{Power-on tests (TTL-BAR)}
\label{sec:proc-power-on-ttlbar}
%==============================================================================
......@@ -502,6 +543,85 @@ appears, check your gateware and restart the procedure.
\item Flip the \textbf{glitch filter switch} (Figure~\ref{fig:switches}) back to the \textbf{OFF position}
\end{enumerate}
%==============================================================================
\pagebreak
\subsection{Remote reprogramming test}
\label{sec:proc-multiboot}
%==============================================================================
We will now use the remote reprogramming logic to download a bitstream
to the flash and test that it works. For this, we will download the
binary file for remote reprogramming for the latest release version of the release
gateware and test that it has been correctly programmed to the flash.
\begin{enumerate}
\item Turn on power to the ELMA crate.
\item First, check using the \verb=getsr.py= script that the bitstream version
is the one which you are testing. For example, say you are testing bistream version 1.1:
\begin{verbatim}
$ cd software/diag/
$ ./getsr.py
[...]
Status register : 0x00118011
===============================
Gateware version : v1.1 (0x11)
[...]
\end{verbatim}
\item Change directories to the \verb=multiboot= folder and download the binary file
for remote reprogramming for the latest release on OHWR to a new \verb=bin/= sub-directory.
For example, downloading gateware v3.0 would run like this:
\begin{verbatim}
cd ../multiboot/
mkdir bin
wget http://cern.ch/go/V76d -O bin/conv_ttl_rs485-v1.0.bin
\end{verbatim}
\item Run the \verb=multiboot.py= script to download the bitstream to the flash
and issue the reprogramming command at the end (note that downloading will take
a long time):
\begin{verbatim}
$ ./multiboot.py
Successfully connected to some-elma
SysMon firmware v2.31
Slot no.: 1
CONV-TTL-RS485 found in slot 1
Read config reg? (y/n) n
Read from flash? (y/n) n
Write to flash? (y/n) y
Are you sure? (y/n) y
Which gateware would you like to program?
0 -> conv_ttl_rs485-v1.0.bin
Enter your choice : 0
Selected gateware: conv_ttl_rs485-v1.0.bin
Is this okay? (y/n) y
Issue IPROG? (y/n) y
MultiBoot bitstream address: 0x170000
Writing bitstream to board in slot 1
0.81% (0x172f00)
\end{verbatim}
\item Once reprogramming is over, the logic will boot to this new bitstream:
\begin{verbatim}
Writing bitstream to board in slot 1
100.00% (0x2daa00)
DONE!
Issuing IPROG command to board in slot 1...
IPROG successful!
\end{verbatim}
\item To check the programming has indeed succeeded, check the gateware version,
again using \verb=getsr.py=:
\begin{verbatim}
$ cd ../diag/
$ ./getsr.py
[...]
Status register : 0x00118030
===============================
Gateware version : v3.0 (0x30)
[...]
\end{verbatim}
\end{enumerate}
%==============================================================================
% APPENDICES
......
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