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
- Total length of data sequence is
- 1 + 11 x (Nhit + 3) in the case of FCS attatched
- 1 + 11 x (Nhit + 2) in the case of FCS omitted
- If the number of hits is zero, no FCS is attatched.
- Two data packets are separated by one or more zeros between the last
bit of the preceeding packet and the start bit of the following packet.
- With an FCS, you can know whether a packet is corrupted or not.
However, we don't have any way to restore the packet or request
resending the packet at present.
For
< a href="http://www.rad.com/networks/1994/err_con/crc.htm">further information
about FCS
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:
- Remove header of the packet, namely, a part from start bit to ToT.
- 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.
- Put the array into a following function
- 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
- Remove header of the packet you want to send.
- 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.
- Put the array into the checking function above.
- 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