Trip-T Front End Board Documentation Home

Serial Interface

Physical Layer

The physical layer comprises LVDS signalling over 4 twisted pairs using RJ45 connectors designed to be compatible with standard Ethernet cables. These lines are DC coupled, and the data are transmitted using an unbalanced encoding. The logical definitions of these lines are:
  1. Clock Input to the TFB
  2. Data Input to the TFB
  3. Data Output from the TFB
  4. Trigger input to the TFB



Link Calibration

Link is source synchronous for data transmitted from the RMM to the TFB. In the return direction there is now an automatic phase detection mechanism implemented in the RMM dealing with synchronization on a packet-by-packet basis.



Link Reliability

Reliability tests have been carried out at Imperial College using Cat5e cables up to 17m long. During the longest single run 1012 bits were read out of the device and zero bit errors detected. It can be said that BER < 10-11 with 99% confidence over a 17m cable.

Occasionally, some errors are observed. Single bit errors are most probably correctable using the CRC, but multi-bit errors are not.

Extrapolating this performance to a system with 1000 (identically performing) TFBs, the expectation error rate for single bit errors would be approximately one every 2000 triggers.

Protocol Layer

A light-weight packet based protocol is used that supports the following features:
  1. TFB Identity Verification
  2. Up to 16 Logical Pipes
  3. Variable Packet Size
  4. CRC
  5. Acknowledge generation

The serial interface operates like a (FWFT) FIFO to FIFO Interface and comprises a header, payload and a trailing 16 bit CRC code. Upstream and downstream packets are identical in structure, though have some differences with regard to field definitions. Since input data for the TFB is output data for the RMM and vice-versa, to avoid ambiguity I will refer to TFB input data streams as the UPSTREAM direction, and TFB output data streams as DOWNSTREAM. The packet structures are defined in the table below:

Upstream Packet Definitions (to the TFB)
Position in the packet Name Description
0 ID (15:4)=TFB-ID. (3:0)=Logical Pipe ID
1 Reserved (15:0)=Reserved
2 Command Packet (15:1)=Reserved. (1)=Force Acknowledge
3 Reserved Reserved
4 Length (15:0)=Binary encoded payload length (number of 16 bit words, including CRC)
5 to (Length+4) Payload  
Length+5 CRC (15:0) CRC: 16 bit, polynomial = (0 5 12 16)


Downstream Packet Definitions (from the TFB)
Position in the packet Name Description
0 ID (15:4)=TFB-ID. (3:0)=Logical Pipe ID
1 Status (15:5)=Undefined. (4:0)=Integration Cycle No.
2 High Spill Number (15:0) = Spill Number (31:16)
3 Low Spill Number (15:0) = Spill Number (15:0)
4 Length (15:0)=Binary encoded payload length (number of 16 bit words, including CRC)
5 to (Length+4) Payload  
Length+5 CRC (15:0) CRC: 16 bit, polynomial = (0 5 12 16)

Acknowledge Packet

An acknowledge packet may be generated in response to some input packet to the device. Acknowledge packets come from logical pipe 15 and have 0 (zero) payload length. Consequently, the Length word in the packet header is 1. The options for the generation of an ACK are:
  1. No ACK generation, unless the Force ACK bit is set in the header.

Logical Pipe Assignment (to TFB)

The serial interface supports 16 logical pipes which are used to separate packets into different logical data streams on the same physical channel. Assignment of these is detailed in the following tables:
Upstream Logical Pipe ID assignments
Pipe ID Pipe Name Description
0Monitor ConfigurationMonitor Configuration data upload pipe
1ConfigurationForwards the packets to the configuration bus master in the FPGA.
These payloads must have the correct structure.
2BootloaderForwards the packets to the input buffer
3 to 15ReservedCurrently unallocated.


Downstream Logical Pipe ID assignments
Pipe ID Pipe Name Description
0Reserved 
1ConfigurationReturn packet from the configuration interface will have this pipe id.
2ADC DataPackets containing data from all ADC channels will have this pipe ID
3Reserved 
4Trip-T TimestampsTimestamp data from all Trip-Ts
5Reserved 
6Reserved 
7Reserved 
8Reserved 
9Reserved 
10Reserved 
11Reserved 
12Monitor DataStatus and Data Packets from the Monitor Player
13Reserved 
14Reserved 
15ACK/NACKAcknowledge/No Acknowledge Packets will have this

Resetting the TFB

The TFB will be reset if a high level persists on the Trigger line for more than 100 clock cycles (1 microsecond). Once a reset has been initiated in the fashion, the TFB will remain in reset and be unresponsive to any communication for approximately 50ms after the Trigger line has been taken low again. This time is required to allow the device to re-lock to the input clock. The clock must be stable during the reset time.