1 | \documentclass[a4paper,twoside]{article}
|
---|
2 |
|
---|
3 | \setlength{\topmargin}{0mm} %1 inch is always there!
|
---|
4 | \setlength{\oddsidemargin}{0mm} %1 inch is always there!
|
---|
5 | \setlength{\evensidemargin}{0mm} %1 inch is always there!
|
---|
6 |
|
---|
7 | \setlength{\textwidth}{16cm}
|
---|
8 | \setlength{\textheight}{25cm}
|
---|
9 |
|
---|
10 |
|
---|
11 | \setlength{\headheight}{0mm}
|
---|
12 | \setlength{\headsep}{0mm}
|
---|
13 |
|
---|
14 | \usepackage[T1]{fontenc}
|
---|
15 | \usepackage[utf8]{inputenc}
|
---|
16 |
|
---|
17 | \usepackage{graphicx} % for pictures
|
---|
18 | \usepackage{float} % for figures (english)
|
---|
19 | \restylefloat{figure}
|
---|
20 | \restylefloat{table}
|
---|
21 |
|
---|
22 | \usepackage{arydshln}
|
---|
23 |
|
---|
24 | \title{FAD Data Generation}
|
---|
25 | \author{D. Neise}
|
---|
26 | \date{08.02.2011}
|
---|
27 |
|
---|
28 | \begin{document}
|
---|
29 |
|
---|
30 | \maketitle
|
---|
31 | \tableofcontents
|
---|
32 | \newpage
|
---|
33 |
|
---|
34 |
|
---|
35 | \section{data order in 64bit address space}
|
---|
36 |
|
---|
37 | When data is input into Data-RAM by the DataGenerator, the data is fed in as words of 64bit.
|
---|
38 |
|
---|
39 | Each Event constists of an EventHeader, the so called ChannelData, and a small EventFooter.
|
---|
40 | Figure (\ref{64bitRAM}) shows how the data is stored as 64bit words in the DataRAM.
|
---|
41 | Assume the Event Start-Address beeing {\tt 0x2000} and each package of ChannelData consists 100 samples.
|
---|
42 | \\ \\
|
---|
43 | %\emph{Erklaeren, dass auch wenn nur ein channel kleiner ist, die selbe Anzahl Daten versendet wird.}
|
---|
44 |
|
---|
45 |
|
---|
46 | \begin{table}[htbp]
|
---|
47 | \begin{tabular}{||l||l|l|l|l||l||}
|
---|
48 | \hline
|
---|
49 | address & word 3 & word 2 & word 1 & word 0 & description \\
|
---|
50 | \hline
|
---|
51 | 0x2000 & 0x0000 & version & length & 0xFB01 & Header \\
|
---|
52 | 0x2001 & 0x0000 & TRG ID 45 & EVT cntr 10 & EVT cntr 32 & Externl trigger ID\\
|
---|
53 | 0x2002 & 0x0000 & TRG ID 45 & EVT cntr 10 & EVT cntr 32 & Internal trigger ID\\
|
---|
54 | 0x2003 & 0x0000 & 0x0000 & 0x0000 & 0x0(cid)8(bid) & Board ID \\
|
---|
55 | 0x2004 & Temp 3 & Temp 2 & Temp 1 & Temp 0 & Temperatures \\
|
---|
56 | 0x2005 & DAC 3 & DAC 2 & DAC 1 & DAC 0 & DAC values part 1 \\
|
---|
57 | 0x2006 & DAC 7 & DAC 6 & DAC 5 & DAC 4 & DAC values part 2 \\
|
---|
58 | \hline
|
---|
59 | 0x2007 & 0x0030 & 0x0020 & 0x0010 & 0x0000 & chip-n-channel ID (group 0) \\
|
---|
60 | 0x2008 & trg pos 3 & trg pos 2 & trg pos 1 & trg pos 0 & DRS stop positions \\
|
---|
61 | 0x2009 & ROI 3 & ROI 2 & ROI 1 & ROI 0 & width of region of interest \\
|
---|
62 | 0x200A & data adc3 & data adc2 & data adc1 & data adc0 & ADC Data start of ROI \\
|
---|
63 | 0x20.. &&&&& ... \\
|
---|
64 | 0x206D & data adc3 & data adc2 & data adc1 & data adc0 & ADC Data end of ROI \\
|
---|
65 | \hline
|
---|
66 | 0x206E & 0x0031 & 0x0021 & 0x0011 & 0x0001 & chip-n-channel ID (group 1) \\
|
---|
67 | 0x206F & trg pos 3 & trg pos 2 & trg pos 1 & trg pos 0 & DRS stop positions \\
|
---|
68 | 0x2070 & ROI 3 & ROI 2 & ROI 1 & ROI 0 & width of region of interest \\
|
---|
69 | 0x2071 & data adc3 & data adc2 & data adc1 & data adc0 & ADC Data start of ROI \\
|
---|
70 | 0x20.. &&&&& ... \\
|
---|
71 | 0x20D4 & data adc3 & data adc2 & data adc1 & data adc0 & ADC Data end of ROI \\
|
---|
72 | \hline
|
---|
73 | 0x20.. &&&&& ... \\
|
---|
74 | \hline
|
---|
75 | 0x233F & 0x0039 & 0x0029 & 0x0019 & 0x0009 & chip-n-channel ID (group 9) \\
|
---|
76 | 0x2340 & trg pos 3 & trg pos 2 & trg pos 1 & trg pos 0 & DRS stop positions \\
|
---|
77 | 0x2341 & ROI 3 & ROI 2 & ROI 1 & ROI 0 & width of region of interest \\
|
---|
78 | 0x2342 & data adc3 & data adc2 & data adc1 & data adc0 & ADC Data start of ROI \\
|
---|
79 | 0x23.. &&&&& ... \\
|
---|
80 | 0x23A5 & data adc3 & data adc2 & data adc1 & data adc0 & ADC Data end of ROI \\
|
---|
81 | \hline
|
---|
82 | 0x23A6 & 0x0000 & 0x0000 & 0x04FE & 0x4242 & FOOTER \\
|
---|
83 | \hline
|
---|
84 | \end {tabular}
|
---|
85 |
|
---|
86 | \caption{word order of event in Data RAM. 64bit addressing. As of 08.02.2011}
|
---|
87 | \label{64bitRAM}
|
---|
88 | \end{table}
|
---|
89 |
|
---|
90 |
|
---|
91 | During DRS readout and data digitzation, the Trigger ID is coming in through RS485 interface from FTM board.
|
---|
92 | The Trigger ID reciption takes about $40 {\mu}$s. Therefor the 2 words containing Trigger information in the EventHeader are
|
---|
93 | left empty in the first place. The digitazed analog data is read in as quickly as possible. Only after finishing the Readout,
|
---|
94 | the Trigger ID is filled into the EventHeader.
|
---|
95 | Then the EventFooter is added and the Readout is finished.
|
---|
96 |
|
---|
97 | \newpage
|
---|
98 | \section{data order in 16bit address space}
|
---|
99 |
|
---|
100 | After an Event is stored in data RAM, is is ready to be read out by {\tt w5300 modul.vhd}.
|
---|
101 | Since the FIFOs of FADs W5300 ethernet controller are of 16bit width, data is read out of the dataRAM
|
---|
102 | as 16bit words. Empty 16bit words are left out.
|
---|
103 |
|
---|
104 | The following table shows how the data is ordered inside data RAM, when accessed in 16bit address space
|
---|
105 |
|
---|
106 | \begin{table}[htbp]
|
---|
107 | \begin{tabular}{|l|l|l|}
|
---|
108 | \hline
|
---|
109 | address & 16bit word & description \\
|
---|
110 | \hline
|
---|
111 | 0x8000 & 0xFB01 & Start Flag - fix value \\
|
---|
112 | 0x8001 & 0xllll & package length in 16bit words \\
|
---|
113 | 0x8002 & 0xvvvv & version - deduced from SVN revision number \\
|
---|
114 | 0x8004 & EVT cntr 32 & trigger ID upper word \\
|
---|
115 | 0x8005 & EVT cntr 10 & trigger ID lower word \\
|
---|
116 | 0x8006 & 0xAA55 & trigger type and CRC-fake \\
|
---|
117 | 0x8008 & EVT cntr 32 & trigger ID upper word \\
|
---|
118 | 0x8009 & EVT cntr 10 & trigger ID lower word \\
|
---|
119 | 0x800A & 0xAA55 & trigger type and CRC-fake \\
|
---|
120 | 0x800C & 0x0(cid)8(bid) & Board ID \\
|
---|
121 | 0x8010 & 0xttt0 & temperature sensor next to DRS 0 \\
|
---|
122 | 0x8011 & 0xttt1 & temperature sensor next to DRS 1 \\
|
---|
123 | 0x8012 & 0xttt2 & temperature sensor next to DRS 2 \\
|
---|
124 | 0x8013 & 0xttt3 & temperature sensor next to DRS 3 \\
|
---|
125 | 0x8014 & 0xdac0 & setting of DAC channel A \\
|
---|
126 | 0x8015 & 0xdac1 & setting of DAC channel B \\
|
---|
127 | 0x8016 & 0xdac2 & setting of DAC channel C \\
|
---|
128 | 0x8017 & 0xdac3 & setting of DAC channel D \\
|
---|
129 | 0x8018 & 0xdac4 & setting of DAC channel E \\
|
---|
130 | 0x8019 & 0xdac5 & setting of DAC channel F \\
|
---|
131 | 0x801A & 0xdac6 & setting of DAC channel G \\
|
---|
132 | 0x801B & 0xdac7 & setting of DAC channel H \\
|
---|
133 | \hline
|
---|
134 | 0x801C & 0x0000 & DRS 0 - channel 0 \\
|
---|
135 | 0x8020 & trg pos 0 & DRS 0 stop position \\
|
---|
136 | 0x8024 & ROI 00 & ROI width of this channel \\
|
---|
137 | 0x8028 & adc data 0& ADC data start \\
|
---|
138 | 0x8... & ... & ...data ... \\
|
---|
139 | 0x81B4 & adc data ROI-1 & ADC data stop\\
|
---|
140 | \hline
|
---|
141 | 0x801D & 0x0010 & DRS 1 - channel 0 \\
|
---|
142 | 0x8021 & trg pos 1 & DRS 1 stop position \\
|
---|
143 | 0x8025 & ROI 10 & ROI width of this channel \\
|
---|
144 | 0x8029 & adc data 0& ADC data start \\
|
---|
145 | 0x8... & ... & ...data ... \\
|
---|
146 | 0x81B5 & adc data ROI-1 & ADC data stop\\
|
---|
147 | \hline
|
---|
148 | 0x8... & ... & ...data ... \\
|
---|
149 | \hline
|
---|
150 | 0x8CFC & 0x0039 & DRS 3 - channel 9 \\
|
---|
151 | 0x8D03 & trg pos 3 & DRS 3 stop position \\
|
---|
152 | 0x8D07 & ROI 39 & ROI width of this channel \\
|
---|
153 | 0x8D0B & adc data 0& ADC data start \\
|
---|
154 | 0x8... & ... & ...data ... \\
|
---|
155 | 0x8E97 & adc data ROI-1 & ADC data stop\\
|
---|
156 | \hline
|
---|
157 | 0x8E98 & 0x4242 & packet CRC-fake \\
|
---|
158 | 0x8E99 & 0x04FE & End Flag \\
|
---|
159 | \hline
|
---|
160 | \end {tabular}
|
---|
161 |
|
---|
162 | \caption{word order of event in Data RAM. 16bit addressing. As of 08.02.2011}
|
---|
163 | \label{16bitRAM}
|
---|
164 | \end{table}
|
---|
165 |
|
---|
166 | As one can see, the way of reading out of the RAM changes, from header to data section and again when data section ends.
|
---|
167 | When reading the header, the addresses are increased by 1 usually and only jumps, when empty words show up in the RAM.
|
---|
168 | One can picture it as if reading the words in each line from right to left, sometimes jumping over zeroes.
|
---|
169 | When reading out the data sections, the words are read out as columns, i.e. addresses are incremented by 4 usually. One column is read until the data of a channel is completely read out, then either the next DRS chip is read out, which means to decrease the address or, if one group of channels was finished, the next group starts, which means address is increased by 1 only.
|
---|
170 | The footer consisting of the CRC-16 (when finally implemented) and the end package flag is again read out by reading each word from right to left.
|
---|
171 |
|
---|
172 |
|
---|
173 | \newpage
|
---|
174 | \section{NEW data order}
|
---|
175 |
|
---|
176 | Some data is going to be added to the Event header changing the data order like this.
|
---|
177 |
|
---|
178 | \begin{table}[htbp]
|
---|
179 | \begin{tabular}{||l||l|l|l|l||}
|
---|
180 | \hline
|
---|
181 | address & word 3 & word 2 & word 1 & word 0 \\
|
---|
182 | \hline
|
---|
183 | 0x2000 & 12bit status + PLLLOCK & version & length & 0xFB01 \\
|
---|
184 | 0x2001 & 0xT1T0 & 0xT3T2 & 0xT5T4 & 0x00T6 \\
|
---|
185 | 0x2002 & REFCLK cntr 10 & REFCLK cntr 32 & EVT cntr 10 & EVT cntr 32 \\
|
---|
186 | 0x2003 & TRG-GEN-DIV & TRG-GEN-No & DCM-PS-STATUS & 0x0(cid)8(bid) \\
|
---|
187 | 0x2004 & DNA10 & DNA32 & DNA54 & 0x00DNA6 \\
|
---|
188 | 0x2005 & more status & more status & time10 & time32 \\
|
---|
189 | 0x2006 & Temp 3 & Temp 2 & Temp 1 & Temp 0 \\
|
---|
190 | 0x2007 & DAC 3 & DAC 2 & DAC 1 & DAC 0 \\
|
---|
191 | 0x2008 & DAC 7 & DAC 6 & DAC 5 & DAC 4 \\
|
---|
192 | \hline
|
---|
193 | 0x2009 & 0x0030 & 0x0020 & 0x0010 & 0x0000 \\
|
---|
194 | 0x200A & trg pos 3 & trg pos 2 & trg pos 1 & trg pos 0 \\
|
---|
195 | 0x200B & ROI 3 & ROI 2 & ROI 1 & ROI 0 \\
|
---|
196 | 0x200C & -fill- & -fill- & -fill- & -fill- \\
|
---|
197 | 0x200D & data adc3 & data adc2 & data adc1 & data adc0 \\
|
---|
198 | 0x20.. & ... & ... & ... & ... \\
|
---|
199 | 0x2070 & data adc3 & data adc2 & data adc1 & data adc0 \\
|
---|
200 | \hline
|
---|
201 | 0x20.. & ... & ... & ... & ... \\
|
---|
202 | \hline
|
---|
203 | 0x23?? & 0x0039 & 0x0029 & 0x0019 & 0x0009 \\
|
---|
204 | 0x23?? & trg pos 3 & trg pos 2 & trg pos 1 & trg pos 0 \\
|
---|
205 | 0x23?? & ROI 3 & ROI 2 & ROI 1 & ROI 0 \\
|
---|
206 | 0x23?? & -fill- & -fill- & -fill- & -fill- \\
|
---|
207 | 0x23?? & data adc3 & data adc2 & data adc1 & data adc0 \\
|
---|
208 | 0x23.. & ... & ... & ... & ... \\
|
---|
209 | 0x23?? & data adc3 & data adc2 & data adc1 & data adc0 \\
|
---|
210 | \hline
|
---|
211 | 0x23?? & 0x0000 & 0x0000 & 0x04FE & 0x4242 \\
|
---|
212 | \hline
|
---|
213 | \end {tabular}
|
---|
214 | \caption{NEW word order of event in Data RAM. 64bit addressing. As of > 08.02.2011}
|
---|
215 | \label{new64bitRAM}
|
---|
216 | \end{table}
|
---|
217 |
|
---|
218 | A detailed description is given after, next table.\\
|
---|
219 |
|
---|
220 | \newpage
|
---|
221 | Which in turn changes the the word order in the 16bit address space like this
|
---|
222 | \begin{table}[htbp]
|
---|
223 | \begin{tabular}{|l|l|l|}
|
---|
224 | \hline
|
---|
225 | address & 16bit word & description \\
|
---|
226 | \hline
|
---|
227 | 0x8000 & 0xFB01 & Start Flag - fix value: "FB01" \\
|
---|
228 | 0x8001 & 0xllll & package length in 16bit words \\
|
---|
229 | 0x8002 & 0xvvvv & version - deduced from SVN revision number \\
|
---|
230 | 0x8003 & 0xsssP & 12 bits for status - TBD - 4 bit showing PLLLCK status \\
|
---|
231 | \hdashline
|
---|
232 | 0x8004 & 0x00T6 & FTM trigger ID byte 6 : CRC \\
|
---|
233 | 0x8005 & 0xT5T4 & ... bytes 5 and 4 : Type 2 and Type 1\\
|
---|
234 | 0x8006 & 0xT3T2 & ... bytes 3 and 2 : TRG number high word \\
|
---|
235 | 0x8007 & 0xT1T0 & ... bytes 1 and 0 : TRG number low word \\
|
---|
236 | \hdashline
|
---|
237 | 0x8008 & 0xev32 & FAD event counter high word \\
|
---|
238 | 0x8009 & 0xev10 & FAD event counter low word -- should be equal to T3T2T1T0\\
|
---|
239 | 0x800A & 0xRC32 & REFCLK counter high word \\
|
---|
240 | 0x800B & 0xRC10 & REFCLK counter low word \\
|
---|
241 | \hdashline
|
---|
242 | 0x800C & 0x0(cid)8(bid) & Board ID \\
|
---|
243 | 0x800D & DCM-PS & status of ADC clock phase shifter , value and locked-bit\\
|
---|
244 | 0x800E & TRG-GEN-No& Number of Triggers to generare, when 'trigger continous' issued \\
|
---|
245 | 0x800F & TRG-GEN-DIV& continous trigger generator clock prescaler \\
|
---|
246 | \hdashline
|
---|
247 | 0x8010 & 0x00 DNA6 & MSB of DNA \\
|
---|
248 | 0x8011 & DNA54 & ... DNA ... \\
|
---|
249 | 0x8012 & DNA32 & ... DNA ... \\
|
---|
250 | 0x8013 & DNA10 & LSB of DNA \\
|
---|
251 | \hdashline
|
---|
252 | 0x8014 & timer32 & timer high word \\
|
---|
253 | 0x8015 & timer10 & timer low word \\
|
---|
254 | 0x8016 & more status1 & reserved for status info; high word \\
|
---|
255 | 0x8017 & more status0 & reserved for status info; low word \\
|
---|
256 | \hdashline
|
---|
257 | 0x8018 & 0xttt0 & temperature sensor next to DRS 0 \\
|
---|
258 | 0x8019 & 0xttt1 & temperature sensor next to DRS 1 \\
|
---|
259 | 0x801A & 0xttt2 & temperature sensor next to DRS 2 \\
|
---|
260 | 0x801B & 0xttt3 & temperature sensor next to DRS 3 \\
|
---|
261 | \hdashline
|
---|
262 | 0x801C & 0xdac0 & setting of DAC channel A \\
|
---|
263 | 0x801D & 0xdac1 & setting of DAC channel B \\
|
---|
264 | 0x801E & 0xdac2 & setting of DAC channel C \\
|
---|
265 | 0x801F & 0xdac3 & setting of DAC channel D \\
|
---|
266 | \hdashline
|
---|
267 | 0x8020 & 0xdac4 & setting of DAC channel E \\
|
---|
268 | 0x8021 & 0xdac5 & setting of DAC channel F \\
|
---|
269 | 0x8022 & 0xdac6 & setting of DAC channel G \\
|
---|
270 | 0x8023 & 0xdac7 & setting of DAC channel H \\
|
---|
271 | \hline
|
---|
272 | 0x8... & ... & ...data ... \\
|
---|
273 | \hline
|
---|
274 |
|
---|
275 | \end {tabular}
|
---|
276 | \caption{word order of event in Data RAM. 16bit addressing. As of > 08.02.2011}
|
---|
277 | \label{16bitRAM}
|
---|
278 | \end{table}
|
---|
279 | This new order has several advantages apart from the additional information included.
|
---|
280 | All data may be treated as 64bit aligned. And the data readout process does not need jump over words during data sending.
|
---|
281 |
|
---|
282 |
|
---|
283 | \newpage
|
---|
284 | \subsection{new {\tt FADFormat.h}}
|
---|
285 |
|
---|
286 | \begin{verbatim}
|
---|
287 | typedef struct {
|
---|
288 | // ------------------------------
|
---|
289 | unsigned short start_package_flag;
|
---|
290 | unsigned short package_length;
|
---|
291 | unsigned short version_no;
|
---|
292 | unsinged short PLLLCK;
|
---|
293 | // ------------------------------
|
---|
294 | unsigned short trigger_crc;
|
---|
295 | unsigned short tigger_type;
|
---|
296 | unsigned long trigger_id;
|
---|
297 | // ------------------------------
|
---|
298 | unsigned long fad_evt_counter;
|
---|
299 | unsigned long REFCLK_frequency;
|
---|
300 | // ------------------------------
|
---|
301 | unsigned short board_id;
|
---|
302 | unsigned short adc_clock_phase_shift;
|
---|
303 | unsgined short number_of_triggers_to_generate;
|
---|
304 | unsigned short trigger_generator_prescaler;
|
---|
305 | // ------------------------------
|
---|
306 | unsigned char reserved;
|
---|
307 | unsigned char DNA[7]; // '1' & 55 unique bits of Xilinx DNA
|
---|
308 | // ------------------------------
|
---|
309 | unsigned long time;
|
---|
310 | unsigned long fad_status;
|
---|
311 | // ------------------------------
|
---|
312 | short drs_temperature[NTemp];
|
---|
313 | // ------------------------------
|
---|
314 | unsigned short dac[NDAC];
|
---|
315 | // ------------------------------
|
---|
316 | } __attribute__((__packed__)) PEVNT_HEADER;
|
---|
317 |
|
---|
318 | typedef struct {
|
---|
319 | unsigned short id;
|
---|
320 | unsigned short start_cell;
|
---|
321 | unsigned short roi;
|
---|
322 | unsigned short filling;
|
---|
323 | unsigned short adc_data[];
|
---|
324 | } __attribute__((__packed__)) PCHANNEL;
|
---|
325 |
|
---|
326 | typedef struct {
|
---|
327 | unsigned short package_crc;
|
---|
328 | unsigned short end_package_flag;
|
---|
329 | } __attribute__((__packed__)) PEVNT_FOOTER;
|
---|
330 | \end{verbatim}
|
---|
331 |
|
---|
332 | \subsection{mem manager calculations}
|
---|
333 |
|
---|
334 | Memory manager knows the size of FADs internal data RAM. This is implemented as VHDL-Generics called RAM\_ADD\_WIDTH\_64B
|
---|
335 | and RAM\_ADD\_WIDTH\_16B. Since word width is 64bit on the input side and 16bit on the outpt two generics are used.
|
---|
336 | Currently the values are:
|
---|
337 | \begin{table}[htbp]
|
---|
338 | \begin{tabular}{ll}
|
---|
339 | RAM\_ADD\_WIDTH\_64B & 12 \\
|
---|
340 | RAM\_ADD\_WIDTH\_16B & 14 \\
|
---|
341 | \end {tabular}
|
---|
342 | \caption{values of RAM width}
|
---|
343 | \label{RAM_GENERICS}
|
---|
344 | \end{table}
|
---|
345 |
|
---|
346 | Which results in
|
---|
347 | \begin{equation}
|
---|
348 | \mathtt{RAM size} = 2^{12} \cdot 8 byte= 2^14 * 2 byte = 32768 byte .
|
---|
349 | \end{equation}
|
---|
350 |
|
---|
351 | Now the memory manager is able to calculate the number of Events, fitting into this RAM.
|
---|
352 |
|
---|
353 | The number of samples of each channel beeing digitized is called region of interest(ROI). Since the ROI of each of the 36 input channel may be defined independently, but the RAM is organized in 64bit words on the input side, the memory manager needs to calculate the effective ROI of each channel first. The DRS Chips are digitized in a parallel manner, but their 9 channels are digitized serially. So first each DRS is ordered to output its channel 0 data, until as many samples are digitized as the maximum of all channel 0 ROIs is.
|
---|
354 |
|
---|
355 | In the states called MAX\_ROI0..2 the array containing the maxima of each group of channels is calculated.
|
---|
356 | In addition the so called channel size array is calculated. This is the number of 16bit words which is needed to store a group of
|
---|
357 | channels in the W5300 FIFO. The header is included into the group of channels 0, while the package footer is included into group of channels 9.
|
---|
358 |
|
---|
359 | \subsubsection{state: MM CONFIG}
|
---|
360 | Here all local variables are reset to zero. Let me shortly explain the meaning of each of them:
|
---|
361 | \begin{table}[htbp]
|
---|
362 | \begin{tabular}{lll}
|
---|
363 | roi\_max\_array & array (0 to 8) of integer range 0 to 1024 & maximum for each channel group\\
|
---|
364 | channel\_size & array (0 to 8) of integer range 0 to W5300\_TX\_FIFO\_SIZE & size of each channel group in 16b words \\
|
---|
365 | fifo\_write\_length & array (0 to 8) of integer range 0 to W5300\_TX\_FIFO\_SIZE & similar ??? \\
|
---|
366 | fifo\_channels\_array & array (0 to 8) of integer range 0 to 9 & ??? \\
|
---|
367 | \hline \\
|
---|
368 | event\_size & integer range 0 to RAM\_SIZE\_16B & ???\\
|
---|
369 | event\_size\_ram & integer range 0 to RAM\_SIZE\_16B & ???\\
|
---|
370 | event\_size\_ram\_64b & integer range 0 to RAM\_SIZE\_64B & ??? \\
|
---|
371 | \end {tabular}
|
---|
372 | \caption{ -no caption- -no label-}
|
---|
373 | %\label{}
|
---|
374 | \end{table}
|
---|
375 |
|
---|
376 | The input is only:
|
---|
377 | \begin{table}[htbp]
|
---|
378 | \begin{tabular}{lll}
|
---|
379 | roi\_array & array (0 to 35) of integer range 0 to 1024 & ROI of each channel\\
|
---|
380 | \end {tabular}
|
---|
381 | \caption{ -no caption- -no label-}
|
---|
382 | %\label{}
|
---|
383 | \end{table}
|
---|
384 |
|
---|
385 | \subsubsection{states: MAX ROI\bf{n} and state: FIFO\_CALC}
|
---|
386 | \begin{itemize}
|
---|
387 | \item find maxium in roi\_array for each channel and store it as the maximum roi of each channel group inside roi\_max\_array.
|
---|
388 | \item calculate channel\_size(n) as $sum_{drs=0}^{3} \left( roi_{drs,n} + CHANNEL\_HEADER\_SIZE \right)$.
|
---|
389 | For $n=0$ the size of the package header is added and for $n=8$ the size of the package footer is added to the channel\_size.
|
---|
390 | So channel\_size(n) stores the number of 16bit words, which will be transmitted over ethernet for this particular group of channels n. \\
|
---|
391 | Note: this is not the number of 16bit words, which will be stored inside the internal data RAM, since this number is defined by the maximum roi of each channel group.
|
---|
392 | \item calculate into how many pieces the package need to be devided. fifo\_write\_length(m) contains a certain sum of channel\_sizes. So again
|
---|
393 | fifo\_write\_length is a size measures in 16bit words, which will actually be transmitted over ethernet.
|
---|
394 | \end{itemize}
|
---|
395 |
|
---|
396 |
|
---|
397 | \subsubsection{states: RAM\_CALC\bf{n}}
|
---|
398 | Here we need to know how many of these packages will fit into our data RAM.
|
---|
399 | There
|
---|
400 |
|
---|
401 | \end{document}
|
---|