Specifications
Figure 3–3 shows a block diagram of the encoder.
Figure 3–3. Encoder
clk
kerr
reset_n
kin
dataout [9:0]
valid
ena
idle_ins
datain [7:0]
rdin
rdout
rdcascade
rdforce
Disparity
The running disparity can be forced to positive or negative, allowing the
user to insert a special resynchronization pattern, or disparity errors.
When the rdforceinput is asserted, the value on the rdinport is
assumed to be the current running disparity. Setting rdinto 0 forces the
encoder to produce an encoded word with positive or neutral disparity.
Setting rdinto 1 forces the encoder to produce an encoded word with
negative or neutral disparity.
Cascaded Encoding
Two encoders can be cascaded to allow for 16-bit word encoding. The
encoders are cascaded by connecting the rdcascadeoutput of the most
significant byte (MSByte) encoder to the rdininput of the least
significant byte (LSByte) encoder, and by connecting the rdoutoutput of
the LSByte encoder to the rdininput of the MSByte encoder. These
connections ensure proper running disparity computation. The rdforce
inputs must be asserted (active high) for the encoders to take into account
the value on the rdininputs, rather than use their internally generated
running disparity. Both enainputs must be high or low at the same time.
The kin[1]signal relates to datain[15:8], and kin[0]relates to
datain[7:0]. Figure 3–4 on page 3–6 shows two encoders connected
together to perform cascaded encoding.
If the encoded words are to be transmitted serially, the result of encoding
datain[15:8]should be transmitted first.
Altera Corporation
October 2007
MegaCore Version 7.2
3–5
8B10B Encoder/Decoder MegaCore Function User Guide