From 4bef31de57f1694d29f83d8e602b98756656a53d Mon Sep 17 00:00:00 2001 From: Cahit Date: Wed, 9 Dec 2015 11:28:59 +0100 Subject: [PATCH] added tdc trailer word information in the tdc data format section --- trb3/TdcDataFormat.tex | 155 ++++++++++++++++++++++++++--------------- 1 file changed, 97 insertions(+), 58 deletions(-) diff --git a/trb3/TdcDataFormat.tex b/trb3/TdcDataFormat.tex index a12d3b4..79f242e 100644 --- a/trb3/TdcDataFormat.tex +++ b/trb3/TdcDataFormat.tex @@ -1,55 +1,6 @@ The TDC data consists of 4 different kinds of information: TDC header, time data, debug, epoch counter and reserved. -\subsubsection{TDC HEADER} - -The data format of the \textbf{\textit{header}} word is shown below: - -\begin{table}[ht] - \centering - \begin{tabular}{|W{1.2cm}|W{2cm}|W{3.2cm}|W{6.3cm}|} - \hline - 3 bits & 5 bits & 8 bits & 16 bits\\ - "001" & reserved & random code & error bits\\ - \hline - \end{tabular} - \caption{The data format of the \textit{TDC HEADER} word.} - \label{tab:tdcHeaderWord} -\end{table} - -\begin{tabbing} - "001" \hspace{1.5cm}\= 3 bits \hspace{1.5cm}\= TDC Header marker \\ - reserved \> 5 bits \> Reserved for future use \\ - random code \> 8 bits \> Random code for the individual trigger \\ - error bits \> 16 bits \> Error might occur will be marked here \\ -\end{tabbing} - -Any word starting with the bits "001" indicates a header word from the TDC in -the system. The TDC is defined with the previous word in the data stream -\textendash\ TDC network header. - -The trigger random code \textendash\ 8 bits \textendash\ is generated by the -TrbNet for each trigger in order to distinguish the trigger. It is repeated in -the TDC HEADER, so data \& trigger matching can be tested. - -The error bits are used to indicate any error might occurred in the TDC since -the last trigger. The error bits coded in the header is given in Table -\ref{tab:tdcHeaderErrorBits}. - -\begin{table}[ht] - \centering - \begin{tabular}{|c|l|} - \hline - Bit & \multicolumn{1}{|c|}{Explanation} \\ - \hline - 0 & At least one of the channel ring buffers is overwritten. \\ - 1-15 & Reserved. \\ - \hline - \end{tabular} - \caption{TDC Header Error bits.} - \label{tab:tdcHeaderErrorBits} -\end{table} - \subsubsection{TIME DATA} @@ -98,6 +49,54 @@ hit and write a time data word in the memory with a dummy fine time x"3FF". This hit should be excluded from the calibration and time calculations. +\subsubsection{TDC HEADER} + +The data format of the \textbf{\textit{header}} word is shown below: + +\begin{table}[ht] + \centering + \begin{tabular}{|W{1.2cm}|W{5.2cm}|W{6.3cm}|} + \hline + 3 bits & 13 bits & 16 bits\\ + "001" & reserved & error bits\\ + \hline + \end{tabular} + \caption{The data format of the \textit{TDC HEADER} word.} + \label{tab:tdcHeaderWord} +\end{table} + +\begin{tabbing} + "001" \hspace{1.5cm}\= 3 bits \hspace{1.5cm}\= TDC Header marker \\ + reserved \> 13 bits \> Reserved for future use \\ + error bits \> 16 bits \> Error might occur will be marked here \\ +\end{tabbing} + +Any word starting with the bits "001" indicates a header word from the TDC in +the system. The TDC is defined with the previous word in the data stream +\textendash\ TDC network header. + +The trigger type and trigger random codes from the TrbNet are moved to the +trailer word since the tdc\_v2.3. + +The error bits are used to indicate any error might occurred in the TDC since +the last trigger. The error bits coded in the header is given in Table +\ref{tab:tdcHeaderErrorBits}. + +\begin{table}[ht] + \centering + \begin{tabularx}{\textwidth}{|c|L|} + \hline + Bit & \multicolumn{1}{|c|}{Explanation} \\ + \hline + 0 & At least one of the channel ring buffers is overwritten. \\ + 1-15 & Reserved. \\ + \hline + \end{tabularx} + \caption{TDC Header Error bits.} + \label{tab:tdcHeaderErrorBits} +\end{table} + + \subsubsection{DEBUG} \label{sec:tdcDebug} @@ -155,7 +154,7 @@ The debug information sent is given in Table \ref{tab:tdcDebugWords}. \end{table} The debug words sent with DAQ can be accessed also via slow control registers -(see Table \ref{tab:tdcStatusReg1}). +(see Table \ref{tab:tdcStatusReg}). \newpage @@ -188,20 +187,60 @@ EPOCH counter. In order to be on the safe side and not overflow the EPOCH counter, the readout trigger frequency can be set minimum to 24~Hz. -\subsubsection{RESERVED} +\subsubsection{TDC TRAILER (was RESERVED before tdc\_v2.3)} -The data format of the \textbf{\textit{reserved}} word is shown below: +This data format is being used as the trailer word since the tdc\_v2.3 to mark +information, warning and errors about the status of the last event +readout. The data format of the \textbf{\textit{trailer}} word is shown below: \begin{table}[h] \centering - \begin{tabular}{|W{1.275cm}|W{12.325cm}|} + \begin{tabularx}{\textwidth}{|c|c|W{2.5cm}|W{2.6cm}|W{5cm}|} +% \begin{tabular}{|W{1.2cm}|W{1.3cm}|W{2cm}|W{2cm}|W{6cm}|} \hline - 3 bits & 29 bits\\ - "000" & reserved\\ + 3 bits & 1 bit & 4 bits & 8 bits & 16 bits\\ + "000" & reserved & trigger type & random code & error bits\\ \hline - \end{tabular} - \caption{The data format of the \textit{RESERVED} word.} + \end{tabularx} + \caption{The data format of the \textit{TRAILER} word.} \label{tab:tdcReservedWord} \end{table} -It is reserved for future use. +\begin{tabbing} + "000" \hspace{1.5cm}\= 3 bits \hspace{1.5cm}\= Trailer word marker \\ + reserved \> 1 bit \> Reserved for future use \\ + trigger type \> 4 bits \> The trigger type of the last event \\ + random code \> 8 bits \> The random trigger code of the last event from the endpoint \\ + error bits \> 16 bit \> Warnings and errors about the last event readout status \\ +\end{tabbing} + +In case of any abnormal event readout the TDC readout will not stop the DAQ +but rather mark this in the trailer word. The user should check the status of +these bits for the analysis. The explanation of these bits are given in Table +\ref{tab:tdcTrailerErrorBits}. + +\begin{table}[ht] + \centering + \begin{tabularx}{\textwidth}{|c|L|} + \hline + Bit & \multicolumn{1}{|c|}{Explanation} \\ + \hline + \hline + 0 & Set if the trigger handler in TDC doesn't detect any reference time. \\ + 1 & Set if a reference time precedes a non-timing trigger (case 3 in TrbNet Manual section 7.3) \\ + 2 & Set if a timing trigger is delivered without a reference time (case 4 in TrbNet Manual section 7.3) \\ + 3 & Set with the bit 2 to mark the missing reference time \\ + 4 & Set if there are more than one detected reference times. The + reference channel will generate time data for both of the pulses, unless + they violate the dead time limit. (case 5 in TrbNet Manual section 7.3) \\ + 5 & Set if the reference time was too short (<40~ns). The reference + channel will still detect the pulse and generate a time + data. (case 6 in TrbNet Manual section 7.3) \\ + 6 & Set if no trigger validation arrives from the endpoint after a + valid reference time. (case 7 in TrbNet Manual section 7.3) \\ + 7-15 & Reserved. \\ + \hline + \end{tabularx} + \caption{TDC Trailer Error bits.} + \label{tab:tdcTrailerErrorBits} +\end{table} -- 2.43.0