]> jspc29.x-matter.uni-frankfurt.de Git - daqdocu.git/commitdiff
trigger mode explaination is added - cu
authorCahit <c.ugur@gsi.de>
Mon, 25 Mar 2013 15:29:37 +0000 (16:29 +0100)
committerCahit <c.ugur@gsi.de>
Mon, 25 Mar 2013 15:29:37 +0000 (16:29 +0100)
trb3/TdcDataFormat.tex
trb3/TdcFeatures.tex
trb3/TdcSlowControl.tex
trb3/main.pdf
trb3/trb3qs_software.tex

index 06e931215b82f8426d2ddb8c249517536f9f0d71..916568eeef541eaeebffc65b175c15b36f725c7d 100644 (file)
@@ -1,4 +1,13 @@
-In the data stream of the DAQ system, the TDC data starts with the TDC network header "0xXXXXc0XX", "0xc0XX" indicating the address of the TDC in the system. The bits 4\textendash7 indicates the number of the TRB3 board in the system starting from 0 (This must be set up in the \textit{addresses\_trb3.db} file). The least significant 4 bits indicate the TDC number on the TRB3 board. It can alter between 1\textendash4. The number of words sent by the TDC is marked in the upper 16 bits, e.g., "0x0006c0XX" means, the next 6 words are from the TDC with the address XX. After the TDC header, the data is sent. 4 different kinds of words are sent by the TDCs; header, time data, debug and reserved.
+In the data stream of the DAQ system, the TDC data starts with the TDC network
+header, for example "0xXXXXc0XX", "0xc0XX" indicating the address of the TDC
+in the system. The bits 4\textendash7 indicates the number of the TRB3 board
+in the system starting from 0 (This must be set up in the
+\textit{addresses\_trb3.db} file). The least significant 4 bits indicate the
+TDC number on the TRB3 board. It can alter between 1\textendash4. The number
+of words sent by the TDC is marked in the upper 16 bits, e.g., "0x0006c0XX"
+means, the next 6 words are from the TDC with the address XX. After the TDC
+header, the data is sent. 4 different kinds of words are sent by the TDCs;
+header, time data, debug and reserved.
 
 \subsubsection{TDC HEADER}
 
@@ -23,11 +32,17 @@ The data format of the \textbf{\textit{header}} word is shown below:
   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, e.g., "0xXXXXc023": 3rd TDC of the 2nd TRB3 board in the system.
+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 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}.
+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
@@ -72,21 +87,34 @@ The data format of the \textbf{\textit{time data}} word is shown below:
   coarse time  \> 11 bits      \> The coarse time value of the measurement – 5~ns granularity\\
 \end{tabbing}
 
-Any word starting with the bit "1" indicates a time data word from the TDC in the system.
+Any word starting with the bit "1" indicates a time data word from the TDC in
+the system.
 
-7 bits are reserved for indicating the channel number in the TDC (max. 63). The first channel \textendash\ channel "000000" \textendash\ is used to measure the reference time. All TDCs in the system measure the same reference time in this channel, so that they can be all synchronised.
+7 bits are reserved for indicating the channel number in the TDC. The first
+channel \textendash\ channel "0000000" \textendash\ is used to measure the
+reference time. All TDCs in the system measure the same reference time in this
+channel, so that they can be all synchronised.
+
+Three time informations are generated for each event detected by each
+channel; epoch wocounter, coarse counter and fine counter. The epoch counter
+word is explained in \ref{sec:tdcEpoch}. The coarse time information has the
+granularity of 5~ns (period of the system clock). The range of the coarse time
+is 10,24~us. The fine time has the range of 5~ns but doesn't have a fixed
+granularity. The fine time information has to be calibrated using the
+statistic collected by the individual channel (for details see
+\ref{sec:tdcFineTime}).
 
-Two time informations are generated for each event detected by each channel. The coarse time information has the granularity of 5~ns (period of the system clock). The range of the coarse time is 10,24~us. The fine time has the range of 5~ns but doesn't have a fixed granularity. The fine time information has to be calibrated using the statistic collected by the individual channel (for details see \ref{sec:tdcFineTime}).
 
 \subsubsection{DEBUG}
 \label{sec:tdcDebug}
 
 The debug mode can be enabled via slow control register bit:
 \begin{verbatim}
-  0xc0 - bit 4
+  0xc800 - bit 4
 \end{verbatim}
 
-The data format of the \textbf{\textit{debug}} word is shown in Table~\ref{tab:tdcDebugWord}:
+The data format of the \textbf{\textit{debug}} word is shown in
+Table~\ref{tab:tdcDebugWord}:
 
 \begin{table}[h]
   \centering
