Disparity error detector – Altera Stratix GX Transceiver User Manual
Page 125

Altera Corporation
5–13
January 2005
Stratix GX Transceiver User Guide
XAUI Mode
Disparity Error Detector
The 8B/10B decoder detects disparity errors based on which 10-bit code
it received. The disparity error is indicated at the optional rx_disperr
port. The current running disparity is based on the disparity calculation
of the last code received. The disparity calculation is described in
Appendix A, Data & Control Codes
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_disperr signal goes
high, which indicates that the code received had a disparity error.
If a positive disparity is calculated, a neutral or negative disparity 10-bit
code is expected. Rx_disperr goes high if the code received is not as
expected. When the rx_disperr signal is high, the rx_errdetect
signal also transitions high.
shows a case where the disparity is violated. A K28.5 code
has an 8-bit value of 8'hbc and a 10-bit value (jhgfiedcba). The 10-bit
value is 10'b0011111010 (10'h17c) for RD- or 10'b1100000101 (10'h283) for
RD+. Assume that the running disparity at time n-1 is negative, so the
expected code at time n is from the RD- column. Since a K28.5 does not
have a balanced 10-bit code (equal number of 1’s and 0’s), the expected
RD code toggles back and forth between RD- and RD+. At time n+3, the
8B/10B decoder received a RD+ K28.5 code (10'h283), which makes the
current running disparity negative. At time n+4, because the current
disparity is negative, a K28.5 from the RD- column is expected, but a
K28.5 code from the RD+ is received instead. This code prompts
rx_disperr
to go high during time n+4 to indicate that the K28.5 code
had a disparity error. The current running disparity at the end of time n+4
is negative, because a K28.5 from the RD+ column was received. Based on
the current running disparity at the end of time n+5, a positive disparity
K28.5 code (from the RD-) column is expected at time n+5.