TKRE Subpacket Contents for the 2001 BFEM

The tkre subpacket is variable length.  The maximum length should never exceed 4 kbytes, see the following calculation by Dave Lauben for more details.  The TKRE subpacket consists solely of TKR FIFO data, unlike the 1999 BTEM where L1T (level 1 trigger) information was included.

Description 16 bits 16 bits
Event Counter (L1T count) 32 bits
Variable length TKR data See description below

TKR Data Description

The following description was stolen from James Wallace's (Stanford) L1T and Tracker FIFO Data Formats for the 1999 BTEM.  The Tracker FIFO is the same for the 2001 BFEM (except for the EOF bits)

The FIFO is packed in 32 bit words.

Each 32 bit word contains 2 tag bits on the two MSB of the 16-bit data value.  The tag identifies the type of data in this word.  Next are 3 bits to denote the cable number [0, 7].  Here are the type of TKR words:

Controller/Number of Hits Value:
TAG            CABLE ID        CONTROLLER ADDR    NUM HITS
D[15,14]    D[13..11]                        D[10..6]                    D[5..0]
    00             CCC                            AAAAA                    NNNNNN

Error-Flag/Time Over Threshold Value:
TAG            CABLE ID        ERROR FLAG                TOT
D[15,14]        D[13..11]               D[10]                        D[9..0] 
    01                CCC                    E                          TTTTTTTTTT

Hit-Address Value:
TAG            CABLE ID            HIT ADDR
D[15,14]        D[13,11]                D[10..0]
10                    CCC                HHHHHHHHHH

CRC Value (Optional):
TAG            CABLE ID                CRC
D[15,14]        D[13,11]                D[10..0]
11                    CCC                    SSSSSSSSSS

Dummy-Odd Value:
TAG            CABLE ID                ODD DUMMY
D[31,30]        D[29..27]                    D[26...16]
10                  000                            1111111111

End-Of-File-Odd/Even Value:
1) 0xbff0000 is new shorter EOF
2) 0x000f0000 -> P=1..8 = Tkr FEE buffer ptr
3) 0x0000ffff -> N=8..XX = Event length bytes

Dave's calculation of the maximum tkre subpacket length:
The tracker is and always has been variable length, at least in principle.
The beamtest siu format truncates to 2 kbytes maximum, while the balloon 
flight can fill up to max possible hits, which is, hypothetically,

tkr.max = 2 bytes/hit x 63 max.hits/controller x # layers
= 2 x 63 x 26 
= 3276 max hits per event

plus some overhead for hit counts and TOT etc (see also Wilko and Masa's Jan 2001 BFEM tracker document). 

If you budget 7 kbytes max for tracker it should never exceed this size under any circumstance.