@@ -133,12 +161,17 @@ The debug information sent is given in Table \ref{tab:tdcDebugWords}.
   \end{center}  
 \end{table}
 
-The debug words sent with DAQ can be accessed also via slow control registers (see Table \ref{tab:tdcStatusReg1} and Table \ref{tab:tdcStatusReg2}).
+The debug words sent with DAQ can be accessed also via slow control registers
+(see Table \ref{tab:tdcStatusReg1} and Table \ref{tab:tdcStatusReg2}).
 
 \newpage
 
 \subsubsection{EPOCH Counter}
-As the global coarse counter has the time limit of $\sim$10~us, an overflow counter (EPOCH counter) is implemented in order to increase the measurement range. The data format of the \textbf{\textit{EPOCH Counter}} word is shown below:
+\label{sec:tdcEpoch}
+As the global coarse counter has the time limit of $\sim$10~us, an overflow
+counter (EPOCH counter) is implemented in order to increase the measurement
+range. The data format of the \textbf{\textit{EPOCH Counter}} word is shown
+below:
 
 \begin{table}[h]
   \centering
@@ -152,7 +185,16 @@ As the global coarse counter has the time limit of $\sim$10~us, an overflow coun
   \label{tab:tdcEpochCounte}
 \end{table}
 
-The EPOCH counter is designed with 28 bits increasing the total measurement range up to $\sim$45,8~min. For each channel an individual EPOCH counter is implemented and they are incremented, when the coarse counter wraps around. The value of the EPOCH counter is kept in a register before it is written in the channel memory. It is only written in the memory, if a time measurement takes place after the last increment of the EPOCH counter. The EPOCH counter word is written in the memory only once per channel for each increment, thus saving bandwidth. 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.
+The EPOCH counter is designed with 28 bits increasing the total measurement
+range up to $\sim$45,8~min. For each channel an individual EPOCH counter is
+implemented and they are incremented, when the coarse counter wraps
+around. The value of the EPOCH counter is kept in a register before it is
+written in the channel memory. It is only written in the memory, if a time
+measurement takes place after the last increment of the EPOCH counter. The
+EPOCH counter word is written in the memory only once per channel for each
+increment, thus saving bandwidth. 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}
index a57e55365dde2211a8f17138f9e7330165322e0c..2ed57de90d6c4b5b56dab97b62c1ffb1de55ec00 100644 (file)
@@ -1,11 +1,24 @@
-\subsubsection{Trigger Window}
+\subsubsection{Trigger Window and Trigger Mode}
 \label{sec:tdcTrigWin}
 
-In order to reduce the data load on the DAQ a feature called trigger window is implemented. With this feature the user can define the interested time interval and filter the hits occurred in this time interval. An illustration of the trigger window feature is shown in Figure \ref{fig:tdcTrigWin}. The trigger window is relative to the rising edge of the reference time at the \textit{TRIGGER\_INP1} (see Figure \ref{fig:trb3}) with the granularity of 5~ns. The \textit{Pre-Trigger Window} and \textit{Post-Trigger Window} widths can be set via slow control (Table \ref{tab:tdcControlReg}).
+In order to reduce the data load on the DAQ a feature called trigger window is
+implemented. With this feature the user can define the interested time
+interval and filter the hits occurred in this time interval. An illustration
+of the trigger window feature is shown in Figure \ref{fig:tdcTrigWin}. The
+trigger window is relative to the rising edge of the reference time at the
+\textit{TRIGGER\_INP1} (see Figure \ref{fig:trb3}) with the granularity of
+5~ns. The \textit{Pre-Trigger Window} and \textit{Post-Trigger Window} widths
+can be set via slow control (Table \ref{tab:tdcControlReg}).
 
 \begin{figure}[htp]
   \centering
   \includegraphics[width=0.8\textwidth]{figures/tdcTrigWinWF.png}
   \caption{An illustration of trigger window relative to the reference time.}
   \label{fig:tdcTrigWin}
-\end{figure}
\ No newline at end of file
+\end{figure}
+
+Trigger mode is controled by register 0xc800 bit 12. If it is set to triggered
+mode ('1'), the epoch and coarse counters are reset after each trigger
+window. If this bit is set to triggerless mode ('0'), the epoch and coarse
+counters are never reset, unless there is a system wide reset. They will run
+until they have an overflow.
index daeccec564bc513bd1ca2404aeae8a9cb5da85f9..608d46266f29210b0b6e06a3c72bfcd411cf9335 100644 (file)
@@ -1,4 +1,6 @@
-A set of control registers are assigned in order to access the basic controls, edit the features and debug information of the TDC. A detailed explanation of the control registers are given in Table \ref{tab:tdcControlReg}.
+A set of control registers are assigned in order to access the basic controls,
+edit the features and debug information of the TDC. A detailed explanation of
+the control registers are given in Table \ref{tab:tdcControlReg}.
 
 \begin{table}[htbp]
   \begin{center}
