MSC16VE - Ethernet Readout RAW Data Format

Hardware: MSC16VE

MSC16VE payload data is encapsulated in M-Stream 2.2 protocol using Data Subtype 2.

MSC16VE Ethernet Readout Data Format

word #

byte offset

bits

description

0-1

0

31:0

M-Stream header, 2 words

2-3

0

31:0

M-Stream subtype 2 header, 2 words

M-Stream User Payload, subtype 2

4

16

31:0

Timestamp of slice #0 in packet, TAI seconds

5

20

31:2

Timestamp of slice #0 in packet, TAI nanoseconds

1:0

Timestamp of slice #0 in packet, TAI flags

6

24

31:28

MSC Data Version

27:4

reserved

3:0

Counter Bits

7

28

31:0

Slice interval, nanoseconds

8

32

31:0

MSC time slice data

...

S-1

4*(S-1)

31:0

...

Till the last time slice in M-Stream packet

...

31:0

MSC time slice data

...

N-1

4*(N-1)

31:0

N

4*N

31:0

Padding words (optional, could be any number)

MSC time slice data block format

Time slice data block is split in several words, distinguished by word type. Every data block ends with word type E - slice info word. Type is one of the following:

Type, bin

Type, hex

Description

0000

0

Counters data

0001

1

0010

2

0011

3

0100

4

0101

5

0110

6

0111

7

1000

8

1001

9

1010

A

1011

B

1100

C

1101

D

1110

E

Time slice info

Time slice info word (28 bits): * [27:24] - external conditions (LVTTL inputs) * [23:0] - time slice number

Every counter data word can consist of one or several channel counts, depends on counters bits defined earlier. Counts from channels with lowest channel number are placed into word type 0x0, next channels counts are placed into word type 0x1, etc. Time slice number resets for every M-Stream packet. If some channel counts word has only zero counts in given time slice, than it won't be packed in data. If every channel in given time slice has zero count, than full slice won't be packed in data.

For example, 16 channels with 7 bits counters will be packed as follow (assuming every word has non-zero counts):

word #

bits

description

0

31:28

Word type - 0x0

27:21

Channel #3 counts

20:14

Channel #2 counts

13:8

Channel #1 counts

7:0

Channel #0 counts

1

31:28

Word type - 0x1

27:21

Channel #7 counts

20:14

Channel #6 counts

13:8

Channel #5 counts

7:0

Channel #4 counts

2

31:28

Word type - 0x2

27:21

Channel #11 counts

20:14

Channel #10 counts

13:8

Channel #9 counts

7:0

Channel #8 counts

3

31:28

Word type - 0x3

27:21

Channel #15 counts

20:14

Channel #14 counts

13:8

Channel #13 counts

7:0

Channel #12 counts

4

31:28

Word type - 0xE

27:24

Time slice external conditions

23:0

Time slice number

Padding word data

Padding word format:

bits

description

31:28

Word type - 0xF

27:0

reserved

Any number of padding words (including zero) could be in M-Stream packet. Padding words places in the very end of M-Stream packet after last MSC time slice data block. Padding words should be ignored during data processing.


RawData

DataFormatMSC_ETH (last edited 2021-12-23 08:50:31 by sav)