Overview

Bitfields
BooDB input
Column definitions
Final Output


Sheet 1: Bitfields

Group BooDB name Explanation Chunk variable Full Mask Sub Mask Sub Mask (int) Bitshift Num bits









Time offset bitfield

(array size = UNCALIBRATEDDATA_NUM_HITS)





Offset Time off set value to the nearest 100ns. UNCALIBRATEDDATA_OFFSET(i) 0x0fff 0x0fff 4095 0 12

SatHitFlag This quad contains saturated QADC data. UNCALIBRATEDDATA_OFFSET(i) 0x1000 0x1 1 12 1

RightHitFlag Quad is at end of an event; time & charge info in last 2 TSAs UNCALIBRATEDDATA_OFFSET(i) 0x2000 0x1 1 13 1

LeftHitFlag Quad is at beginning of event; time & charge info in first 2 TSAs UNCALIBRATEDDATA_OFFSET(i) 0x4000 0x1 1 14 1

SatStreamFlag This quad is part of a saturated stream; it may or may not have saturation data. UNCALIBRATEDDATA_OFFSET(i) 0x8000 0x1 1 15 1








16









GPS bitfields








GPS_days_ones All GPS data filled by trigger after the event is broadcast GLOBALTANKHEADER_GPS_UPPER 0x0000.000f 0xf 15 0 4

GPS_days_tens
GLOBALTANKHEADER_GPS_UPPER 0x0000.00f0 0xf 15 4 4

GPS_days_hundreds
GLOBALTANKHEADER_GPS_UPPER 0x0000.0300 0x3 3 8 2

GPS_unused
GLOBALTANKHEADER_GPS_UPPER 0x0000.fc00 0x3f 63 10 6

GPS_bclock 16 bit clock to nearest 100ns (10 Mhz). GLOBALTANKHEADER_GPS_UPPER 0xffff.0000 0xffff 65535 16 16








32










GPS_milli_ones
GLOBALTANKHEADER_GPS_LOWER 0x0000.000f 0xf 15 0 4

GPS_milli_tens
GLOBALTANKHEADER_GPS_LOWER 0x0000.00f0 0xf 15 4 4

GPS_milli_hundreds
GLOBALTANKHEADER_GPS_LOWER 0x0000.0f00 0xf 15 8 4

GPS_sec_ones
GLOBALTANKHEADER_GPS_LOWER 0x0000.f000 0xf 15 12 4

GPS_sec_tens
GLOBALTANKHEADER_GPS_LOWER 0x0007.0000 0x7 7 16 3

GPS_min_ones
GLOBALTANKHEADER_GPS_LOWER 0x0078.0000 0xf 15 19 4

GPS_min_tens
GLOBALTANKHEADER_GPS_LOWER 0x0380.0000 0x7 7 23 3

GPS_hour_ones
GLOBALTANKHEADER_GPS_LOWER 0x3c00.0000 0xf 15 26 4

GPS_hour_tens
GLOBALTANKHEADER_GPS_LOWER 0xc000.0000 0x3 3 30 2








32









Broadcast Command

(array = MAX_NBCASTS = 6)





Bcast_tsa Beginning of ime stamped address broadcast by trigger GLOBALTANKHEADER_BCAST_CMD(i) 0x0000.07ff 0x7ff 2047 0 11

Bcast_winsize Number of TSAs - 1 in this broadcast GLOBALTANKHEADER_BCAST_CMD(i) 0x0000.f800 0x1f 31 11 5

Bcast_unused Not asserted in broadcast command. Should be set high. GLOBALTANKHEADER_BCAST_CMD(i) 0x0003.0000 0x3 3 16 2

Bcast_evtype Trigger event type info field sent to QTs GLOBALTANKHEADER_BCAST_CMD(i) 0x00fc.0000 0x3f 63 18 6

Bcast_seqid Broadcast sequence number 0-254 GLOBALTANKHEADER_BCAST_CMD(i) 0xff00.0000 0xff 255 24 8








32









Broadcast Diagnostic

(array = MAX_NBCASTS = 6)





BcastDiag_bclock Time broadcast complete in clock cycles (100ns unit) GLOBALTANKHEADER_BCAST_DIAG(i) 0x0000.ffff 0xffff 65535 0 16

BcastDiag_GPS_milli_ones ms Time broadcast complete GLOBALTANKHEADER_BCAST_DIAG(i) 0x000f.0000 0xf 15 16 4

