Interface encapsulation, 8b/10b encoder, Symbols and comma character – Achronix Speedster22i SerDes User Manual
Page 20: Running disparity

Interface Encapsulation
This block encapsulates the protocols supported by the SerDes in Achronix FPGA. The user
may refer to Section – “PCS Interface” for details on the protocols supported. It may be noted
again that the SerDes configured in Generic mode supports only 8b/10b encoding.
8b/10b Encoder
The 8b/10b encoder generates 10-bit code groups from 8-bit data and a 1-bit control input. It
uses the code group mapping specified in IEEE 802.3 clause 36. If the fabric interface is a 16-
bit data path, then two 8b/10b encoders are cascaded to produce a 20-bit code group output
to the PMA for serialization.
The 8b/10b encoder essentially translates 8-bit words to 10-bit symbols. This encoding
scheme has been proven to achieve DC-balance and running disparity while providing
sufficient information for clock recovery. (See the later sections for more information on DC-
Balance, running disparity and clock recovery.) The 10-bit encoded output TX_dataout[9:0]
will map to bits {jhgf iedcba}per the labeling used in IEEE 802.3-2005 clause 36.
Symbols and Comma Character
While translating 8-bit words into 10-bit symbols, the 8b/10b encoder (in SerDes PCS) form
two groups of data. The lower 5-bits of data are encoded into a 6-bit group and the upper 3-
bits of data are encoded into a 4-bit group. Furthermore, there are 12 control symbols that are
used by 8b/10b encoding scheme for special purposes and are called K-symbols. For instance
three of these control symbols can be used for defining the boundary between data packets.
These three control symbols are called comma symbols.
The 8b/10b encoder generates 10-bit code groups from 8-bit data and a 1-bit control input. It
uses the code group mapping specified in IEEE 802.3 clause 36. If the fabric interface is a 16-
bit data path, then two 8b/10b encoders are cascaded to produce a 20-bit code group output
to the PMA for serialization. The 1-bit control input (datak signal) is used to identify whether
data being transmitted is a comma symbol. Asserted value for datak signal on control-line
indicates that the symbol on data-line is a comma symbol.
In Section-“Design and Wrapper Files” of the Chapter – “Design Flow: Creating a SerDes
Design”, details are provided on how to transmit 8’hBC (K.28.5) as comma symbol and 1’b1
as control signal, for a sample design. For a 20-bit data width, that design essentially uses
{2’h1, 8’hBC, 2’h1, 8’hBC}. In other words, while sending a comma symbol, TX_data[8:8] =
TX_data[18:18] = 1’b1 is sent through the control-line.
Note: On the receiver end, when the decoder finds an ‘asserted’ control-bit on control-line, it
will consider the symbol on data-line as a comma symbol. Error conditions occur if the datak
signal is asserted while there is no comma symbol on the data line (e.g. K21.5).
Running Disparity
A non-encoded data stream may have differences between the number of 1’s and the number
of 0’s. The primary goal of using running disparity in the encoding scheme is to limit the
difference between the number of 1’s and the number of 0’s that are being transmitted. This
ensures DC balance on the transmission line. A side-benefit of using running disparity is that
information from running disparity can be used in locating transmission errors. This ensures
that the output data is DC balanced. The maximum run length for 8b/10b words is 5 bits.
20
UG028, July 1, 2014