CertusPro-NX SerDes/PCS Usage Guide
Preliminary
Technical Note
56
© 2020-2021 Lattice Semiconductor
FPGA-TN-02245-0.81
All rights reserved. CONFIDENTIAL
mode) directly. This forcing data mode is implemented for protocol like SLVS-EC that needs 8B/10B encoding/decoding,
but needs to send some invalid 10b code sometimes.
Note: The “force data” function takes precedence over “force disparity” and “invert disparity” if they are enabled
simultaneously.
The IEEE 802.3 standard, clause 36, specifies two idle order sets (/I1/ and /I2/) for the transmitter. The /I1/ ordered set
consists of a negative disparity /K28.5/ (10’h283) followed by a /D5.6/ code group. (A /D5.6/ has the same value,
10’h1A5, for the positive and negative disparity versions, and has a balanced 10-bit code.) The /I1/ ordered set should
be transmitted only once, if the running disparity before the idle is positive. The /I2/ ordered set consists of a positive
disparity /K28.5/ (10’h17C) followed by a negative disparity /D16.2/ (10’h289) code group. The /I2/ ordered set can
start the idle sequence, if the disparity before the idle sequence is negative. Otherwise, /I2/ follows a /I1/ ordered set
and is continually transmitted, maintaining a negative running disparity until the end of the Inter-Packet Gap (IPG).
However, from the FPGA soft-logic side, the current disparity state of the transmitter is unknown. This is where the
inline bit “cordisp” comes into play. If the “cordisp” is asserted for one clock cycle upon entering an IPG, while “cntl”=0,
“txdata”=0x50, it forces this module to output a /I1/ ordered-set into the transmit data stream, if the current disparity
is positive. However, if the current disparity is negative, no change is made to the transmitted data stream. For the
remainder of the IPG, /I2/s should be driven into the MPCS and the “cordisp” should remain de-asserted.
The /I2/ Ordered set is replaced with /I1/ automatically, when MPCS is working in GigE (1000BASE-X) mode.
This 8B/10B encoder also supports interleaving mode when performing 8B/10B encoding. In this mode, the current
input 8b data is used to calculate a new value of running disparity. The new value can then be used as running disparity
for encoding the input data after the next data. However, the data stream seems to be separated into two streams,
encoded independently and then merged to one steam again. Finally, the encoded data are transmitted to PMA with
the same order as that they enter the 8B/10B encoder. An example is given below.
The input byte sequence is:
B0 (first input byte) -> B1 -> B2 -> B3 -> B4 -> B5 ...
During encoding,
B2 uses running disparity from B0 (rather than B1);
B3 uses running disparity from B1;
B4 uses running disparity from B2;
…
Since the disparity rule is violated, this mode is only used for protocols, like RXAUI, in which merging two data streams
takes place after 8B/10B encoding.
8B/10B Decoder
The decoder performs the 10-bit to 8-bit code conversion along with verifying the running disparity. Corresponding to
the encoder, the 8B/10B Decoder implements two mode: 1-byte mode and 2-byte mode. In 1-byte mode, the decoder
decodes one 10b data in one clock cycle; in 2-byte mode, the decoder decodes two 10b data in one clock cycle.
This decoder supports running disparity error detection feature based on the 10-bit code it received. The current
running disparity is based on the disparity calculation of the last code received. If negative disparity is calculated for the
last 10-bit code, a neutral or positive disparity 10-bit code is expected. If the decoder does not receive a neutral or
positive disparity 10-bit code, the “rx_errdisp” signal goes high. If a positive disparity is calculated, a neutral or negative
disparity 10-bit code is expected. In this situation, the rx_errdisp signal goes high, if the code received is not what are
expected.
If the code received is not a valid encoded data character or control character, the “rx_errcode” signal goes high. This
signal is aligned to the invalid code word received at fabric.
The inline bit “rundisp” represents the current running disparity:
1 = positive
0 = negative
The decoder also supports the interleaving mode when performing 8B/10B decoding. In this mode, the current input
8b data is used to calculate a new value of running disparity. The new value can then be used as running disparity for
decoding the input data after the next data. This is symmetric function to the 8B/10B encoder interleaving mode. Refer
to 8B/10B encoder interleaving mode for more detailed description and potential application scenario.