1 | \documentclass[a4paper,11pt]{report}
|
---|
2 |
|
---|
3 | \usepackage{float}
|
---|
4 | \usepackage{graphicx}
|
---|
5 | \usepackage{url}
|
---|
6 | \usepackage[T1]{fontenc}
|
---|
7 | \usepackage{amsmath}
|
---|
8 | \usepackage{longtable}
|
---|
9 | \usepackage{parskip}
|
---|
10 | \usepackage{pifont}
|
---|
11 | \usepackage{array}
|
---|
12 |
|
---|
13 | \setlength{\oddsidemargin}{0cm}
|
---|
14 | \setlength{\evensidemargin}{0cm}
|
---|
15 | \setlength{\topmargin}{0cm}
|
---|
16 |
|
---|
17 | \textwidth 6.2in
|
---|
18 | \textheight 9in
|
---|
19 | \columnsep 0.25in
|
---|
20 |
|
---|
21 | \pagestyle{plain}
|
---|
22 | \setcounter{tocdepth}{1}
|
---|
23 |
|
---|
24 | \title{\vspace*{-7cm} \Huge \bf FTM Firmware Specifications}
|
---|
25 | \author{\Large Patrick Vogler\footnote{Contact for questions and suggestions concerning this
|
---|
26 | document: {\tt patrick.vogler@phys.ethz.ch}}, Quirin Weitzel}
|
---|
27 | \date{\vspace*{0.5cm} \Large v3.0~~~-~~~January 2011}
|
---|
28 |
|
---|
29 | \begin{document}
|
---|
30 |
|
---|
31 | \maketitle
|
---|
32 |
|
---|
33 | \newpage
|
---|
34 |
|
---|
35 | \tableofcontents
|
---|
36 |
|
---|
37 | %---------------------------------------------------------------------------------
|
---|
38 |
|
---|
39 | \chapter{Introduction}
|
---|
40 | \label{cha:Introduction}
|
---|
41 |
|
---|
42 | The FTM (FACT Trigger Master) board collects the trigger primitives from all
|
---|
43 | 40 FTU boards (FACT Trigger Unit) and generates the trigger signal for the
|
---|
44 | FACT camera. The trigger logic is a 'n-out-of-40' majority coincidence of all
|
---|
45 | trigger primitives. Beside the trigger, the FTM board also generates a
|
---|
46 | trigger-ID (see chapter \ref{cha:Trigger-ID}). It is controlled by the main
|
---|
47 | control software via ethernet. Two auxiliary RS-485 interfaces are also
|
---|
48 | available.
|
---|
49 |
|
---|
50 | In addition to the trigger, the FTM board also generates the other fast
|
---|
51 | control signals: Time-Marker (TIM), DRS \cite{DRS4} reference clock (CLD) and
|
---|
52 | reset. These four fast control signals are distributed to the FAD (FACT Analog
|
---|
53 | to Digital) boards via the two FFC (FACT Fast Control) boards. The FTM board
|
---|
54 | also provides via the TIM line the signal for the DRS timing calibration. In
|
---|
55 | order to generate the CLD DRS reference clock, as well as the time-marker
|
---|
56 | signal for DRS timing calibration, the FTM board uses a clock conditioner
|
---|
57 | \cite{LMK03000}.
|
---|
58 |
|
---|
59 | The FTM board has two counters, the 'timestamp counter' and the 'on-time
|
---|
60 | counter'. While the 'timestamp counter' runs continously (counting up,
|
---|
61 | resetted by e.g. a 'start run'), the 'on-time counter' only counts when the
|
---|
62 | camera trigger is enabled.
|
---|
63 |
|
---|
64 | The FTM board further serves as slow control master for the 40 FTU boards. The
|
---|
65 | slow control of the FTU boards and the distribution of the trigger-ID to the
|
---|
66 | FAD boards are performed via dedicated RS-485 buses. Because the FAD as well
|
---|
67 | as the FTU boards are arranged in crates of 10 boards each, the FTM board has
|
---|
68 | four connectors, one for each crate. Running over these connectors there are
|
---|
69 | two RS-485 buses (one for FTU slow control and one for the trigger-ID) besides
|
---|
70 | the busy signal from the FAD boards and the crate reset.
|
---|
71 |
|
---|
72 | In addition, the FTM board controls the two FLPs (FACT Light Pulser) via four
|
---|
73 | LVDS signals each. Light pulser~1 is located in the mirror dish, light
|
---|
74 | pulser~2 inside the camera shutter. There are also digital auxiliary in- and
|
---|
75 | outputs according to the NIM (Nuclear Instrumentation Module) standard, for
|
---|
76 | example for external triggers and veto, and to have the signals accessible.
|
---|
77 |
|
---|
78 | The main component of the FTM board is a FPGA (Xilinx Spartan
|
---|
79 | XC3SD3400A-4FGG676C), fulfilling the main functions within the board. The
|
---|
80 | purpose of this document is to provide specifications needed for the
|
---|
81 | development of the firmware of this FPGA and the software (called 'main
|
---|
82 | control' in the following) controlling the FTM board. For further information
|
---|
83 | about the FTM board hardware please refer to \cite{FTM-Schematics}.
|
---|
84 |
|
---|
85 | \chapter{Trigger-ID}
|
---|
86 | \label{cha:Trigger-ID}
|
---|
87 |
|
---|
88 | For each processed trigger the FTM board generates a unique trigger-ID to be
|
---|
89 | broadcasted to all FAD boards and added to the event data. This trigger-ID
|
---|
90 | consists of a 32 bit trigger number, a two byte trigger type indicator and a
|
---|
91 | checksum. The transmission protocol for the trigger-ID broadcast is shown in
|
---|
92 | table \ref{tab:Trigger-ID broadcast}.
|
---|
93 |
|
---|
94 | \begin{table}[htbp]
|
---|
95 | \centering
|
---|
96 | \begin{tabular}{|l|l|}\hline
|
---|
97 | byte no & content\\\hline\hline
|
---|
98 | 0 & Trigger-No first byte (least significant byte) \\\hline
|
---|
99 | 1 & Trigger-No second byte\\\hline
|
---|
100 | 2 & Trigger-No third byte\\\hline
|
---|
101 | 3 & Trigger-No forth byte (most significant byte)\\\hline
|
---|
102 | 4 & Trigger-Type 1\\\hline
|
---|
103 | 5 & Trigger-Type 2\\\hline
|
---|
104 | 6 & CRC-8-CCITT (checksum)\\\hline
|
---|
105 | \end{tabular}
|
---|
106 | \caption{The transmission protocol to broadcast the trigger-ID to the FAD boards}
|
---|
107 | \label{tab:Trigger-ID broadcast}
|
---|
108 | \end{table}
|
---|
109 |
|
---|
110 | A Cyclic Redundancy Check (CRC) over byte 0 - 5 is used to evaluate the
|
---|
111 | integrity of the trigger-ID. An 8-CCITT CRC has been chosen which is based on
|
---|
112 | the polynomial $x^8 + x^2 + x + 1$ (00000111, omitting the most significant
|
---|
113 | bit). The resulting 1-byte checksum comprises the last byte of the trigger-ID.
|
---|
114 | The transmission of the trigger-ID to the FAD boards is done by means of
|
---|
115 | dedicated RS-485 buses (one per crate).
|
---|
116 |
|
---|
117 | In the first byte of the trigger type indicator (see table
|
---|
118 | \ref{tab:Trigger-Type 1}) n0 - n5 indicate the number of trigger primitives
|
---|
119 | required for a trigger, thus the 'n' of the 'n-out-of-40' majority
|
---|
120 | coincidence. The two flags 'external trigger 1' and 'external trigger 2',
|
---|
121 | when set, indicate a trigger from the corresponding NIM inputs. See also
|
---|
122 | section \ref{sec:Static-data-block} and table \ref{tab:FTM-majority} for
|
---|
123 | further information.
|
---|
124 |
|
---|
125 | \begin{table}[htbp]
|
---|
126 | \centering
|
---|
127 | %\begin{small}
|
---|
128 | \begin{tabular}{|l|l|l|l|l|l|l|l|}\hline
|
---|
129 | Bit7 & Bit6 & Bit5 & Bit4 & Bit3 & Bit2 & Bit1 & Bit0\\\hline\hline
|
---|
130 | n5 & n4 & n3 & n2 & n1 & n0 & external trigger 2 & external trigger 1\\\hline
|
---|
131 | \end{tabular}
|
---|
132 | %\end{small}
|
---|
133 | \caption{Trigger-Type 1}
|
---|
134 | \label{tab:Trigger-Type 1}
|
---|
135 | \end{table}
|
---|
136 |
|
---|
137 | \begin{table}[htbp]
|
---|
138 | \centering
|
---|
139 | \begin{small}
|
---|
140 | \begin{tabular}{|l|l|l|l|l|l|l|l|}\hline
|
---|
141 | Bit7 & Bit6 & Bit5 & Bit4 & Bit3 & Bit2 & Bit1 & Bit0\\\hline\hline
|
---|
142 | TIM source & LP\_set\_3 & LP\_set\_2 & LP\_set\_1 & LP\_set\_0 & pedestal & LP\_2 & LP\_1\\\hline
|
---|
143 | \end{tabular}
|
---|
144 | \end{small}
|
---|
145 | \caption{Trigger-Type 2}
|
---|
146 | \label{tab:Trigger-Type 2}
|
---|
147 | \end{table}
|
---|
148 |
|
---|
149 | The 'TIM source' bit in 'Trigger-Type 2' (see table \ref{tab:Trigger-Type 2})
|
---|
150 | indicates the source of the timemarker signal: a '0' indicates the timemarker
|
---|
151 | being produced in the FPGA while a '1' indicates the timemarker coming from
|
---|
152 | the clock conditioner. The flags 'LP\_1' and 'LP\_2' are set when the
|
---|
153 | corresponding lightpulser has flashed while the 'pedestal' flag is set in case
|
---|
154 | of a pedestal (random) trigger. An event having none of these flags set
|
---|
155 | indicates a physics event. The bits 'LP\_set\_0' to 'LP\_set\_3' are used to
|
---|
156 | code information about the light pulser settings. They only have a meaning in
|
---|
157 | case of calibration events.
|
---|
158 |
|
---|
159 | \chapter{FTM Commands}
|
---|
160 | \label{cha:FTM-Commands}
|
---|
161 |
|
---|
162 | The communication between the FTM board and the main control, including the
|
---|
163 | corresponding commands, protocols and data, is based on 16-bit words and
|
---|
164 | big-endian. This is to facilitate the data-transmission over the Wiznet W5300
|
---|
165 | ethernet interface \cite{W5300}.
|
---|
166 |
|
---|
167 | The basic structure of all commands is the same and given in table
|
---|
168 | \ref{tab:FTM-command-structure}. After a start delimiter, the second word
|
---|
169 | identifies the command. Next there is a parameter further refining the
|
---|
170 | command, e.g. what to read. The fourth and fifth words are spares and should
|
---|
171 | contain zeros. Starting from the sixth word, an optional data block of
|
---|
172 | variable size is following. This data block differs in length and content
|
---|
173 | depending on command and parameter. In case of 'read' instructions, the
|
---|
174 | corresponding data block is sent back.
|
---|
175 |
|
---|
176 | %The FTM board must answer every command by sending back the appropriate data
|
---|
177 | %block or by simply sending back the instruction where there is no datablock to
|
---|
178 | %be sent back. All 'read' commands to the FTM board do not contain any data
|
---|
179 | %blocks, but the FTM boards response does. In case of 'read' and 'write'
|
---|
180 | %instructions, the datablock is to be sent back. When 'start run' or 'stop run'
|
---|
181 | %commands are used, the FTM board 'mirrors' them, i.e. sends them back for
|
---|
182 | %confirmation.
|
---|
183 |
|
---|
184 | \begin{table}[p]
|
---|
185 | \centering
|
---|
186 | \begin{tabular}{|l|l|}\hline
|
---|
187 | word no & content\\\hline\hline
|
---|
188 | 0 & start delimiter (e.g. '@') \\\hline
|
---|
189 | 1 & command ID \\\hline
|
---|
190 | 2 & command parameter \\\hline
|
---|
191 | 3 & spare: containing 0x0000\\\hline
|
---|
192 | 4 & spare: containing 0x0000 \\\hline
|
---|
193 | 5 & data block (optional and of variable size)\\\hline
|
---|
194 | ... & ...\\\hline
|
---|
195 | X & data block\\\hline
|
---|
196 | \end{tabular}
|
---|
197 | \caption{FTM command structure}
|
---|
198 | \label{tab:FTM-command-structure}
|
---|
199 | \end{table}
|
---|
200 |
|
---|
201 | So far six different commands are foreseen: 'read', 'write', 'start run',
|
---|
202 | 'stop run', 'ping FTUs' and 'crate reset' (see table
|
---|
203 | \ref{tab:FTM-command-ID}). The command parameters of the 'read' command are
|
---|
204 | shown in table~\ref{tab:FTM-read-command-param}. For the 'write' command there
|
---|
205 | is no option because the static data block is the only data that can be
|
---|
206 | written to the FTM board.
|
---|
207 |
|
---|
208 | \begin{table}[p]
|
---|
209 | \centering
|
---|
210 | \begin{tabular}{|r|r|}\hline
|
---|
211 | command-ID: bits & \\\cline{1-1}
|
---|
212 | 15 ... 8 \vline 7 \vline 6 \vline 5 \vline 4 \vline 3 \vline 2 \vline 1 \vline 0 & command\\\hline\hline
|
---|
213 | 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 & read \\\hline
|
---|
214 | 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 & write \\\hline
|
---|
215 | 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 \vline 0 & start run \\\hline
|
---|
216 | 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 \vline 0 \vline 0 & stop run \\\hline
|
---|
217 | 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 \vline 0 \vline 0 \vline 0 & ping all FTUs \\\hline
|
---|
218 | 0 \vline 0 \vline 0 \vline 1 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 & crate reset \\\hline
|
---|
219 | \end{tabular}
|
---|
220 | \caption{FTM command ID listing}
|
---|
221 | \label{tab:FTM-command-ID}
|
---|
222 | \end{table}
|
---|
223 |
|
---|
224 | \begin{table}[p]
|
---|
225 | \centering
|
---|
226 | \begin{tabular}{|r|r|r|}\hline
|
---|
227 | command parameter: bits & & \\\cline{1-1}
|
---|
228 | 15 ... 8 \vline 7 \vline 6 \vline 5 \vline 4 \vline 3 \vline 2 \vline 1 \vline 0 & command & data block\\\hline\hline
|
---|
229 | 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 & read static data block & no\\\hline
|
---|
230 | 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 & read dynamic data block & no\\\hline
|
---|
231 | %0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 \vline 0 & read trigger list & no\\\hline
|
---|
232 | \end{tabular}
|
---|
233 | \caption{Command parameters for the 'read' command}
|
---|
234 | \label{tab:FTM-read-command-param}
|
---|
235 | \end{table}
|
---|
236 |
|
---|
237 | %\begin{table}[htbp]
|
---|
238 | %\centering
|
---|
239 | %\begin{tabular}{|r|r|r|}\hline
|
---|
240 | % command parameter: bits & & \\\cline{1-1}
|
---|
241 | % 15 ... 8 \vline 7 \vline 6 \vline 5 \vline 4 \vline 3 \vline 2 \vline 1 \vline 0 & command & data block\\\hline\hline
|
---|
242 | % 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline0 \vline 0 \vline0 \vline1 & write static data & static data block\\\hline
|
---|
243 | %\end{tabular}
|
---|
244 | %\caption{Command parameters for the 'write' command}
|
---|
245 | %\label{tab:FTM-write-command-param}
|
---|
246 | %\end{table}
|
---|
247 |
|
---|
248 | In table \ref{tab:FTM-start-command-param} the parameters to start a run are
|
---|
249 | listed. The type of the run is fully described in the FTM configuration
|
---|
250 | (static data block, see section~\ref{sec:Static-data-block}), which always has
|
---|
251 | to be sent by the main control before starting a run. Therefore the only
|
---|
252 | option is to start an "endless" run or to take X events instead. In the latter
|
---|
253 | case X is defined by a two words (32 bit) long unsigned integer, making up the
|
---|
254 | command data block. The 'start run' command enables the transmission of
|
---|
255 | trigger signals (physics, calibration or pedestal) to the FAD boards and
|
---|
256 | resets the trigger and time counters. There is no parameter for stopping a
|
---|
257 | run. If a number of events has been specified ('take X events'), the run will
|
---|
258 | terminate if either the 'stop run' command is received or the requested number
|
---|
259 | of events is reached.
|
---|
260 |
|
---|
261 | \begin{table}[p]
|
---|
262 | \centering
|
---|
263 | \begin{tabular}{|r|r|r|}\hline
|
---|
264 | command parameter: bits & & \\\cline{1-1}
|
---|
265 | 15 ... 8 \vline7 \vline 6 \vline 5 \vline 4 \vline 3 \vline 2 \vline 1 \vline 0 & command & data block\\\hline\hline
|
---|
266 | 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 & start run & no \\\hline
|
---|
267 | 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 & take X events & number of events X \\\hline
|
---|
268 | %0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 \vline 0 & start taking pedestals & no \\\hline
|
---|
269 | %0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 \vline 1 & take X pedestals events & number of events X \\\hline
|
---|
270 | %0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 \vline 0 \vline 0 & start calibration run & no \\\hline
|
---|
271 | %0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 \vline 0 \vline 1 & take X calibration events & number of events X \\\hline
|
---|
272 | \end{tabular}
|
---|
273 | \caption{Command parameters for the 'start run' command}
|
---|
274 | \label{tab:FTM-start-command-param}
|
---|
275 | \end{table}
|
---|
276 |
|
---|
277 | %\begin{table}[htbp]
|
---|
278 | %\centering
|
---|
279 | %\begin{tabular}{|r|r|r|}\hline
|
---|
280 | % command parameter: bits & & \\\cline{1-1}
|
---|
281 | % 15 ... 8 \vline 7 \vline 6 \vline 5 \vline 4 \vline 3 \vline 2 \vline 1 \vline 0 & command & data block\\\hline\hline
|
---|
282 | % 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 & stop run & no\\\hline
|
---|
283 | %\end{tabular}
|
---|
284 | %\caption{Command parameter for the 'stop run' command}
|
---|
285 | %\label{tab:FTM-stop-command-param}
|
---|
286 | %\end{table}
|
---|
287 |
|
---|
288 | In case of a 'ping FTUs' command the FTM will address the FTUs one by one and
|
---|
289 | readout their DNA. The results are collected in the FTU list (see section
|
---|
290 | \ref{sec:FTU-List}), which is sent back to the main control. There are no
|
---|
291 | parameters for this command. With the 'crate reset' command the FPGAs of a
|
---|
292 | particular crate can be rebooted, where the command parameter defines the
|
---|
293 | crate number (see table \ref{tab:FTM-reset-command-param}).
|
---|
294 |
|
---|
295 | \begin{table}[p]
|
---|
296 | \centering
|
---|
297 | \begin{tabular}{|r|r|r|}\hline
|
---|
298 | command parameter: bits & & \\\cline{1-1}
|
---|
299 | 15 ... 8 \vline 7 \vline 6 \vline 5 \vline 4 \vline 3 \vline 2 \vline 1 \vline 0 & command & data block\\\hline\hline
|
---|
300 | 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 & reset crate 0 & no\\\hline
|
---|
301 | 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 & reset crate 1 & no\\\hline
|
---|
302 | 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 \vline 0 & reset crate 2 & no\\\hline
|
---|
303 | 0 \vline 0 \vline 0 \vline 0 \vline 0 \vline 1 \vline 0 \vline 0 \vline 0 & reset crate 3 & no\\\hline
|
---|
304 | \end{tabular}
|
---|
305 | \caption{Command parameters for the 'crate reset' command}
|
---|
306 | \label{tab:FTM-reset-command-param}
|
---|
307 | \end{table}
|
---|
308 |
|
---|
309 | \chapter{FTM data blocks}
|
---|
310 | \label{cha:FTM-data-block}
|
---|
311 |
|
---|
312 | The trigger master features two main data blocks, named 'static data block'
|
---|
313 | and 'dynamic data block' in the following. They are implemented in the
|
---|
314 | firmware as block-RAM. In addition, there is the so-called 'FTU list', which
|
---|
315 | is generated only on request ('ping FTUs' command). If any of these blocks is
|
---|
316 | sent to the main control (either automatically or on demand), a header with a
|
---|
317 | size of eleven words is added. This header is identical for all data blocks
|
---|
318 | and contains solely read-only information: the FTM board ID (57-bit Xilinx
|
---|
319 | device DNA \cite{ds557, ds610, wp267, wp266}), a firmware ID and the readings
|
---|
320 | of the trigger counter and time stamp counter. The header structure is
|
---|
321 | summarized in table~\ref{tab:FTM-header}.
|
---|
322 |
|
---|
323 | \begin{table}[h]
|
---|
324 | \centering
|
---|
325 | \begin{tabular}{|l|l|}\hline
|
---|
326 | word no & content\\\hline\hline
|
---|
327 | 0x000 & board ID bits 63...48 \\\hline
|
---|
328 | 0x001 & board ID bits 47...32\\\hline
|
---|
329 | 0x002 & board ID bits 31...16\\\hline
|
---|
330 | 0x003 & board ID bits 15...0\\\hline
|
---|
331 | 0x004 & firmware ID \\\hline
|
---|
332 | 0x005 & Trigger counter at read-out time bits 31...16 \\\hline
|
---|
333 | 0x006 & Trigger counter at read-out time bits 15...0\\\hline
|
---|
334 | 0x007 & Time stamp counter at read-out time bits 47...32 \\\hline
|
---|
335 | 0x008 & Time stamp counter at read-out time bits 31...16 \\\hline
|
---|
336 | 0x009 & Time stamp counter at read-out time bits 15...0 \\\hline
|
---|
337 | 0x00A & spare \\\hline
|
---|
338 | \end{tabular}
|
---|
339 | \caption{Header structure for sending a data block}
|
---|
340 | \label{tab:FTM-header}
|
---|
341 | \end{table}
|
---|
342 |
|
---|
343 | \section{Static data block}
|
---|
344 | \label{sec:Static-data-block}
|
---|
345 |
|
---|
346 | The static data block contains all the settings needed to configure and
|
---|
347 | operate the FTM. It has to be written by the main control each time before a
|
---|
348 | run is started or, in general, some component has to be reprogrammed. Single
|
---|
349 | register access is not foreseen for the moment. In addition, whenever the FTM
|
---|
350 | board receives a new static data block, it performs a complete reconfiguration
|
---|
351 | including a reprogramming of the
|
---|
352 | FTUs. Table~\ref{tab:FTM-trigger-master-static-data-block} summarizes the
|
---|
353 | static data block. More details about the individual registers can be found in
|
---|
354 | the subsequent tables.
|
---|
355 |
|
---|
356 | %These settings are readable and writable by the main control using the
|
---|
357 | %corresponding commands 'read static data block' or 'write static data block',
|
---|
358 | %respectively. There is one exception from writability: In case the static
|
---|
359 | %data block is read back, the first eleven words (address 0..A) are identical
|
---|
360 | %with the dynamic data block and the trigger list shown in
|
---|
361 | %\ref{tab:FTM-trigger-master-dynamic-data-block} and
|
---|
362 | %\ref{tab:FTM-trigger-list}. These first eleven words can only be read and not
|
---|
363 | %written. The board ID is supposed to be the Xilinx device DNA \cite{ds557,
|
---|
364 | % ds610, wp267, wp266}, the 57 bit device ID of the FPGA. When using the
|
---|
365 | %'write static data block' command, the static data block must start with the
|
---|
366 | %'general settings register' at address 0x00B. So there is an offset in the
|
---|
367 | %addresses of 0x00B between the 'read-out-version' and the 'write-version' of
|
---|
368 | %the static data block.
|
---|
369 |
|
---|
370 | \begin{longtable}[h]{|l|l|}\hline
|
---|
371 | \centering
|
---|
372 | word no & content\\\hline\hline
|
---|
373 | %0x000 & board ID bit 63 - 48 \\\hline
|
---|
374 | %0x001 & board ID bit 47 - 32\\\hline
|
---|
375 | %0x002 & board ID bit 31 - 16\\\hline
|
---|
376 | %0x003 & board ID bit 15 - 0\\\hline
|
---|
377 | %0x004 & firmware ID \\\hline
|
---|
378 | %0x005 & Trigger counter at read-out time bits 31 .. 16 \\\hline
|
---|
379 | %0x006 & Trigger counter at read-out time bits 15 .. 0\\\hline
|
---|
380 | %0x007 & Time stamp counter at read-out time bits 47 .. 32 \\\hline
|
---|
381 | %0x008 & Time stamp counter at read-out time bits 31 .. 16 \\\hline
|
---|
382 | %0x009 & Time stamp counter at read-out time bits 15 .. 0 \\\hline
|
---|
383 | %0x00A & spare \\\hline
|
---|
384 | 0x000 & general settings\\\hline
|
---|
385 | 0x001 & on-board status LEDs\\\hline
|
---|
386 | 0x002 & light pulser and pedestal trigger frequency\\\hline
|
---|
387 | 0x003 & ratio between LP1, LP2 and pedestal triggers\\\hline
|
---|
388 | 0x004 & light pulser 1 amplitude\\\hline
|
---|
389 | 0x005 & light pulser 2 amplitude\\\hline
|
---|
390 | 0x006 & light pulser 1 delay\\\hline
|
---|
391 | 0x007 & light pulser 2 delay\\\hline
|
---|
392 | 0x008 & majority coincidence n (for physics)\\\hline
|
---|
393 | 0x009 & majority coincidence n (for calibration)\\\hline
|
---|
394 | 0x00A & trigger delay\\\hline
|
---|
395 | 0x00B & timemarker delay\\\hline
|
---|
396 | 0x00C & dead time\\\hline
|
---|
397 | 0x00D & clock conditioner R0 bits 31...16 \\\hline
|
---|
398 | 0x00E & clock conditioner R0 bits 15...0 \\\hline
|
---|
399 | 0x00F & clock conditioner R1 bits 31...16 \\\hline
|
---|
400 | 0x010 & clock conditioner R1 bits 15...0 \\\hline
|
---|
401 | 0x011 & clock conditioner R8 bits 31...16 \\\hline
|
---|
402 | 0x012 & clock conditioner R8 bits 15...0 \\\hline
|
---|
403 | 0x013 & clock conditioner R9 bits 31...16 \\\hline
|
---|
404 | 0x014 & clock conditioner R9 bits 15...0 \\\hline
|
---|
405 | 0x015 & clock conditioner R11 bits 31...16 \\\hline
|
---|
406 | 0x016 & clock conditioner R11 bits 15...0 \\\hline
|
---|
407 | 0x017 & clock conditioner R13 bits 31...16 \\\hline
|
---|
408 | 0x018 & clock conditioner R13 bits 15...0 \\\hline
|
---|
409 | 0x019 & clock conditioner R14 bits 31...16 \\\hline
|
---|
410 | 0x01A & clock conditioner R14 bits 15...0 \\\hline
|
---|
411 | 0x01B & clock conditioner R15 bits 31...16 \\\hline
|
---|
412 | 0x01C & clock conditioner R15 bits 15...0 \\\hline
|
---|
413 | 0x01D & spare \\\hline
|
---|
414 | 0x01E & spare \\\hline
|
---|
415 | 0x01F & spare \\\hline
|
---|
416 | 0x020 & enables patch 0 board 0 crate 0 \\\hline
|
---|
417 | 0x021 & enables patch 1 board 0 crate 0 \\\hline
|
---|
418 | 0x022 & enables patch 2 board 0 crate 0 \\\hline
|
---|
419 | 0x023 & enables patch 3 board 0 crate 0 \\\hline
|
---|
420 | 0x024 & DAC$\_$A board 0 crate 0 \\\hline
|
---|
421 | 0x025 & DAC$\_$B board 0 crate 0 \\\hline
|
---|
422 | 0x026 & DAC$\_$C board 0 crate 0 \\\hline
|
---|
423 | 0x027 & DAC$\_$D board 0 crate 0 \\\hline
|
---|
424 | 0x028 & DAC$\_$H board 0 crate 0 \\\hline
|
---|
425 | 0x029 & Prescaling board 0 crate 0 \\\hline
|
---|
426 | 0x02A & enables patch 0 board 1 crate 0 \\\hline
|
---|
427 | 0x02B & enables patch 1 board 1 crate 0 \\\hline
|
---|
428 | 0x02C & enables patch 2 board 1 crate 0 \\\hline
|
---|
429 | 0x02D & enables patch 3 board 1 crate 0 \\\hline
|
---|
430 | 0x02E & DAC$\_$A board 1 crate 0 \\\hline
|
---|
431 | 0x02F & DAC$\_$B board 1 crate 0 \\\hline
|
---|
432 | 0x030 & DAC$\_$C board 1 crate 0 \\\hline
|
---|
433 | 0x031 & DAC$\_$D board 1 crate 0 \\\hline
|
---|
434 | 0x032 & DAC$\_$H board 1 crate 0 \\\hline
|
---|
435 | 0x033 & Prescaling board 1 crate 0 \\\hline
|
---|
436 | ... & ... \\\hline
|
---|
437 | 0x1A6 & enables patch 0 board 9 crate 3 \\\hline
|
---|
438 | 0x1A7 & enables patch 1 board 9 crate 3 \\\hline
|
---|
439 | 0x1A8 & enables patch 2 board 9 crate 3 \\\hline
|
---|
440 | 0x1A9 & enables patch 3 board 9 crate 3 \\\hline
|
---|
441 | 0x1AA & DAC$\_$A board 9 crate 3 \\\hline
|
---|
442 | 0x1AB & DAC$\_$B board 9 crate 3 \\\hline
|
---|
443 | 0x1AC & DAC$\_$C board 9 crate 3 \\\hline
|
---|
444 | 0x1AD & DAC$\_$D board 9 crate 3 \\\hline
|
---|
445 | 0x1AE & DAC$\_$H board 9 crate 3 \\\hline
|
---|
446 | 0x1AF & Prescaling board 9 crate 3 \\\hline
|
---|
447 | 0x1B0 & active FTU list crate 0 \\\hline
|
---|
448 | 0x1B1 & active FTU list crate 1 \\\hline
|
---|
449 | 0x1B2 & active FTU list crate 2 \\\hline
|
---|
450 | 0x1B3 & active FTU list crate 3 \\\hline
|
---|
451 | \caption{Overview of the FTM static data block}
|
---|
452 | \label{tab:FTM-trigger-master-static-data-block}
|
---|
453 | \end{longtable}
|
---|
454 |
|
---|
455 | The FTM general settings register is detailed in table
|
---|
456 | \ref{tab:FTM-general-settings-register}. The 'TIM\_CLK' bit defines whether
|
---|
457 | the time marker is generated by the FPGA ('TIM\_CLK' = 0, default for physics
|
---|
458 | data taking), or whether it is generated by the clock conditioner ('TIM\_CLK'
|
---|
459 | = 1, e.g. for DRS timing calibration). The 'ext\_veto', 'ext\_trig\_1' and
|
---|
460 | 'ext\_trig\_2' bits enable (1) or disable (0) the NIM inputs for the external
|
---|
461 | veto and trigger signals, respectively. In order to select which trigger
|
---|
462 | sources are active during a run, the bits 'LP1', 'LP2', 'ped' and 'trigger'
|
---|
463 | are foreseen (0 disabled, 1 enabled). During a physics run, for example,
|
---|
464 | 'LP1', 'ped' and 'trigger' should all be set to generate interleaved
|
---|
465 | calibration and pedestal events as well as activate the 'n-out-of-40' trigger
|
---|
466 | input. For a didicated pedestal run only 'ped' should be set, since in this
|
---|
467 | case the FTM sends directly a trigger to the FADs. For calibration runs it
|
---|
468 | depends on whether the external (LP1) or internal (LP2) light pulser is used:
|
---|
469 | For the first case 'LP1' and 'trigger' have to be set, since here the full
|
---|
470 | trigger chain is involved and the camera triggers based on G-APD signals. For
|
---|
471 | the second case only 'LP2' is needed, because the shutter is closed and the
|
---|
472 | FTM sends directly the trigger signal to the FADs (like for pedestal
|
---|
473 | events). Bits 8 to 15 of the general settings register are not used up to now.
|
---|
474 |
|
---|
475 | \begin{table}[h]
|
---|
476 | \centering
|
---|
477 | \begin{small}
|
---|
478 | \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|}\hline
|
---|
479 | Bit & 15...8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 & 0 \\\hline
|
---|
480 | Content & x & trigger & ped & LP2 & LP1 & ext\_trig\_2 & ext\_trig\_1& ext\_veto & TIM\_CLK \\\hline
|
---|
481 | \end{tabular}
|
---|
482 | \end{small}
|
---|
483 | \caption{FTM general settings register}
|
---|
484 | \label{tab:FTM-general-settings-register}
|
---|
485 | \end{table}
|
---|
486 |
|
---|
487 | %\begin{table}[!h]
|
---|
488 | %\centering
|
---|
489 | %\begin{tabular}{|l|l|}\hline
|
---|
490 | %TIM\_CClk & description \\\hline\hline
|
---|
491 | %0 & Time marker generated in the FPGA \\\hline
|
---|
492 | %1 & Time marker generated by the clock conditioner \\\hline
|
---|
493 | %\end{tabular}
|
---|
494 | %\caption{FTM Time marker indication}
|
---|
495 | %\label{tab:FTM-Time-marker-indication}
|
---|
496 | %\end{table}
|
---|
497 |
|
---|
498 | %\begin{table}[!h]
|
---|
499 | %\centering
|
---|
500 | %\begin{tabular}{|l|l|}\hline
|
---|
501 | %ena$\_$ext$\_$Veto & description \\\hline\hline
|
---|
502 | %0 & disable external trigger veto\\\hline
|
---|
503 | %1 & enable external trigger veto \\\hline
|
---|
504 | %\end{tabular}
|
---|
505 | %\caption{FTM external trigger}
|
---|
506 | %\label{tab:FTM-external-trigger}
|
---|
507 | %\end{table}
|
---|
508 |
|
---|
509 | %\begin{table}[!h]
|
---|
510 | %\centering
|
---|
511 | %\begin{tabular}{|l||l|}\hline
|
---|
512 | %ena\_LP1 & description \\\hline\hline
|
---|
513 | %0 & disable light pulser 1 \\\hline
|
---|
514 | %1 & enable light pulser 1\\\hline
|
---|
515 | %\end{tabular}
|
---|
516 | %\caption{FTM light pulser 1}
|
---|
517 | %\label{tab:FTM-light-pulser-1}
|
---|
518 | %\end{table}
|
---|
519 |
|
---|
520 | %\begin{table}[!h]
|
---|
521 | %\centering
|
---|
522 | %\begin{tabular}{|l||l|}\hline
|
---|
523 | %ena\_LP2 & description \\\hline\hline
|
---|
524 | %0 & disable light pulser 2 \\\hline
|
---|
525 | %1 & enable light pulser 2 \\\hline
|
---|
526 | %\end{tabular}
|
---|
527 | %\caption{FTM light pulser 2}
|
---|
528 | %\label{tab:FTM-light-pulser-2}
|
---|
529 | %\end{table}
|
---|
530 |
|
---|
531 | %\begin{table}[!h]
|
---|
532 | %\centering
|
---|
533 | %\begin{tabular}{|l||l|}\hline
|
---|
534 | %ena\_Ped & description \\\hline\hline
|
---|
535 | %0 & disable interleaved pedestal trigger \\\hline
|
---|
536 | %1 & enable interleaved pedestal trigger \\\hline
|
---|
537 | %\end{tabular}
|
---|
538 | %\caption{FTM interleaved pedestals}
|
---|
539 | %\label{tab:FTM-interleaved-pedestals}
|
---|
540 | %\end{table}
|
---|
541 |
|
---|
542 | %\begin{table}[!h]
|
---|
543 | %\centering
|
---|
544 | %\begin{small}
|
---|
545 | %\begin{tabular}{|l||l|}\hline
|
---|
546 | %ena\_LLC & description \\\hline\hline
|
---|
547 | %0 & disable low level calibration pulses \\\hline
|
---|
548 | %1 & enable low level calibration pulses \\\hline
|
---|
549 | %\end{tabular}
|
---|
550 | %\end{small}
|
---|
551 | %\caption{FTM low level calibration pulses}
|
---|
552 | %\label{tab:FTM-low-level-calibration-pulses}
|
---|
553 | %\end{table}
|
---|
554 |
|
---|
555 | The 'on-board status LEDs' register shown in table \ref{tab:FTM-LED-register}
|
---|
556 | allows to switch a total of eight LEDs on the FTM board for debugging purposes
|
---|
557 | by setting the corresponding bit high.
|
---|
558 |
|
---|
559 | \begin{table}[h]
|
---|
560 | \centering
|
---|
561 | \begin{small}
|
---|
562 | \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|}\hline
|
---|
563 | Bit & 15...8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 & 0 \\\hline
|
---|
564 | Content & x & red$\_$3 & red$\_$2 & gn$\_$1 & ye$\_$1 & red$\_$1 & gn$\_$0 & ye$\_$0 & red$\_$0 \\\hline
|
---|
565 | \end{tabular}
|
---|
566 | \end{small}
|
---|
567 | \caption{'on-board status LEDs' register}
|
---|
568 | \label{tab:FTM-LED-register}
|
---|
569 | \end{table}
|
---|
570 |
|
---|
571 | The frequency, with which light pulser and pedestal triggers are sent, is
|
---|
572 | stored in the register at address 0x002 (see table
|
---|
573 | \ref{tab:FTM-frequency-register}). It is given in Hz and adjustable up to
|
---|
574 | about 1\,kHz (10 bit). The next register defines the ratio of LP1, LP2 and
|
---|
575 | pedestal events (see table \ref{tab:FTM-ratio-register}).
|
---|
576 |
|
---|
577 | \begin{table}[h]
|
---|
578 | \centering
|
---|
579 | \begin{small}
|
---|
580 | \begin{tabular}{|l|l|l|l|l|l|l|l|}\hline
|
---|
581 | Bit & 15 - 10 & 9 & 8 & ... & 2 & 1 & 0 \\\hline
|
---|
582 | Content & x & FREQ\_9 & FREQ\_8 & ... & FREQ\_2 & FREQ\_1 & FREQ\_0 \\\hline
|
---|
583 | \end{tabular}
|
---|
584 | \end{small}
|
---|
585 | \caption{Register for the frequency of calibration and pedestal events}
|
---|
586 | \label{tab:FTM-frequency-register}
|
---|
587 | \end{table}
|
---|
588 |
|
---|
589 | \begin{table}[h]
|
---|
590 | \centering
|
---|
591 | \begin{small}
|
---|
592 | \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|l|}\hline
|
---|
593 | Bit & 15 - 12 & 11 & ... & 8 & 7 & ... & 4 & 3 & ... & 0 \\\hline
|
---|
594 | Content & x & ped\_R3 & ... & ped\_R0 & LP2\_R3 & ... & LP2\_R0 & LP1\_R3 & ... & LP1\_R0 \\\hline
|
---|
595 | \end{tabular}
|
---|
596 | \end{small}
|
---|
597 | \caption{Register defining the ratio between pedestal, LP1 and LP2 events}
|
---|
598 | \label{tab:FTM-ratio-register}
|
---|
599 | \end{table}
|
---|
600 |
|
---|
601 | %\begin{table}[!h]
|
---|
602 | %\centering
|
---|
603 | %\begin{tiny}
|
---|
604 | %\begin{tabular}{|l|l|l|l|l|l|l|l|l|l|l|l|l|l|l|l|l|}\hline
|
---|
605 | %Bit & 15 - 10 & 9 & 8 & 7 & 6 & 5 & 4 & 3 & 2 & 1 & 0 \\\hline
|
---|
606 | %Function & x & LPR2\_9 & LPR2\_8 & LPR2\_7 & LPR2\_6 & LPR2\_5 & LPR2\_4 & LPR2\_3 & LPR2\_2 & LPR2\_1 & LPR2\_0 \\\hline
|
---|
607 | %\end{tabular}
|
---|
608 | %\end{tiny}
|
---|
609 | %\caption{Light pulser 2 frequency register at address 0x00E: This register contains the pulse rate of the light
|
---|
610 | % pulser 2 in Hz.}
|
---|
611 | %\label{tab:Light-pulser-2-frequancy-register}
|
---|
612 | %\end{table}
|
---|
613 |
|
---|
614 | In order to define the amplitude and characteristics of the light pulses that
|
---|
615 | are generated by the LP1 and the LP2 system, the registers 'LP1 amplitude' and
|
---|
616 | 'LP2 amplitude' are used, respectively. These registers are presented in
|
---|
617 | table~\ref{tab:LP1-amplitude-register} and
|
---|
618 | table~\ref{tab:LP2-amplitude-register}. In general the light pulser systems
|
---|
619 | are controlled from the FTM by means of four control lines: The first line
|
---|
620 | defines the amplitude of the calibration events by sending a gate/pulse with
|
---|
621 | an adjustable length (bits 0 to 3 in the amplitude registers). With the second
|
---|
622 | and third line additional LEDs can be switched on in the calibration systems
|
---|
623 | (bits 13 and 14). The fourth line is used to overdrive the LP systems and to
|
---|
624 | generate a very fast timing pulse. To do so, bit 15 has to be set to 1.
|
---|
625 |
|
---|
626 | \begin{table}[!h]
|
---|
627 | \centering
|
---|
628 | \begin{small}
|
---|
629 | \begin{tabular}{|l|l|l|l|l|l|l|l|}\hline
|
---|
630 | Bit & 15 & 14 & 13 & 12...4 & 3 & ... & 0 \\\hline
|
---|
631 | Content & FCP1 & add\_LEDs1\_1& add\_LEDs1\_0 & x & LP1A\_3 & ... & LP1A\_0 \\\hline
|
---|
632 | \end{tabular}
|
---|
633 | \end{small}
|
---|
634 | \caption{Light pulser 1 amplitude register}
|
---|
635 | \label{tab:LP1-amplitude-register}
|
---|
636 | \end{table}
|
---|
637 |
|
---|
638 | \begin{table}[!h]
|
---|
639 | \centering
|
---|
640 | \begin{small}
|
---|
641 | \begin{tabular}{|l|l|l|l|l|l|l|l|}\hline
|
---|
642 | Bit & 15 & 14 & 13 & 12...4 & 3 & ... & 0 \\\hline
|
---|
643 | Content & FCP2 & add\_LEDs2\_1 & add\_LEDs2\_0 & x & LP2A\_3 & ... & LP2A\_0 \\\hline
|
---|
644 | \end{tabular}
|
---|
645 | \end{small}
|
---|
646 | \caption{Light pulser 2 amplitude register}
|
---|
647 | \label{tab:LP2-amplitude-register}
|
---|
648 | \end{table}
|
---|
649 |
|
---|
650 | The different settings of the 'n-out-of-40' logic (physics or calibration
|
---|
651 | events) are stored in two separate registers, which both have a structure
|
---|
652 | according to table~\ref{tab:FTM-majority}.
|
---|
653 |
|
---|
654 | \begin{table}[!h]
|
---|
655 | \centering
|
---|
656 | \begin{small}
|
---|
657 | \begin{tabular}{|l|l|l|l|l|l|l|l|}\hline
|
---|
658 | Bit & 15...6 & 5 & 4 & 3 & 2 &1 & 0 \\\hline
|
---|
659 | Content & x & n5 & n4 & n3 & n2 & n1 & n0 \\\hline
|
---|
660 | \end{tabular}
|
---|
661 | \end{small}
|
---|
662 | \caption{Structure of the two majority coincidence (n-out-of-40) registers; the binary value
|
---|
663 | in these registers is the number n of FTU trigger primitives required to trigger an event (physics or calibration)}
|
---|
664 | \label{tab:FTM-majority}
|
---|
665 | \end{table}
|
---|
666 |
|
---|
667 | In addtion, there are several registers in the static data block to define
|
---|
668 | delays (e.g. for the trigger). Also a general dead time to be applied after
|
---|
669 | each trigger can be set (to compensate for the delay of the busy line). The
|
---|
670 | clock conditioner settings are specified at address 0x00D to 0x01C (LMK03000
|
---|
671 | from National Semiconductor, for more details see \cite{LMK03000}). Starting
|
---|
672 | at address 0x020, the FTU settings are stored. The FTM always holds the
|
---|
673 | complete FTU parameters in the static data block. For the meaning of these
|
---|
674 | registers, please refer to the FTU firmware specifications document
|
---|
675 | \cite{FTUspecs}. In case not all FTUs are connected during e.g. the testing
|
---|
676 | phase, or a FTU is broken, the 'active FTU list' registers can be used to
|
---|
677 | disable certain boards.
|
---|
678 |
|
---|
679 | \section{Dynamic data block}
|
---|
680 | \label{sec:Dynamic-data-block}
|
---|
681 | The dynamic data block shown in table \ref{tab:FTM-dynamic-data-block}
|
---|
682 | contains permanently updated data stored inside the FTM FPGA. It contains the
|
---|
683 | actual on-time counter reading, the board temperatures and the trigger rates
|
---|
684 | measured by the FTUs. This data block is updated and sent periodically by the
|
---|
685 | FTM. Thus the main control software receives periodically a corresponding data
|
---|
686 | package via ethernet. Usually the shortest counting interval of the FTUs
|
---|
687 | ('prescaling' register) defines the period. The on-board 12-bit temperature
|
---|
688 | sensors are MAX6662 chips from Maxim Products. For more information about
|
---|
689 | these components and their data see \cite{MAX6662}. When sending the dynamic
|
---|
690 | data block, the header defined in table~\ref{tab:FTM-header} is added at the
|
---|
691 | beginning.
|
---|
692 |
|
---|
693 | % \begin{table}[h]
|
---|
694 | % \centering
|
---|
695 | \begin{longtable}[h]{|l|l|}\hline
|
---|
696 | word no & content\\\hline\hline
|
---|
697 | %0x000 & board ID bit 63 - 48 \\\hline
|
---|
698 | %0x001 & board ID bit 47 - 32\\\hline
|
---|
699 | %0x002 & board ID bit 31 - 16\\\hline
|
---|
700 | %0x003 & board ID bit 15 - 0\\\hline
|
---|
701 | %0x004 & firmware ID \\\hline
|
---|
702 | %0x005 & Trigger counter at read-out time bits 31 .. 16 \\\hline
|
---|
703 | %0x006 & Trigger counter at read-out time bits 15 .. 0\\\hline
|
---|
704 | %0x007 & Time stamp counter at read-out time bits 47 .. 32 \\\hline
|
---|
705 | %0x008 & Time stamp counter at read-out time bits 31 .. 16 \\\hline
|
---|
706 | %0x009 & Time stamp counter at read-out time bits 15 .. 0 \\\hline
|
---|
707 | %0x00A & spare \\\hline
|
---|
708 |
|
---|
709 | 0x000 & on-time counter at read-out time bits 47...32 \\\hline
|
---|
710 | 0x001 & on-time counter at read-out time bits 31...16 \\\hline
|
---|
711 | 0x002 & on-time counter at read-out time bits 15...0 \\\hline
|
---|
712 | 0x003 & temperature sensor 0: component U45 on the FTM schematics \cite{FTM-Schematics}\\\hline
|
---|
713 | 0x004 & temperature sensor 1: U46 \\\hline
|
---|
714 | 0x005 & temperature sensor 2: U48 \\\hline
|
---|
715 | 0x006 & temperature sensor 3: U49 \\\hline
|
---|
716 | 0x007 & rate counter bit 29...16 patch 0 board 0 crate 0 \\\hline
|
---|
717 | 0x008 & rate counter bit 15...0 patch 0 board 0 crate 0 \\\hline
|
---|
718 | 0x009 & rate counter bit 29...16 patch 1 board 0 crate 0 \\\hline
|
---|
719 | 0x00A & rate counter bit 15...0 patch 1 board 0 crate 0 \\\hline
|
---|
720 | 0x00B & rate counter bit 29...16 patch 2 board 0 crate 0 \\\hline
|
---|
721 | 0x00C & rate counter bit 15...0 patch 2 board 0 crate 0 \\\hline
|
---|
722 | 0x00D & rate counter bit 29...16 patch 3 board 0 crate 0 \\\hline
|
---|
723 | 0x00E & rate counter bit 15...0 patch 3 board 0 crate 0 \\\hline
|
---|
724 | 0x00F & rate counter bit 29...16 total board 0 crate 0 \\\hline
|
---|
725 | 0x010 & rate counter bit 15...0 total board 0 crate 0\\\hline
|
---|
726 | 0x011 & Overflow register board 0 crate 0 \\\hline
|
---|
727 | 0x012 & CRC-error register board 0 crate 0 \\\hline
|
---|
728 | 0x013 & rate counter bit 29...16 patch 0 board 1 crate 0 \\\hline
|
---|
729 | 0x014 & rate counter bit 15...0 patch 0 board 1 crate 0 \\\hline
|
---|
730 | 0x015 & rate counter bit 29...16 patch 1 board 1 crate 0 \\\hline
|
---|
731 | 0x016 & rate counter bit 15...0 patch 1 board 1 crate 0 \\\hline
|
---|
732 | 0x017 & rate counter bit 29...16 patch 2 board 1 crate 0 \\\hline
|
---|
733 | 0x018 & rate counter bit 15...0 patch 2 board 1 crate 0 \\\hline
|
---|
734 | 0x019 & rate counter bit 29...16 patch 3 board 1 crate 0 \\\hline
|
---|
735 | 0x01A & rate counter bit 15...0 patch 3 board 1 crate 0 \\\hline
|
---|
736 | 0x01B & rate counter bit 29...16 total board 1 crate 0 \\\hline
|
---|
737 | 0x01C & rate counter bit 15...0 total board 1 crate 0 \\\hline
|
---|
738 | 0x01D & Overflow register board 1 crate 0 \\\hline
|
---|
739 | 0x01E & CRC-error register board 1 crate 0 \\\hline
|
---|
740 | ... & ... \\\hline %%%
|
---|
741 | % \end{longtable}
|
---|
742 | \caption{FTM dynamic data block}
|
---|
743 | \label{tab:FTM-dynamic-data-block}
|
---|
744 | \end{longtable}
|
---|
745 |
|
---|
746 | %\section{Trigger-list}
|
---|
747 | %\label{sec:trigger-list}
|
---|
748 | %The FTM board records all triggers in a list, the so-called trigger-list.
|
---|
749 | %This trigger-list comprises a maximum of 50 triggers. The first eleven words
|
---|
750 | %are the same as in the static- and dynamic data block. During data-taking-,
|
---|
751 | %calibration- and trigger runs, the Trigger-list is automatically sent to the
|
---|
752 | %main control each time the 50 triggers are reached or the run is finished. In
|
---|
753 | %addition, the Trigger-list can also be read-out by the main control with the
|
---|
754 | %according command. In case the run finishes or is terminated, as well as when
|
---|
755 | %read out manually, the trigger list might be shorter than 50 events.
|
---|
756 |
|
---|
757 | %% \begin{table}[h]
|
---|
758 | %% \centering
|
---|
759 | %\begin{longtable}[h]{|l|l|}\hline
|
---|
760 | %address & content\\\hline\hline
|
---|
761 | %0x000 & board ID bit 63 - 48 \\\hline
|
---|
762 | %0x001 & board ID bit 47 - 32\\\hline
|
---|
763 | %0x002 & board ID bit 31 - 16\\\hline
|
---|
764 | %0x003 & board ID bit 15 - 0\\\hline
|
---|
765 | %0x004 & firmware ID \\\hline
|
---|
766 | %0x005 & Trigger counter at read-out time bits 31 .. 16 \\\hline
|
---|
767 | %0x006 & Trigger counter at read-out time bits 15 .. 0\\\hline
|
---|
768 | %0x007 & Time stamp counter at read-out time bits 47 .. 32 \\\hline
|
---|
769 | %0x008 & Time stamp counter at read-out time bits 31 .. 16 \\\hline
|
---|
770 | %0x009 & Time stamp counter at read-out time bits 15 .. 0 \\\hline
|
---|
771 | %0x00A & spare \\\hline
|
---|
772 |
|
---|
773 | %0x00B & on-time counter at read-out time bits 47 .. 32 \\\hline
|
---|
774 | %0x00C & on-time counter at read-out time bits 31 .. 16 \\\hline
|
---|
775 | %0x00D & on-time counter at read-out time bits 15 .. 0 \\\hline
|
---|
776 |
|
---|
777 | %0x00E & 1st event Trigger-ID \\\hline
|
---|
778 | %0x00F & 1st event Trigger-ID \\\hline
|
---|
779 | %0x010 & 1st event Trigger-ID \\\hline
|
---|
780 | %0x011 & 1st event Trigger primitives crate 0 \\\hline
|
---|
781 | %0x012 & 1st event Trigger primitives crate 1 \\\hline
|
---|
782 | %0x013 & 1st event Trigger primitives crate 2 \\\hline
|
---|
783 | %0x014 & 1st event Trigger primitives crate 3 \\\hline
|
---|
784 | %0x015 & 1st event Time stamp counter at trigger time bits 47 .. 32 \\\hline
|
---|
785 | %0x016 & 1st event Time stamp counter at trigger time bits 31 .. 16 \\\hline
|
---|
786 | %0x017 & 1st event Time stamp counter at trigger time bits 15 .. 0 \\\hline
|
---|
787 |
|
---|
788 | %0x018 & 2nd event Trigger-ID \\\hline
|
---|
789 | %0x019 & 2nd event Trigger-ID \\\hline
|
---|
790 | %0x01A & 2nd event Trigger-ID \\\hline
|
---|
791 | %0x01B & 2nd event Trigger primitives crate 0 \\\hline
|
---|
792 | %0x01C & 2nd event Trigger primitives crate 1 \\\hline
|
---|
793 | %0x01D & 2nd event Trigger primitives crate 2 \\\hline
|
---|
794 | %0x01E & 2nd event Trigger primitives crate 3 \\\hline
|
---|
795 | %0x01F & 2nd event Time stamp counter at trigger time bits 47 .. 32 \\\hline
|
---|
796 | %0x020 & 2nd event Time stamp counter at trigger time bits 31 .. 16 \\\hline
|
---|
797 | %0x021 & 2nd event Time stamp counter at trigger bits 15 .. 0 \\\hline
|
---|
798 | %... & ...\\\hline
|
---|
799 | %0x1F8 & 50th event Trigger-ID \\\hline
|
---|
800 | %0x1F9 & 50th event Trigger-ID \\\hline
|
---|
801 | %0x1FA & 50th event Trigger-ID \\\hline
|
---|
802 | %0x1FB & 50th event Trigger primitives crate 0 \\\hline
|
---|
803 | %0x1FC & 50th event Trigger primitives crate 1 \\\hline
|
---|
804 | %0x1FD & 50th event Trigger primitives crate 2 \\\hline
|
---|
805 | %0x1FE & 50th event Trigger primitives crate 3 \\\hline
|
---|
806 | %0x1FF & 50th event Time stamp counter at trigger time bits 47 .. 32 \\\hline
|
---|
807 | %0x200 & 50th event Time stamp counter at trigger time bits 31 .. 16 \\\hline
|
---|
808 | %0x201 & 50th event Time stamp counter at trigger bits 15 .. 0 \\\hline
|
---|
809 |
|
---|
810 | %% \end{longtable}
|
---|
811 | %\caption{FTM trigger list}
|
---|
812 | %\label{tab:FTM-trigger-list}
|
---|
813 | %\end{longtable}
|
---|
814 |
|
---|
815 | \section{FTU list}
|
---|
816 | \label{sec:FTU-List}
|
---|
817 | When the FTM board receives the 'ping all FTUs' instruction, it sends a ping
|
---|
818 | command to all FTU boards and gathers the FTU boards responses to a list. This
|
---|
819 | list is called 'FTU list' and shown in table \ref{tab:FTU-list}. The FTM only
|
---|
820 | accepts a ping when no run is ongoing (defined by the 'start run' and 'stop
|
---|
821 | run' commands). When the FTU list is complete, it is sent back via ethernet
|
---|
822 | with the header defined in table~\ref{tab:FTM-header}.
|
---|
823 |
|
---|
824 | \begin{longtable}[h]{|l|l|}\hline
|
---|
825 | address & content\\\hline\hline
|
---|
826 | %0x000 & board ID bit 63 - 48 \\\hline
|
---|
827 | %0x001 & board ID bit 47 - 32\\\hline
|
---|
828 | %0x002 & board ID bit 31 - 16\\\hline
|
---|
829 | %0x003 & board ID bit 15 - 0\\\hline
|
---|
830 | %0x004 & firmware ID \\\hline
|
---|
831 |
|
---|
832 | 0x000 & total number of responding FTU boards\\\hline
|
---|
833 | 0x001 & number of responding FTU boards belonging to crate 0 \\\hline
|
---|
834 | 0x002 & number of responding FTU boards belonging to crate 1 \\\hline
|
---|
835 | 0x003 & number of responding FTU boards belonging to crate 2 \\\hline
|
---|
836 | 0x004 & number of responding FTU boards belonging to crate 3 \\\hline
|
---|
837 | 0x005 & crate number and address of the first responding FTU board \\\hline
|
---|
838 | 0x006 & DNA of first responding FTU board bit 63 ... 48\\\hline
|
---|
839 | 0x007 & DNA of first responding FTU board bit 47 ... 32\\\hline
|
---|
840 | 0x008 & DNA of first responding FTU board bit 31 ... 16\\\hline
|
---|
841 | 0x009 & DNA of first responding FTU board bit 15 ... 0\\\hline
|
---|
842 | 0x00A & crate number and address of the second responding FTU board \\\hline
|
---|
843 | 0x00B & DNA of second responding FTU board bit 63 ... 48\\\hline
|
---|
844 | 0x00C & DNA of second responding FTU board bit 47 ... 32\\\hline
|
---|
845 | 0x00D & DNA of second responding FTU board bit 31 ... 16\\\hline
|
---|
846 | 0x00E & DNA of second responding FTU board bit 15 ... 0\\\hline
|
---|
847 | ... & ...\\\hline
|
---|
848 | \caption{FTU list}
|
---|
849 | \label{tab:FTU-list}
|
---|
850 | \end{longtable}
|
---|
851 |
|
---|
852 | Because there are four connectors for the RS-485 buses, one for each crate,
|
---|
853 | there will be a full scan for all addresses on every connector. In case there
|
---|
854 | is no response to a 'ping' on a certain address, there will be up to two
|
---|
855 | repetitions. A responding FTU board will get an entry into the FTU list (table
|
---|
856 | \ref{tab:FTU-list}) including the number of 'ping' sent until response. The
|
---|
857 | crate number (connector number) and the number of pings are coded together
|
---|
858 | with the FTU board address as shown in table
|
---|
859 | \ref{tab:FTU-crate-number-and-address}. While 'Cr0' and 'Cr1' indicate the
|
---|
860 | crate number (connector number), 'pings\_0' and 'pings\_1' contain the number
|
---|
861 | of 'pings' until response of an FTU board, both coded in binary. The 'DNA' of
|
---|
862 | the FTU board is the device DNA \cite{ds557, ds610, wp267, wp266} of the FPGA
|
---|
863 | on the responding FTU board. This is a unique 57 bit serial number
|
---|
864 | unambiguously identifying every Xilinx FPGA. In the most significant word (bit
|
---|
865 | 63 ... 48) bits 63 town to 57 are filled with zeros.
|
---|
866 |
|
---|
867 | \begin{table}[h]
|
---|
868 | \centering
|
---|
869 | \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|l|l|l|l|}\hline
|
---|
870 | Bit & 15 & 14 & 13 & 12 & 11 & 10 & 9 & 8 & 7 & 6 & 5 & ... & 0 \\\hline
|
---|
871 | Content & Cr1 & Cr0 & pings\_1 & pings\_0 & x & x & x & x & x & x & A5 & ... & A0 \\\hline
|
---|
872 | \end{tabular}
|
---|
873 | \caption{Crate number and address of first responding FTU board}
|
---|
874 | \label{tab:FTU-crate-number-and-address}
|
---|
875 | \end{table}
|
---|
876 |
|
---|
877 | \chapter{FTU communication error handling}
|
---|
878 | \label{cha:Error-handling}
|
---|
879 |
|
---|
880 | When the FTM board is communicating with a FTU board via RS-485, the FTU board
|
---|
881 | has to respond within 5 ms. If this timeout expires, or the response sent back
|
---|
882 | by the FTU board is incorrect, the FTM resends the datapacket after the
|
---|
883 | timeout. If this second attempt is still unsuccessful, a third and last
|
---|
884 | attempt will be made by the FTM board. An error message will be sent to the
|
---|
885 | central control whenever a FTU board does not send a correct answer after the
|
---|
886 | first call by the FTM board. This message (see table~\ref{tab:error-message})
|
---|
887 | contains, after the standard header (see table~\ref{tab:FTM-header}), the
|
---|
888 | number of unsuccessful calls and the data packet sent to the FTU board in
|
---|
889 | these unsuccessful calls. In order to avoid massive error messages for
|
---|
890 | e.g. test setups with single FTUs, the 'active FTU list' can be employed to
|
---|
891 | disable FTUs from the bus. In that case the FTM will not try to contact the
|
---|
892 | corresponding boards.
|
---|
893 |
|
---|
894 | \begin{table}[h]
|
---|
895 | \centering
|
---|
896 | \begin{tabular}{|l|l|}\hline
|
---|
897 | word no & content\\\hline\hline
|
---|
898 | 0x000 & board ID bits 63...48 \\\hline
|
---|
899 | 0x001 & board ID bits 47...32\\\hline
|
---|
900 | 0x002 & board ID bits 31...16\\\hline
|
---|
901 | 0x003 & board ID bits 15...0\\\hline
|
---|
902 | 0x004 & firmware ID \\\hline
|
---|
903 | 0x005 & Trigger counter at read-out time bits 31...16 \\\hline
|
---|
904 | 0x006 & Trigger counter at read-out time bits 15...0\\\hline
|
---|
905 | 0x007 & Time stamp counter at read-out time bits 47...32 \\\hline
|
---|
906 | 0x008 & Time stamp counter at read-out time bits 31...16 \\\hline
|
---|
907 | 0x009 & Time stamp counter at read-out time bits 15...0 \\\hline
|
---|
908 | 0x00A & spare \\\hline
|
---|
909 | 0x00B & number of unsuccessful calls\\\hline
|
---|
910 | 0x00C ... 0x027 & slow control data packet sent to FTU (28 byte)\\\hline
|
---|
911 | \end{tabular}
|
---|
912 | \caption{FTU communication error message}
|
---|
913 | \label{tab:error-message}
|
---|
914 | \end{table}
|
---|
915 |
|
---|
916 | %---------------------------------------------------------------------------------
|
---|
917 |
|
---|
918 | \bibliographystyle{unsrt}
|
---|
919 | %\bibliography{FTM-Com}
|
---|
920 |
|
---|
921 | \begin{thebibliography}{1}
|
---|
922 |
|
---|
923 | \bibitem{DRS4}
|
---|
924 | Paul Scherrer Institut PSI.
|
---|
925 | \newblock {\em DRS4 9 Channel, 5 GSPS Switched Capacitor Array}.
|
---|
926 | \newblock datasheet.
|
---|
927 |
|
---|
928 | \bibitem{LMK03000}
|
---|
929 | National Semiconductor Corporation.
|
---|
930 | \newblock {\em LMK03000 Family Precision Clock Conditioner with integrated
|
---|
931 | VCO}, 2008.
|
---|
932 | \newblock datasheet.
|
---|
933 |
|
---|
934 | \bibitem{FTM-Schematics}
|
---|
935 | ETH Z{\"u}rich, IPP.
|
---|
936 | \newblock {\em FTM Schematics}, 2010.
|
---|
937 |
|
---|
938 | \bibitem{W5300}
|
---|
939 | WIZnet Co.Ltd.
|
---|
940 | \newblock {\em W5300 Fully Hardwired Network protocol Embedded Ethernet
|
---|
941 | Controller}, 2008.
|
---|
942 | \newblock datasheet.
|
---|
943 |
|
---|
944 | \bibitem{ds557}
|
---|
945 | Xilinx.
|
---|
946 | \newblock {\em Spartan-3AN FPGA Family Data Sheet}, 2009.
|
---|
947 |
|
---|
948 | \bibitem{ds610}
|
---|
949 | Xilinx.
|
---|
950 | \newblock {\em Spartan-3A DSP FPGA Family: Data Sheet}, 2009.
|
---|
951 |
|
---|
952 | \bibitem{wp267}
|
---|
953 | Xilinx.
|
---|
954 | \newblock {\em Advanced Security Schemes for Spartan-3A/3AN/3A DSP FPGAs},
|
---|
955 | 2007.
|
---|
956 |
|
---|
957 | \bibitem{wp266}
|
---|
958 | Xilinx.
|
---|
959 | \newblock {\em Security Solutions Using Spartan-3 Generation FPGAs}, 2008.
|
---|
960 |
|
---|
961 | \bibitem{MAX6662}
|
---|
962 | Maxim Integrated Products.
|
---|
963 | \newblock {\em 12-Bit plus Sign Temperature Sensor with SPI-Compatible Serial
|
---|
964 | Interface MAX6662}, 2001.
|
---|
965 | \newblock datasheet.
|
---|
966 |
|
---|
967 | \bibitem{FTUspecs}
|
---|
968 | ETH Z{\"u}rich, IPP.
|
---|
969 | \newblock {\em FTU Firmware Specifications v3}, 2010.
|
---|
970 |
|
---|
971 | \end{thebibliography}
|
---|
972 |
|
---|
973 | \end{document}
|
---|