From b20b91cf898d23d155ac1e6809a1dff2d5bca7db Mon Sep 17 00:00:00 2001 From: hadaq Date: Thu, 3 May 2012 09:59:33 +0000 Subject: [PATCH] tof/rpc/start description --- tof.tex | 266 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 265 insertions(+), 1 deletion(-) diff --git a/tof.tex b/tof.tex index 9c8399b..a44e064 100644 --- a/tof.tex +++ b/tof.tex @@ -1,8 +1,272 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{IPU Data Format} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +The data format of the TRBv2 based readout systems has the following structure: +\begin{center} + \begin{tabular}{ | c | c | p{10cm} |} + \hline + 0 & 0xTC TT NW NW & Internal header, where TC is the trigger code, TT is Trigger Tag, and NW is number of words of the subEvent (including header and trailer (with optional 0xdeadface), 16 bits, MSB first. \\ \hline + 1 & 0xVV XX NE NE & Second header word: VV: Version number of data-format, XX: all bits reserved, except the lower most which defines if pairing mode was used, NE: Number of words in the data-extension\\ \hline + 2 & 0x........ & first word of extension data (for example 10 counter values)\\ \hline + 2+1 & 0x..... & \\ \hline + ... & & \\ \hline + + 2+NE & 0x330d701b & TDC data starts here. first word of event, NE word later\\ \hline + & 0x........ & next word \\ \hline + & 0x........ & next word \\ \hline + N-1 & 0x........ & (N-1)th word of event \\ \hline + + \hline + \end{tabular} +\end{center} +begin tabular + +The TDC data consists of headers and trailers, which are removed from the data when bits 15--0 in 0xA0F0 register are set. + + +TDC header: + +\resizebox{15cm}{!}{ +\begin{tabular}{ | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | } + \hline + 31 & 30 & 29 & 28 & 27 & 26 & 25 & 24 & 23 & 22 & 21 & 20 & 19 & 18 & 17 & 16 & 15 & 14 & 13 & 12 & 11 & 10 & 9 & 8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 & 0 \\ \hline + + \multicolumn{4}{|c|}{ 0 0 1 0 } & \multicolumn{4}{|c|}{TDC} & \multicolumn{12}{|c|}{Event ID} & \multicolumn{12}{|c|}{Bunch ID} \\ \hline +\end{tabular} +}\\ +\begin{itemize} +\item TDC: Programmed ID of TDC (0 to 3). +\item Event ID: Event ID from event counter. +\item Bunch ID: Bunch ID of trigger (trigger time tag). +\end{itemize} + +TDC trailer: + +\resizebox{15cm}{!}{ +\begin{tabular}{ | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | } + \hline + 31 & 30 & 29 & 28 & 27 & 26 & 25 & 24 & 23 & 22 & 21 & 20 & 19 & 18 & 17 & 16 & 15 & 14 & 13 & 12 & 11 & 10 & 9 & 8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 & 0 \\ \hline + + \multicolumn{4}{|c|}{ 0 0 1 1 } & \multicolumn{4}{|c|}{TDC} & \multicolumn{12}{|c|}{Event ID} & \multicolumn{12}{|c|}{Word count} \\ \hline +\end{tabular} +}\\ + +Word count: Number of words from TDC (incl. headers and trailers). \\ + + +Leading measurement: \\ + +\resizebox{15cm}{!}{ +\begin{tabular}{ | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | } + \hline + 31 & 30 & 29 & 28 & 27 & 26 & 25 & 24 & 23 & 22 & 21 & 20 & 19 & 18 & 17 & 16 & 15 & 14 & 13 & 12 & 11 & 10 & 9 & 8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 & 0 \\ \hline + + \multicolumn{4}{|c|}{ 0 1 0 0 } & \multicolumn{4}{|c|}{TDC} & \multicolumn{5}{|c|}{Channel} & \multicolumn{19}{|c|}{Leading measurment} \\ \hline +\end{tabular} +}\\ + + +Trailing measurement: \\ + +\resizebox{15cm}{!}{ +\begin{tabular}{ | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | } + \hline + 31 & 30 & 29 & 28 & 27 & 26 & 25 & 24 & 23 & 22 & 21 & 20 & 19 & 18 & 17 & 16 & 15 & 14 & 13 & 12 & 11 & 10 & 9 & 8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 & 0 \\ \hline + + \multicolumn{4}{|c|}{ 0 1 0 1 } & \multicolumn{4}{|c|}{TDC} & \multicolumn{5}{|c|}{Channel} & \multicolumn{19}{|c|}{Trailing measurment} \\ \hline +\end{tabular} +}\\ + + +Very high resolution measurement (for START and VETO detectors):\\ + +\resizebox{15cm}{!}{ +\begin{tabular}{ | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | } + \hline + 31 & 30 & 29 & 28 & 27 & 26 & 25 & 24 & 23 & 22 & 21 & 20 & 19 & 18 & 17 & 16 & 15 & 14 & 13 & 12 & 11 & 10 & 9 & 8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 & 0 \\ \hline + + \multicolumn{4}{|c|}{ 0 1 0 E } & \multicolumn{4}{|c|}{TDC} & \multicolumn{2}{|c|}{Inter.} & \multicolumn{19}{|c|}{Measurment} \\ \hline +\end{tabular} +}\\ +\begin{itemize} +\item E: 0: Leading edge, 1: Trailing edge +\item Channel TDC channel number (0 - 7): 0 = channel 0, 1 = channel 4, , , 7 = channel 28 +\item Inter.: Channel interpolation measurment (lower 2 bits) +\end{itemize} + +Errors: \\ +\resizebox{15cm}{!}{ +\begin{tabular}{ | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | c | } + \hline + 31 & 30 & 29 & 28 & 27 & 26 & 25 & 24 & 23 & 22 & 21 & 20 & 19 & 18 & 17 & 16 & 15 & 14 & 13 & 12 & 11 & 10 & 9 & 8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 & 0 \\ \hline + + \multicolumn{4}{|c|}{ 0 1 1 0 } & \multicolumn{4}{|c|}{TDC} & \multicolumn{9}{|c|}{-} & \multicolumn{15}{|c|}{Error} \\ \hline +\end{tabular} +}\\ + +Error flags [bit]: +\begin{itemize} + \item [0]: Hit lost in group 0 from read-out fifo overflow. + \item [1]: Hit lost in group 0 from L1 buffer overflow. + \item [2]: Hit error have been detected in group 0. + \item [3]: Hit lost in group 1 from read-out fifo overflow. + \item [4]: Hit lost in group 1 from L1 buffer overflow + \item [5]: Hit error have been detected in group 1. + \item [6]: Hit data lost in group 2 from read-out fifo overflow. + \item [7]: Hit lost in group 2 from L1 buffer overflow + \item [8]: Hit error have been detected in group 2. + \item [9]: Hit lost in group 3 from read-out fifo overflow. + \item [10]: Hit lost in group 3 from L1 buffer overflow + \item [11]: Hit error have been detected in group 3. + \item [12]: Hits rejected because of programmed event size limit + \item [13]: Event lost (trigger fifo overflow). + \item [14]: Internal fatal chip error has been detected. +\end{itemize} + +\subsubsection{RPC} + +In case of the RPC data-extension is used. Inside this data a scaler values are included. These scaler values are corresponding to outputs of the Base Line Restorer Board (LVDS 0 - > First data word, LVDS 1 second, LVDS 2 third). + +\subsubsection{STAT/VETO} + +Here the very high resolution mode is used. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Memory Map} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \ No newline at end of file +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsubsection{Read registers} +\begin{description} + \item [0xA000] Constant value : 0xaaaabbbb + \item [0xA001] Readout debug information: + \begin{description} + \item[Bit 3 -- 0] TDCA/B/C/D (bit 0/1/2/3) internal error + \item[Bit 7 -- 4] If TDC 0/1/2/3 reference time is missing than the bit 4/5/6/7 is set + \item[Bit 11 -- 8] If TDC 0 event ID does not match TDC 1/2/3 or trigger number than the bit 8/9/10/11 is set + \item[Bit 13] Internal pulse for starting readout 1st + \item[Bit 14] LVL1 busy - during acquaring data from TDCs + \item[Bit 15] LVL1 memory busy - LVL1 FIFO almost full + \item[Bit 30] Internal pulse for starting readout 2nd + \item[Bit 31] LVL2 busy - sending the data to the TRBnet + \end{description} + \item [0xA002] Readout debug information: + \begin{description} + \item[Bit 15 -- 0] Number of words in current event + \item[Bit 19 -- 16] Number of accpeted LVL1 triggers (TDC readouts started) + \item[Bit 23 -- 20] LVL1 FSM debug: + \begin{description} + \item[0x1] Idle + \item[0x2] Wait for a delayed trigger + \item[0x2] Send a trigger to the TDCs + \item[0x3] Wait before sending token to the TDCs + \item[0x4] Send and wait for token + \item[0x5 dma] Save EB1 header - used in stand alone DMA mode + \item[0x6 dma] Save EB2 header - used in stand alone DMA mode + \item[0x7 dma] Save EB3 header - used in stand alone DMA mode + \item[0x8 dma] Save EB4 header - used in stand alone DMA mode + \item[0x6] Wait for TRBnet data valid + \item[0x8] Save first header + \item[0x9] Save second header + \item[0xa] Save extention-data + \item[0xb] Save header marker + \item[0xc] Wait for emtying buffers (in case of memory busy + \end{description} + \item[Bit 27 -- 24] LVL2 FSM debug: + \begin{description} + \item[0x1] Idle + \item[0x2] Wait for Etrax or TRBnet + \item[0x3 , 0x4] readout header marker + \item[0x5] Send header data + \item[0x6, 0x7] readout data marker + \item[0x8] Send data + \end{description} + \item[Bit 30 -- 28] not used + \item[Bit 31] Etrax is busy (only used in stand alone mode) + \end{description} + \item [0xA003] Readout debug information: + \begin{description} + \item[11 -- 0] Number of words in data FIFO + \item[12] Data marker + \item[13] Data write enable + \item[14] Data FIFO empty + \item[14] Data FIFO full + \item[11 -- 0] Number of words in header FIFO + \item[12] Header marker + \item[13] Header write enable + \item[14] Header FIFO empty + \item[14] Header FIFO full + \end{description} + \item [0xA004] Readout debug information: + \begin{description} + \item[7 -- 0] LVL1 trigger number minus 1 + \item[11 -- 8] LVL1 trigger type + \item[15 -- 12] not used + \item[23 -- 16] LVL1 trigger number + \item[27 -- 24] LVL1 trigger type + \item[30 -- 28] Not used + \item[31] TDC ready signal + \end{description} + \item [0xA005] Readout debug information: + \begin{description} + \item[7 -- 0] Number of accpeted LVL1 triggers (TDC readouts started) + \item[15 -- 8] Number of TDC readouts finished (token from TDC is back) + \item[23 -- 16] Number of LVL2 readouts accpeted + \item[31 -- 24] Number of LVL2 readouts finished + \end{description} + \item [0xA006] Version number + \item [0xA007] Constant value 0xabcd0001 + \item [0xA008] SPI DATA OUT- to the TDC connector and RPC DAC chain + \item [0xA00A] + \begin{description} + \item[7 -- 0] Trigger number + \item[15 -- 8] Reference time counter + \item[30 -- 16] Not used + \item[31] LVL1 internal trigger + \end{description} + \item [0xA00F] + \begin{description} + \item[11 -- 0] Temperature sensor info. (temp) + \item[23 -- 12] Temperature sensor info. 1 + \end{description} + \item [0xA010] + \begin{description} + \item[11 -- 0] Temperature sensor info. 2 + \item[23 -- 12] Temperature sensor info. 3 + \end{description} + \item[0xA016] + \begin{description} + \item[3 -- 0] IPU information 3--0 + \end{description} + \item[0xA01B] + \begin{description} + \item[7 -- 0] Number of valid triggers without reference time + \item[15 -- 8] Number of valid timing triggers + \item[23 -- 16] Data valid rising edge counter + \item[31 -- 24] Number of reference times + \end{description} + \item[0xA01C] + \begin{description} + \item[7 -- 0] Number of invalid triggers + \item[27 -- 8] Constant number 0xdbeaca + \end{description} + \item[0xA01D - 0xA02F] Scalers connected to the Base Line Restorer LVDS outputs (0->0, 1->1, 2->2 ...) + +\end{description} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsection{Hardware} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsection{Configuration} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + + + + + + + + -- 2.43.0