Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Introduction

Modern High Energy Physics and Photon Science experiments now require high-speed serial data links of 10 Gbps and higher for their data acquisition systems. These links must be lightweight, with low protocol overhead and small FPGA resource utilization. Often these links will multiplex data from several sources, so the link protocol should also support the idea of multiple “Virtual Channels” per physical link. Based on our experience developing the PGP2 protocol, supported link rates of up to 6 Gbps using 8b/10b encoding, we have now developed the PGP3 protocol to support link rates in excess of 10 Gbps using 64b/66b encoding.

Link Layer

PGP3 uses 64b/66b encoding to achieve DC balance of the serial data stream. Each 64-bit word is scrambled with a source synchronous scrambler with polynomial G(x)=x58+x29+1. Two bits are then appended to each word, 0b01 to mark regular data, and 0b10 to mark control characters (K-Codes). This ensures that a transition between 0 and 1 at least once every 66 bits. It is also used for word alignment. These 66-bit words can then be serialized and deserialized using the high speed transceivers found in modern FPGAs. The protocol does not specify any link rates, and any link speed may be targeted provided that the link medium and FPGA on each side can support it.

K-Codes

The protocol defines several K-Codes to indicate data framing, flow-control, opcodes, and other metadata. For all K-Codes, the most significant 8 bits of the 64-bit word indicate which code it is. This is known as the Block Type Field (BTF). The lower 56 bits are then specified differently depending on the K-Code.

K-Code nameBTF
IDLE0x99
SOF (Start of Frame)0xAA
EOF (End of Frame)0x55
SOC (Start of Cell)0xCC
EOC (End of Cell)0x33
SKIP0x66
USER00x78
USER10x87
USER20x2D
USER30xD2
USER40x1E
USER50xE1
USER60xB4
USER70x4B

LINKINFO Structure

Flow control in performed on a per virtual channel basis. Each received Virtual Channel is expected to be separately buffered in external logic, with PAUSE and OVERFLOW signals from the buffer fed back to the PGP3 block. The PAUSE signal indicates that the buffer has less than Cell (128 words) of space remaining. The receive buffer status of all Virtual Channels is grouped into a 40-bit LINKINFO structure, which is included in each IDLE, SOF and SOC code that is transmitted. The maximum cell size of 128 words grantees that any change in buffer fill status will be transmitted back upstream within at most 128 word-clock cycles

Bit(s)Name
0-15VC 0-15 PAUSE
16-31VC 0-15 OVERFLOW
32RXREADY
33-35PGP Version (Always 0x3)
36-4039Reserved (zeros)

K-Code: SKIP

SKIP codes are sent once every 5000 words. They are used to mitigate clock drift between the oscillators on either side of the link. SKIP characters are not written into the elastic buffer in the receive logic, allowing the buffer to avoid overflows when the transit clock on one side of the link is slightly faster than the receive clock on the other.  The lower 56-bit data field is called "RemoteLinkData" and used to publish status data between the two end-point with high latency with no guarantee of transmission.  RemoteLinkData is intended for high level, slow changing status bit communication (Example: Board ID Number).

Bit(s)Name
0-55RemoteLinkData
56-63BTF = 0x66

K-Code: IDLE

IDLE codes are sent when the transmit logic has nothing else to send, or when flow control indicates that the downstream side is unable to receive data.

Bit(s)Name
0-39LINKINFO
40-55Reserved (zeros)
56-63BTF = 0x99

K-Code: SOF/SOC

SOF (Start of Frame) or SOC (Start of Cell) codes are sent when the start of data payload transmission

Bit(s)Name
0-39LINKINFO
40-43Virtual Channel
44-55Packet number
56-63BTF: SOF=0xAA or SOC=0xCC

K-Code: EOF/EOC

EOF (End of Frame) or EOC (End of Cell) codes are sent when the start of data payload transmission

Bit(s)Name
0-7TLAST USER
8-16Reserved (zeros)
16-19Last byte count
20-23Reserved (zeros)
24-5532-bit CRC
56-63BTF: EOF=0x55 or EOC=0x33

Data Cells

...