BcastDiag_GPS_milli_tens ms Time broadcast complete GLOBALTANKHEADER_BCAST_DIAG(i) 0x00f0.0000 0xf 15 20 4

BcastDiag_seqid Diagnostic read of broadcast sequence number GLOBALTANKHEADER_BCAST_DIAG(i) 0xff00.0000 0xff 255 24 8








32
Trigger Activity (FIFO entry)








FIFO_bclock 10 Mhz clock time of trigger activity GLOBALTANKHEADER_TRIG_FIFO 0x0000.ffff 0xffff 65535 0 16

FIFO_calib E3 asserted GLOBALTANKHEADER_TRIG_FIFO 0x0001.0000 0x1 1 16 1

FIFO_strobe E2 asserted GLOBALTANKHEADER_TRIG_FIFO 0x0002.0000 0x1 1 17 1

FIFO_beam E1 asserted GLOBALTANKHEADER_TRIG_FIFO 0x0004.0000 0x1 1 18 1

FIFO_det5 Detector comparator 5 asserted GLOBALTANKHEADER_TRIG_FIFO 0x0008.0000 0x1 1 19 1

FIFO_det4 Detector comparator 4 asserted GLOBALTANKHEADER_TRIG_FIFO 0x0010.0000 0x1 1 20 1

FIFO_det3 Detector comparator 3 asserted GLOBALTANKHEADER_TRIG_FIFO 0x0020.0000 0x1 1 21 1

FIFO_det2 Detector comparator 2 asserted GLOBALTANKHEADER_TRIG_FIFO 0x0040.0000 0x1 1 22 1

FIFO_veto2 Veto comparator 2 asserted GLOBALTANKHEADER_TRIG_FIFO 0x0080.0000 0x1 1 23 1

FIFO_unused Should be set high GLOBALTANKHEADER_TRIG_FIFO 0x1f00.0000 0x1f 31 24 5

FIFO_Eor E4 asserted (OR of E bits) GLOBALTANKHEADER_TRIG_FIFO 0x2000.0000 0x1 1 29 1

FIFO_det1 Detector comparator 5 asserted GLOBALTANKHEADER_TRIG_FIFO 0x4000.0000 0x1 1 30 1

FIFO_veto1 Veto comparator 1 asserted GLOBALTANKHEADER_TRIG_FIFO 0x8000.0000 0x1 1 31 1








32
Reciever FIFO word








Rcvr_tsa TSA received by crate 1 reciever card GLOBALTANKHEADER_QTH_RCVR 0x0000.07ff 0x7ff 2047 0 11

Rcvr_seqid Trigger broadcast sequence number (0-254) GLOBALTANKHEADER_QTH_RCVR 0x0007.f800 0xff 255 11 8

Rcvr_evtype Trigger event type info field sent to QTs GLOBALTANKHEADER_QTH_RCVR 0x01f8.0000 0x3f 63 19 6

Rcvr_qt_ff QT FIFO full flag (0=full, 1=not) GLOBALTANKHEADER_QTH_RCVR 0x0200.0000 0x1 1 25 1

Rcvr_qt_ht QT FIFO half-full flag (0=half full, 1=not) GLOBALTANKHEADER_QTH_RCVR 0x0400.0000 0x1 1 26 1

Rcvr_qt_ef QT FIFO Reciever empty flag (0=empty, 1=not) GLOBALTANKHEADER_QTH_RCVR 0x0800.0000 0x1 1 27 1

Rcvr_rcvr_ff Reciever full flag (0=full, 1=not) GLOBALTANKHEADER_QTH_RCVR 0x1000.0000 0x1 1 28 1

Rcvr_rcvr_hf Reciever half-full flag (0=half full, 1=not) GLOBALTANKHEADER_QTH_RCVR 0x2000.0000 0x1 1 29 1

Rcvr_rcvr_ef Reciever empty flag (0=empty, 1=not) GLOBALTANKHEADER_QTH_RCVR 0x4000.0000 0x1 1 30 1

Rcvr_eof EOF bit set at end of broadcast GLOBALTANKHEADER_QTH_RCVR 0x8000.0000 0x1 1 31 1








32

Sheet 2: BooDB input

BooDB name Mask Bitshift
Offset 4095 0



SatHitFlag 1 12



RightHitFlag 1 13



LeftHitFlag 1 14



SatStreamFlag 1 15