@@ -9,7 +11,7 @@ A set of control registers are assigned in order to access the basic controls, e
       \multirow{13}{*}{0xc800} & \multirow{13}{*}{Basic controls}      & 3-0   & Enables different signals to the HPLA* output for debugging with logic analyser (For more details see Table \ref{tab:tdcControlRegBasicLA}).\\
                                &                                       & 4     & Enables the \textit{Debug Mode}. Different statistics and debug words are sent after every trigger (see \ref{sec:tdcDebug}).\\
                                &                                       & 7-5   & reserved.\\
-                                &                                       & 8     & Resets the internal counters.\\
+                                &                                       & 8     & Resets the internal counters (active high).\\
                                &                                       & 11-9  & reserved.\\
                                &                                       & 12    & Used to select the trigger mode. 0 - with trigger mode; 1 - trigger-less mode (For more details see \ref{sec:tdcTrigWin}).\\
                                &                                       & 31-13 & reserved.\\
@@ -25,9 +27,9 @@ A set of control registers are assigned in order to access the basic controls, e
       \hline
       0xc803                   & Channel enable 2                      & 31-0  & Enable signals for the channels 33-64.\\
       \hline
-      \multirow{3}{*}{0xc804}  & \multirow{3}{*}{Channel hit scaler control}   & 7-0   & Defines the channel number of the scaler register (Status register 0xc111).\\
-                                &                                       & 31-8  & reserved.\\
-      \hline
+%      \multirow{3}{*}{0xc804} & \multirow{3}{*}{Channel hit scaler control}   & 7-0   & Defines the channel number of the scaler register (Status register 0xc111).\\
+%                                &                                       & 31-8  & reserved.\\
+%      \hline
     \end{tabularx}
   \caption{The control registers of the TDC. Note that these registers
   have been moved from 0xc0\ldots0xc4 at the beginning of 2013.}
@@ -179,12 +181,22 @@ A set of control registers are assigned in order to access the basic controls, e
   \end{center}
 \end{table}
 
-The status registers of the TDC are explained in Table \ref{tab:tdcStatusReg1} and Table \ref{tab:tdcStatusReg2}.
+The status registers of the TDC are explained in Table \ref{tab:tdcStatusReg1}
+and Table \ref{tab:tdcStatusReg2}.
 
 \newpage
 \subsubsection{Hit Scaler Registers}
 
-In order to automatise the threshold level settings the number of hits detected by each channel can be reached via slow control as well as the current LVDS input level state. The bit mask for these registers is x"c0". The very least 8~bits are used for the channel number, e.g. \verb|trbcmd r 0xc001| would give the hits detected by channel 1. In the same register the MSB shows the logic level of the output of the input LVDS buffers. This bit is useful for the designs, which use the LVDS buffers as discriminators, e.g. cbmrich and padiwa projects. The data format of the register is shown below:
+In order to automatise the threshold level settings the number of hits
+detected by each channel can be reached via slow control as well as the
+current LVDS input level state. These register can be read from the bus
+address x"c0xx". The very least 8~bits are used for the channel number,
+e.g. \verb|trbcmd r 0xc001| would give the hits detected by channel 1. In the
+same register the MSB shows the logic level of the output of the input LVDS
+buffers. This bit is useful for the designs, which use the LVDS buffers as
+discriminators, e.g. cbmrich and padiwa projects. The data format of the
+register is shown below:
+
 
 \begin{table}[ht]
   \centering
index 86148136136bd1e616572eb8f1330f9511521347..7130710743422f474eca06cf8d7289091dc15a42 100644 (file)
Binary files a/trb3/main.pdf and b/trb3/main.pdf differ
index 7e7bba42d893bda2ef84606199795f84b682a6ac..e6498fa8b75454ab65b54e7ccf6a1bda650dab14 100644 (file)
@@ -57,7 +57,7 @@ $ mkdir userscripts
 \begin{lstlisting}[label=,caption=~/userscripts/startup.sh - Variables to be adjusted]
 
 export TRB3_SERVER=trb046
-pkill -f \"trbnetd -i 11\"
+pkill -f ``trbnetd -i 11''
 $HOME/trbnettools/trbnetd/server/trbnetd -i 11
 
 \end{lstlisting}