ADCM Raw Data Format
Version 1.0
ADCM raw data has block structure. One or more data blocks are packed in M-Link frames with frame type 0x0100. Ignore other frame types, it is not ADCM data but special service data. Data block may not be fragmented, it should fit in one frame. Data block size should be multiple of 4 bytes.
Data block starts with the header word. Bits 26:31 contain data block ID and define the structure of the data block.
ID=0, ADC data |
|||
word |
bits |
width |
description |
0 |
3:0 |
4 |
Number of ADC bits (10-14) |
5:4 |
2 |
Number of samples per word = 2 |
|
17:6 |
12 |
Number of samples (0-4095) |
|
25:18 |
8 |
Channel number (0..255) |
|
31:26 |
6 |
data block ID = 0 |
|
1 |
15:0 |
16 |
Event count |
31:16 |
16 |
Burst count |
|
2 |
15:0 |
16 |
sample 1 |
31:16 |
16 |
sample 2 |
|
... |
|||
n/2+1 |
15:0 |
16 |
sample n-1 |
31:16 |
16 |
sample n |
|
n/2+2 |
31:0 |
32 |
Event timestamp |
n/2+4 |
31:0 |
32 |
constant |
ID=1, ADC counters |
|||
word |
bits |
width |
description |
0 |
4:0 |
4 |
Number of words per channel |
12:5 |
8 |
Number of channels |
|
25:13 |
13 |
reserved |
|
31:26 |
6 |
data block ID = 1 |
|
1 |
31:0 |
32 |
hit count, channel 1 |
... |
|||
N |
31:0 |
32 |
hit count, channel N |
N+1 |
31:0 |
32 |
Event timestamp |
ID=2, ADC data rev.2 |
|||
word |
bits |
width |
description |
0 |
3:0 |
4 |
Number of ADC bits (10-14) |
5:4 |
2 |
Number of samples per word = 2 |
|
6 |
1 |
Last fragment flag |
|
17:7 |
11 |
Number of samples in fragment / 2 (0-2047) |
|
25:18 |
8 |
Channel number (0..255) |
|
31:26 |
6 |
data block ID = 2 |
|
1 |
15:0 |
16 |
Event count |
31:16 |
16 |
Fragment number |
|
2 |
15:0 |
16 |
sample 1 |
31:16 |
16 |
sample 2 |
|
... |
|||
n/2+1 |
15:0 |
16 |
sample n-1 |
31:16 |
16 |
sample n |
|
n/2+2 |
31:0 |
32 |
Event timestamp |
n/2+4 |
31:0 |
32 |
constant |