GPS_days_ones 15 0



GPS_days_tens 15 4



GPS_days_hundreds 3 8



GPS_unused 63 10



GPS_bclock 65535 16



GPS_milli_ones 15 0



GPS_milli_tens 15 4



GPS_milli_hundreds 15 8



GPS_sec_ones 15 12



GPS_sec_tens 7 16



GPS_min_ones 15 19



GPS_min_tens 7 23



GPS_hour_ones 15 26



GPS_hour_tens 3 30



Bcast_tsa 2047 0



Bcast_winsize 31 11



Bcast_unused 3 16



Bcast_evtype 63 18



Bcast_seqid 255 24



BcastDiag_bclock 65535 0



BcastDiag_GPS_milli_ones 15 16



BcastDiag_GPS_milli_tens 15 20



BcastDiag_seqid 255 24



FIFO_bclock 65535 0



FIFO_calib 1 16



FIFO_strobe 1 17



FIFO_beam 1 18



FIFO_det5 1 19



FIFO_det4 1 20



FIFO_det3 1 21



FIFO_det2 1 22



FIFO_veto2 1 23



FIFO_unused 31 24



FIFO_Eor 1 29



FIFO_det1 1 30



FIFO_veto1 1 31



Rcvr_tsa 2047 0



Rcvr_seqid 255 11



Rcvr_evtype 63 19



Rcvr_qt_ff 1 25



Rcvr_qt_ht 1 26



Rcvr_qt_ef 1 27



Rcvr_rcvr_ff 1 28



Rcvr_rcvr_hf 1 29



Rcvr_rcvr_ef 1 30



Rcvr_eof 1 31

Sheet 3: Column definitions

BooDB name Chunk variable Explanation
Offset_mask UNCALIBRATEDDATA_OFFSET(i) The time offset of this quad (100ns precision)
Offset_shift

SatHitFlag_mask UNCALIBRATEDDATA_OFFSET(i) This quad contains saturated QADC data.
SatHitFlag_shift

RightHitFlag_mask UNCALIBRATEDDATA_OFFSET(i) Quad is at end of an event; time & charge info in last 2 TSAs
RightHitFlag_shift

LeftHitFlag_mask UNCALIBRATEDDATA_OFFSET(i) Quad is at beginning of event; time & charge info in first 2 TSAs
LeftHitFlag_shift

SatStreamFlag_mask UNCALIBRATEDDATA_OFFSET(i) This quad is part of a saturated stream; it may or may not have saturation data.
SatStreamFlag_shift

GPS_days_ones_mask GLOBALTANKHEADER_GPS_UPPER All GPS data filled by trigger after the event is broadcast
GPS_days_ones_shift

GPS_days_tens_mask GLOBALTANKHEADER_GPS_UPPER
GPS_days_tens_shift

GPS_days_hundreds_mask GLOBALTANKHEADER_GPS_UPPER
GPS_days_hundreds_shift

GPS_unused_mask GLOBALTANKHEADER_GPS_UPPER
GPS_unused_shift

GPS_bclock_mask GLOBALTANKHEADER_GPS_UPPER 16 bit clock to nearest 100ns (10 Mhz).
GPS_bclock_shift

GPS_milli_ones_mask GLOBALTANKHEADER_GPS_LOWER
GPS_milli_ones_shift

GPS_milli_tens_mask GLOBALTANKHEADER_GPS_LOWER
GPS_milli_tens_shift

GPS_milli_hundreds_mask GLOBALTANKHEADER_GPS_LOWER
GPS_milli_hundreds_shift

GPS_sec_ones_mask GLOBALTANKHEADER_GPS_LOWER
GPS_sec_ones_shift

GPS_sec_tens_mask GLOBALTANKHEADER_GPS_LOWER
GPS_sec_tens_shift

GPS_min_ones_mask GLOBALTANKHEADER_GPS_LOWER
GPS_min_ones_shift

GPS_min_tens_mask GLOBALTANKHEADER_GPS_LOWER
GPS_min_tens_shift

GPS_hour_ones_mask GLOBALTANKHEADER_GPS_LOWER
GPS_hour_ones_shift

GPS_hour_tens_mask GLOBALTANKHEADER_GPS_LOWER
GPS_hour_tens_shift

Bcast_tsa_mask GLOBALTANKHEADER_BCAST_CMD(i) Beginning of ime stamped address broadcast by trigger
Bcast_tsa_shift

