%Include "boiler plate" EUDET style
\input{preamble}

% Title info
\subject{\includegraphics[scale=0.7]{figs/AIDA-logo_cmyk.pdf}}
\title{\Large AIDA mini-TLU manual } 
\author{
F. Crescioli$^1$,
D. Cussans$^2$,
A. Dosil Su{\'a}rez$^3$
\bigskip\\
\textit{\footnotesize $ ^1$Laboratoire de physique nucl\'eaire et des hautes \'energies, Paris, France}\\
\textit{\footnotesize $ ^2$University of Bristol, Bristol, United Kingdom}\\
\textit{\footnotesize $ ^3$University of Santiago de Compostela, Spain}\\
}
\date{\normalsize \today}

\vspace{\fill}

\begin{document}

% Title page
\maketitle
\begin{abstract}
\noindent

The AIDA mini Trigger Logic Unit (AIDA mini-TLU) has been conceived as a device to replace 
tens of VME modules and lemo cables dangling around in every test-beam setup.
It permits an easier and remote configuration of the trigger logic through the Ethernet
with added functionalities such as test readout elements without beam.
The generic design of the mini-TLU permits to connect it to a very wide range of devices, 
even LHC like readout systems. This has the benefit of sharing hardware, firmware and DAQ-Software effort.
Also, it implements a 1 ns accuracy TDC.

\end{abstract}


\input{introduction}

\input{hardware_design}

\input{firmware}

\input{software}

\subsection{Configurations}

\section{Hardware Interfaces}

The TLU is normally under the control of the central DAQ software. It
can be configured, controlled and the time-stamp information read-out
by the central DAQ.

\subsection{CALICE}

The signals to/from the CALICE Clock and Control Card (CCC) are as
follows: Clock(5MHz), Trigger , Busy, Master Clock(50MHz). The Trigger
and Busy signals are Manchester(Phase) encoded accordinng to IEEE
802.3 to maintain DC-Balance.  Event matching between Calice
and beam-telescope verified by matching timestamps between TLU and
CALICE readout within a combined event.

It seems likely that the CALICE CCC system the CALICE Beam Information
(BIF) system and the beam-telescope TLU could be implemented in the
same physical hardware.

%pictures of trig/busy signals.

\subsection{TimePix}

The LHCb TimePix telescope is being offered as part of AIDA
infrastructure and hence needs to be able to synchronize with a device
under test. Currently this is done using NIM based electronics. If a
central clock , a trigger signal and an optional synchronization
signal is distributed then event synchronization between the DUT and
the TimePix telescope can be done either by timestamp matching.

Event matching by comparing timestamps has the advantage that 
as long as there is no upset in the timestamp coiunters missing
triggers are not an issue.

\subsection{LHC}

Either use EUDET-Style signal definitions or Calice-style interface (phase
encoding is optional). Depending on requirements.

\subsection{Existing EUDAQ Users}

Keep compatibility with EUDAQ TLU.\cite{ref:eudaq_tlu_manual}

\section{Integrating Different Detectors }

\subsection{CALICE}

Integration between CALICE Calorimeter modules and other detectors,
for example the pixel beam telescope is part of the AIDA
programme. The purpose is mainly for system integration tests and
proof of concept.

There are various integration options. Integration at the hardware level will be done by integration of the AIDA TLU with the CALICE CCC. Possibly by making them the same physical object. For software integration, one possibility\cite{ref:vincentb_aida_llr_nov11} is to 
control CALICE run control from EUDAQ. Write separate files. Combine
offline. Purpose: 
concept.

\subsection{TPC}

Integration of XXX , YYYY system almost completed under EUDAQ
programme\cite{ulf} , martin-killenberg.

\subsection{Triggered Detectors (e.g. ATLAS, CMS Pixels)}

As in EUDET. Beam-telescope and DUT synchronized by TLU hardware
signals. DUT data written either via an EUDAQ producer, or by writing
telescope and DUT data to separate files and comdining offline.

\subsection{TimePix}

Synchronize TimePix and TLU timestamp counter via common system
clock. Provide DUT with triggers if needed. Write DUT and TimePix data
to separate files and combine offline. One possible
refinement\cite{ref:daniel_hyndes} is that the DUT can be ``EUDAQ''
compatible. Then only one data combiner is needed - TimePix with
EUDAQ.


\section{Specifications}

\begin{tabular}{| l | r |}

\hline

Parameter                                                  & Value \\ \hline \hline

Maximum master clock frequency, $\mathrm{F}_\mathrm{master}$ &  80MHz \\ \hline

Master clock jitter                                        & To Be Decided.\footnote{By default approx XXXps RMS in Mini TLU} \\ \hline

Timestamp precision                                        & 1 ns \\ \hline

Minimum pulse width (time above threshold )                & 5 ns \\ \hline

Latency                                                    &  $<$ XXX cycles \footnote{Unlike EUDET the incoming trigger signals are sampled onto the system clock. Hence the latency will have a jitter of 1/  $\mathrm{F}_\mathrm{master}$} \\ \hline

Maximum instantaneous trigger rate \footnote{When used in ``Calice-style'' / high-rate interface}                                                       &  $\mathrm{F}_\mathrm{master}$ \\ \hline

Maximum sustained trigger rate                             &  1 MHz \\ \hline
\end{tabular}

\section{High Rate Tests}

LHC sensors need $400 \mathrm{MHz}/\mathrm{cm}^2$ for pile-up
tests. The TLU will not be able to cope with this rate of triggers
except by using very small area scintillator. In addition, even if the
TLU could cope the MAPS telescope sensors would not. However, it has
been pointed out\cite{ref:andrei_n} that it would still be possible to
conduct efficiency studies by placing the telescope and DUT in a
moderate rate beam and then illuminating the DUT with a high flux of
radiation from either a radioactive source or an X-ray generator. That
is to say, use the same approach as the Gamma Irradiation
Facility\cite{ref:GIF} at CERN.

\bibliographystyle{ClassicCite}

\bibliography{References}

\end{document}
