41 tw.
lsData2 = lsDatas & 0x0000ffffffffffff;
44 sw.
msData2 = msDatas & 0x0000ffffffffffff;
72 uint16_t
mask = 0x0001;
74 uint16_t crc_temp = crc_in;
75 unsigned char datalen = 16;
76 for (
int i=0;
i<datalen;
i++) {
77 if (dato & v) d = 0x0001;
79 if ((crc_temp & mask)^d) crc_temp = crc_temp>>1 ^ 0x8408;
80 else crc_temp = crc_temp>>1;
88 uint16_t vfatBlockWords[12];
92 vfatBlockWords[8] = (0xffff000000000000 &
msData()) >> 48;
93 vfatBlockWords[7] = (0x0000ffff00000000 &
msData()) >> 32;
94 vfatBlockWords[6] = (0x00000000ffff0000 &
msData()) >> 16;
95 vfatBlockWords[5] = (0x000000000000ffff &
msData());
96 vfatBlockWords[4] = (0xffff000000000000 &
lsData()) >> 48;
97 vfatBlockWords[3] = (0x0000ffff00000000 &
lsData()) >> 32;
98 vfatBlockWords[2] = (0x00000000ffff0000 &
lsData()) >> 16;
99 vfatBlockWords[1] = (0x000000000000ffff &
lsData());
101 uint16_t crc_fin = 0xffff;
102 for (
int i = 11;
i >= 1;
i--) {
103 crc_fin =
crc_cal(crc_fin, vfatBlockWords[
i]);
uint64_t ec
Event Counter, 8 bits.
uint64_t bcV2
Bunch Crossing number, 12 bits.
uint64_t ecV2
Event Counter, 8 bits.
uint64_t msData2
channels from 65to128
uint64_t crc
Check Sum value, 16 bits.
uint64_t lsData2
channels from 1to64
uint64_t msData1
channels from 65to128
uint64_t b1110
1110:4 Control bits, shoud be 1110
uint64_t lsData1
channels from 1to64
unsigned long long uint64_t
uint64_t bc
Bunch Crossing number, 16 bits.
uint64_t pos
an 8bit value indicating the VFAT position on this GEB (it can be 0 to 23)
uint64_t b1010
1010:4 Control bits, shoud be 1010
uint64_t chipID
Chip ID, 12 bits.
uint64_t header
normally 0x1E. 0x5E indicates that the VFAT3 internal buffer is half-full, so it's like a warning ...
VFAT data structure - 3 words of 64 bits each.
uint8_t quality()
quality flag - bit: 0 good, 1 crc fail, 2 b1010 fail, 3 b1100 fail, 4 b1110
uint64_t b1100
1100:4, Control bits, shoud be 1100
uint16_t crc_cal(uint16_t crc_in, uint16_t dato)
uint64_t fw_
phi position of vfat in chamber