Bcast_winsize_mask GLOBALTANKHEADER_BCAST_CMD(i) Number of TSAs - 1 in this broadcast
Bcast_winsize_shift

Bcast_unused_mask GLOBALTANKHEADER_BCAST_CMD(i) Not asserted in broadcast command. Should be set high.
Bcast_unused_shift

Bcast_evtype_mask GLOBALTANKHEADER_BCAST_CMD(i) Trigger event type info field sent to QTs
Bcast_evtype_shift

Bcast_seqid_mask GLOBALTANKHEADER_BCAST_CMD(i) Broadcast sequence number 0-254
Bcast_seqid_shift

BcastDiag_bclock_mask GLOBALTANKHEADER_BCAST_DIAG(i) Time broadcast complete in clock cycles (100ns unit)
BcastDiag_bclock_shift

BcastDiag_GPS_milli_ones_mask GLOBALTANKHEADER_BCAST_DIAG(i) ms Time broadcast complete
BcastDiag_GPS_milli_ones_shift

BcastDiag_GPS_milli_tens_mask GLOBALTANKHEADER_BCAST_DIAG(i) ms Time broadcast complete
BcastDiag_GPS_milli_tens_shift

BcastDiag_seqid_mask GLOBALTANKHEADER_BCAST_DIAG(i) Diagnostic read of broadcast sequence number
BcastDiag_seqid_shift

FIFO_bclock_mask GLOBALTANKHEADER_TRIG_FIFO 10 Mhz clock time of trigger activity
FIFO_bclock_shift

FIFO_calib_mask GLOBALTANKHEADER_TRIG_FIFO E3 asserted
FIFO_calib_shift

FIFO_strobe_mask GLOBALTANKHEADER_TRIG_FIFO E2 asserted
FIFO_strobe_shift

FIFO_beam_mask GLOBALTANKHEADER_TRIG_FIFO E1 asserted
FIFO_beam_shift

FIFO_det5_mask GLOBALTANKHEADER_TRIG_FIFO Detector comparator 5 asserted
FIFO_det5_shift

FIFO_det4_mask GLOBALTANKHEADER_TRIG_FIFO Detector comparator 4 asserted
FIFO_det4_shift

FIFO_det3_mask GLOBALTANKHEADER_TRIG_FIFO Detector comparator 3 asserted
FIFO_det3_shift

FIFO_det2_mask GLOBALTANKHEADER_TRIG_FIFO Detector comparator 2 asserted
FIFO_det2_shift

FIFO_veto2_mask GLOBALTANKHEADER_TRIG_FIFO Veto comparator 2 asserted
FIFO_veto2_shift

FIFO_unused_mask GLOBALTANKHEADER_TRIG_FIFO Should be set high
FIFO_unused_shift

FIFO_Eor_mask GLOBALTANKHEADER_TRIG_FIFO E4 asserted (OR of E bits)
FIFO_Eor_shift

FIFO_det1_mask GLOBALTANKHEADER_TRIG_FIFO Detector comparator 5 asserted
FIFO_det1_shift

FIFO_veto1_mask GLOBALTANKHEADER_TRIG_FIFO Veto comparator 1 asserted
FIFO_veto1_shift

Rcvr_tsa_mask GLOBALTANKHEADER_QTH_RCVR TSA received by crate 1 reciever card
Rcvr_tsa_shift

Rcvr_seqid_mask GLOBALTANKHEADER_QTH_RCVR Trigger broadcast sequence number (0-254)
Rcvr_seqid_shift

Rcvr_evtype_mask GLOBALTANKHEADER_QTH_RCVR Trigger event type info field sent to QTs
Rcvr_evtype_shift

Rcvr_qt_ff_mask GLOBALTANKHEADER_QTH_RCVR QT FIFO full flag (0=full, 1=not)
Rcvr_qt_ff_shift

Rcvr_qt_ht_mask GLOBALTANKHEADER_QTH_RCVR QT FIFO half-full flag (0=half full, 1=not)
Rcvr_qt_ht_shift

Rcvr_qt_ef_mask GLOBALTANKHEADER_QTH_RCVR QT FIFO Reciever empty flag (0=empty, 1=not)
Rcvr_qt_ef_shift

Rcvr_rcvr_ff_mask GLOBALTANKHEADER_QTH_RCVR Reciever full flag (0=full, 1=not)
Rcvr_rcvr_ff_shift

