GTRC Data Format
Check-Sum



GTRC Data Format

The data format of the controller (GTRC) consists of a start bit followed by a variable number of 11-bits words. The first bit of the GTRC data output is a start bit. The start bit is followed by the GTRC header that contains the address of the controller chip (hard wired) and the number of hits the controller chip recorded. The next word contains an error bit and the digitized time over threshold of the fastOr. For each recorded hit there is one word (11 bits). If the check-sum is enabled the controller adds a 11-bits word at the end.

1 : start bit
GTRC Header (N-hits)
Error/ToT
Hit Data for first Hit
Hit Data for second Hit
.......
Hit Data for N-th Hit
CRC (if enabled)
GTRC Header    (AAAAA NNNNNN)
GTRC address (5 bits) followed by the number of hits (6 bits) MSB first.
Error/ToT    (E TTTTTTTTT)
First bit is the error bit (0: no error), the last 10 bits are the time over threshold. MSB first
Hit Data    (NNNNN CCCCCC)
Number of GTFE (5bits) followed by by the chan address within a GTFE chip (6 bits). MSB first.
CRC
Check-sum. This word can be turned of via the controller (GTRC) register.

Remarks

Example of data output:
	1 00000 000001 0 0000000101 00001 001011 00001011100

	start bit	1
	layer address	0
	error		no error
	ToT		5
	chip nubmer	1
	strip number	11
	FCS		00001011100

Check Sum

How to check the data packet with FCS:

  1. Remove header of the packet, namely, a part from start bit to ToT.
  2. Put the remaining packet into an array, with the first bit (i.e., the bit which came out right after ToT) as the first element of the array. Note that this array should include an FCS at the end.
  3. Put the array into a following function
  4. Check a return value. If it is zero, then the packet is good. If not, packet is corrupted.

How to compute an FCS for data packet

  1. Remove header of the packet you want to send.
  2. Put the remaining packet into an array, with the first bit (i.e., the bit which came out right after ToT) as the first element of the array. Append 11 zeros at the end of the array.
  3. Put the array into the checking function above.
  4. At the end of the function above, an FCS is in "reg" array, with MSB in reg[0].

Back to GLAST home page, Front-End-Electronics

Suggestions, complains

Last modified: Tue May 4 08:32:16 PDT 1999