\documentclass[a4paper,11pt]{article}
\usepackage[pdfborder= 0 0 0 1]{hyperref}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{rotating}
\usepackage{multirow}

\usepackage{color}


\begin{document}

\title{
  \textbf{
    CONV-TTL-BLO \\
    Test Log \\
  }
}
\author{Theodor-Adrian Stana\\
% \href{mailto:t.stana@cern.ch}{\textbf{\textit{t.stana@cern.ch}}}\\
BE-CO-HT\\
}
\date{\today}
\maketitle
\thispagestyle{empty}
\begin{figure}[htb]
    \begin{center}
      \includegraphics[scale=0.25, keepaspectratio]{fig/cern-logo.png}
    \end{center}
\end{figure}

\pagebreak

\pagenumbering{roman}
\setcounter{page}{1}
%\tableofcontents
\pagebreak

\listoffigures
\listoftables
\pagebreak

\pagenumbering{arabic}
\setcounter{page}{1}

\thispagestyle{empty}

%==============================================================================
% SEC: Chain test 1
%==============================================================================
\section{Daisy-chain test 1}
\label{sec:chain-test-1}

The setup for this test is as shown in Fig.~\ref{fig:dct1-setup}. A CTRV board
is used to generate TTL pulses to the CONV-TTL-BLO after which this pulse is
daisy-chained as shown in the figure. Both TTL and blocking pulses are generated
in the daisy-chain; Fig.~\ref{fig:dct1-setup} highlights the channel where a
switch from TTL to blocking or viceversa is made.

\begin{figure}[h]
  \centerline{\includegraphics[scale=.8]{fig/dct1-setup}}
  \caption{Setup for daisy-chain test 1}
  \label{fig:dct1-setup}
\end{figure}

Three counters in the CTRV are used; the first is the one which generates the
pulses to be sent through the daisy-chain. The output of the first counter is
used as the start signal for itself and as the clock for the second-channel counter.
The second channel counter is setup to output a DC-level signal (pulse width twice
greatner than the frequency); this signal is used as the start signal for the 
third-channel counter. The settings for all of the channels are shown in 
Table~\ref{tbl:ctrv-counters}.

\begin{table}[h]
  \caption{CTRV counter settings}
  \label{tbl:ctrv-counters}
  \centerline
  {
    \begin{tabular}{c c c c}
    \hline
    \textbf{Chan} & \textbf{Pulse width} & \textbf{Freq} & \textbf{Max val} \\
    \hline
    1 & 1~$\mu$s       & 100~kHz & 100 \\
    2 & 20~$\mu$s (DC) & 100~kHz & 2 \\
    3 & --             & --      & 1 \\
    \hline
    \end{tabular}
  }
\end{table}

Each CTRV counter generates a pulse signal on the output when the counter reaches 0;
the start signal causes the value of the counter to be reset and the counter to start
counting down. Thus, the configuration in Table~\ref{tbl:ctrv-counters} yields 1~$\mu$s 
pulses generated at a frequency of 100~kHz and passed through the daisy-chain. Since the 
channel 2 counter is configured with a max. value of two, a start pulse from the channel 1
counter starts the counting down and an arriving pulse from the CONV-TTL-BLO restarts the
counter. If any pulse is missed by the CONV-TTL-BLO through the daisy-chain, the output 
of channel 2 counter goes high and this causes the channel three counter to trigger an 
interrupt. The CTRV is monitored for interrupts using the \textit{ctrvtest} 
program; any missed pulses (any interrupts) are time-tagged by the program, thus showing 
when a pulse was missed.





\end{document}