Rcvr_rcvr_hf_mask GLOBALTANKHEADER_QTH_RCVR Reciever half-full flag (0=half full, 1=not)
Rcvr_rcvr_hf_shift

Rcvr_rcvr_ef_mask GLOBALTANKHEADER_QTH_RCVR Reciever empty flag (0=empty, 1=not)
Rcvr_rcvr_ef_shift

Rcvr_eof_mask GLOBALTANKHEADER_QTH_RCVR EOF bit set at end of broadcast
Rcvr_eof_shift


Sheet 4: Final Output

BooDB column name mask/shift
Offset_mask 4095
Offset_shift 0
SatHitFlag_mask 1
SatHitFlag_shift 12
RightHitFlag_mask 1
RightHitFlag_shift 13
LeftHitFlag_mask 1
LeftHitFlag_shift 14
SatStreamFlag_mask 1
SatStreamFlag_shift 15
GPS_days_ones_mask 15
GPS_days_ones_shift 0
GPS_days_tens_mask 15
GPS_days_tens_shift 4
GPS_days_hundreds_mask 3
GPS_days_hundreds_shift 8
GPS_unused_mask 63
GPS_unused_shift 10
GPS_bclock_mask 65535
GPS_bclock_shift 16
GPS_milli_ones_mask 15
GPS_milli_ones_shift 0
GPS_milli_tens_mask 15
GPS_milli_tens_shift 4
GPS_milli_hundreds_mask 15
GPS_milli_hundreds_shift 8
GPS_sec_ones_mask 15
GPS_sec_ones_shift 12
GPS_sec_tens_mask 7
GPS_sec_tens_shift 16
GPS_min_ones_mask 15
GPS_min_ones_shift 19
GPS_min_tens_mask 7
GPS_min_tens_shift 23
GPS_hour_ones_mask 15
GPS_hour_ones_shift 26
GPS_hour_tens_mask 3
GPS_hour_tens_shift 30
Bcast_tsa_mask 2047
Bcast_tsa_shift 0
Bcast_winsize_mask 31
Bcast_winsize_shift 11
Bcast_unused_mask 3
Bcast_unused_shift 16
Bcast_evtype_mask 63
Bcast_evtype_shift 18
Bcast_seqid_mask 255
Bcast_seqid_shift 24
BcastDiag_bclock_mask 65535
BcastDiag_bclock_shift 0
BcastDiag_GPS_milli_ones_mask 15
BcastDiag_GPS_milli_ones_shift 16
BcastDiag_GPS_milli_tens_mask 15
BcastDiag_GPS_milli_tens_shift 20
BcastDiag_seqid_mask 255
BcastDiag_seqid_shift 24
FIFO_bclock_mask 65535
FIFO_bclock_shift 0
FIFO_calib_mask 1
FIFO_calib_shift 16
FIFO_strobe_mask 1
FIFO_strobe_shift 17
FIFO_beam_mask 1
FIFO_beam_shift 18
FIFO_det5_mask 1
FIFO_det5_shift 19
FIFO_det4_mask 1
FIFO_det4_shift 20
FIFO_det3_mask 1
FIFO_det3_shift 21
FIFO_det2_mask 1
FIFO_det2_shift 22
FIFO_veto2_mask 1
FIFO_veto2_shift 23
FIFO_unused_mask 31
FIFO_unused_shift 24
FIFO_Eor_mask 1
FIFO_Eor_shift 29
FIFO_det1_mask 1
FIFO_det1_shift 30
FIFO_veto1_mask 1
FIFO_veto1_shift 31
Rcvr_tsa_mask 2047
Rcvr_tsa_shift 0
Rcvr_seqid_mask 255
Rcvr_seqid_shift 11
Rcvr_evtype_mask 63
Rcvr_evtype_shift 19
Rcvr_qt_ff_mask 1
Rcvr_qt_ff_shift 25
Rcvr_qt_ht_mask 1
Rcvr_qt_ht_shift 26
Rcvr_qt_ef_mask 1
Rcvr_qt_ef_shift 27
Rcvr_rcvr_ff_mask 1
Rcvr_rcvr_ff_shift 28
Rcvr_rcvr_hf_mask 1
Rcvr_rcvr_hf_shift 29
Rcvr_rcvr_ef_mask 1
Rcvr_rcvr_ef_shift 30
Rcvr_eof_mask 1
Rcvr_eof_shift 31