Functional Description
■
■
■
Neutral disparity indicates the number of 1s and 0s are equal.
Positive disparity indicates more 1s than 0s.
Negative disparity indicates more 0s than 1s.
The MegaCore function is designed to maintain a neutral average
disparity. Average disparity determines the direct current (DC)
component of a serial line. Running disparity is a record of the
cumulative disparity of every encoded word, and is tracked by the
encoder. To guarantee neutral average disparity, a positive running
disparity must be followed by neutral or negative disparity; a negative
running disparity must be followed by neutral or positive disparity.
The running disparity error output (rderr) is asserted when any of the
following rules apply:
■
■
■
■
The current running disparity is positive and the 6-bit group has
more ones than zeros or is 111000
The current running disparity is negative and the 6-bit group has
more zeros than ones or is 000111
The running disparity after 6-bit group is positive and the 4-bit group
has more ones than zeros or is 1100
The running disparity after 6-bit group is negative and the 4-bit
group has more zeros than ones or is 0011
1
rderris asserted for some invalid 10-bit codes and not for
others, strictly based on the rules stated above. The
computation of rderris completely independent of that of
the special control character error (kerr) signal.
1
A 10-bit code that corresponds to a valid encoding but that
has the wrong disparity—though technically an invalid
code—does not cause the kerrsignal to be asserted. Only
rderris asserted.
f
For details on running disparity rules, refer to the IEEE 802.3z
specification, paragraph 36.2.4.4.
Generic Framing Procedure
The 8B10B Encoder/Decoder MegaCore function can be used within
generic framing procedure (GFP) applications. See Figure 3–2 on
page 3–3 for an example.
3–2
MegaCore Version 7.2
Altera Corporation
October 2007
8B10B Encoder/Decoder MegaCore Function User Guide