TQDC16VS-E Data Format
Hardware TQDC16VS-E
TQDC16VS-E payload data is encapsulated in M-Stream 2.2 protocol using Data Subtype 0.
M-Stream Header |
|||||||||||||||||||||||||||||||
word # |
byte offset |
bits |
description |
||||||||||||||||||||||||||||
0 |
0 |
31:24 |
|||||||||||||||||||||||||||||
23:18 |
Flags |
||||||||||||||||||||||||||||||
17:16 |
Subtype |
||||||||||||||||||||||||||||||
15:0 |
Fragment length, 4*(N-2) |
||||||||||||||||||||||||||||||
1 |
4 |
31:16 |
Packet ID |
||||||||||||||||||||||||||||
15:0 |
Fragment offset (bytes) |
||||||||||||||||||||||||||||||
M-Stream Subtype 0, first fragment |
|||||||||||||||||||||||||||||||
2 |
8 |
31:0 |
Device Serial |
||||||||||||||||||||||||||||
3 |
12 |
31:24 |
reserved |
||||||||||||||||||||||||||||
23:0 |
Event number |
||||||||||||||||||||||||||||||
4 |
16 |
31:0 |
Event timestamp, TAI seconds |
||||||||||||||||||||||||||||
5 |
20 |
31:2 |
Event timestamp, TAI nanoseconds |
||||||||||||||||||||||||||||
1:0 |
Event timestamp, TAI flags |
||||||||||||||||||||||||||||||
6 |
24 |
31:0 |
Event Data |
||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
N-1 |
4*(N-1) |
31:0 |
|||||||||||||||||||||||||||||
M-Stream Subtype 0, next fragments |
|||||||||||||||||||||||||||||||
2 |
8 |
31:0 |
Event Data |
||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
N-1 |
4*(N-1) |
31:0 |
Event Data format
word # |
byte offset |
bits |
description |
0 |
0 |
31:0 |
Data Block #1 (S1 bytes) |
... |
|||
S1/4-1 |
S1-4 |
31:0 |
|
S1/4 |
S1 |
31:0 |
Data Block #2 (S2 bytes) |
... |
|||
(S1+S2)/4-1 |
S1+S2-4 |
31:0 |
|
... |
|||
Till the last data block |
|||
... |
Data Block format
word # |
byte offset |
bits |
description |
0 |
0 |
31:28 |
Data Type |
27:24 |
Channel number |
||
23:19 |
reserved |
||
18:16 |
ADC Data Block specific |
||
15:0 |
Data Payload length (4*(N-1) bytes) |
||
1 |
4 |
31:0 |
Data Payload |
... |
|||
N-1 |
4*(N-1) |
31:0 |
TDC Data Block
- TDC data type is 0x0.
- channel number field not used
TDC Data Payload
2 - TDC event header |
|||||||||||||||||||||||||||||||
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 |
2 |
TDC ID |
Event number |
TDC timestamp |
TDC timestamp in number of 25 ns time intervals since global trigger timestamp found in event header.
3 - TDC event trailer |
|||||||||||||||||||||||||||||||
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 |
3 |
TDC ID |
Event number |
TDC word count |
4 - TDC data, leading edge |
|||||||||||||||||||||||||||||||
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 |
4 |
reserved |
channel |
data |
5 - TDC data, trailing edge |
|||||||||||||||||||||||||||||||
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 |
5 |
reserved |
channel |
data |
TDC time measurement
- data bits 20:2 = number of 100 ps time intervals since global trigger timestamp found in event header;
- data bits 1:0 = rcdata[1:0].
6 - TDC error |
|||||||||||||||||||||||||||||||
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 |
6 |
TDC ID |
reserved |
TDC error flags |
TDC error flags bits:
- [0] Hit lost in group 0 from read-out fifo overflow
- [1] Hit lost in group 0 from L1 buffer overflow
- [2] Hit error have been detected in group 0
- [3] Hit lost in group 1 from read-out fifo overflow
- [4] Hit lost in group 1 from L1 buffer overflow
- [5] Hit error have been detected in group 1
- [6] Hit lost in group 2 from read-out fifo overflow
- [7] Hit lost in group 2 from L1 buffer overflow
- [8] Hit error have been detected in group 2
- [9] Hit lost in group 3 from read-out fifo overflow
- [10] Hit lost in group 3 from L1 buffer overflow
- [11] Hit error have been detected in group 3
- [12] Hits rejected because of programmed event size limit
- [13] Event lost (trigger FIFO ovefrlow)
- [14] Internal fatal chip error has been detected
Most important error bits are 12 and 13. Error bit 14 should be ignored.
For detailed description of TDC please refer to HPTDC manual.
ADC Data Block
- ADC data type is 0x1.
ADC Data Block specific bits:
- [16] - reserved
- [17] - ADC header FIFO overflow (mfifo)
- [18] - reserved
Each ADC data block may include several signals. Each signal data starts with header followed by digitizer data.
ADC header |
|||||||||||||||||||||||||||||||
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 |
ADC data length (in bytes) |
ADC Timestamp |
ADC timestamp is number of 8 ns intervals after event timestamp.
ADC Data |
|||||||||||||||||||||||||||||||
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 |
Word N+1 |
Word N |
If number of ADC words is odd, then bits [31:16] of last ADC data payload word should be 0x0000.
ADC data alligned to MSB.