beautypg.com

Disparity –4 cascaded encoding –4, Disparity, Cascaded encoding – Altera 8B10B Encoder/Decoder MegaCore Function User Manual

Page 22

background image

3–4

Chapter 3: Specifications

Functional Description

8B10B Encoder/Decoder MegaCore Function User Guide

May 2011

Altera Corporation

The encoder encodes invalid characters in the same way it encodes Idle (K28.5) codes.
The decoder treats invalid characters as Idle codes.

Figure 3–3

shows a block diagram of the encoder.

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

rdforce

input is asserted, the value on the

rdin

port is assumed to be the

current running disparity. Setting

rdin

to 0 forces the encoder to produce an encoded

word with negative or neutral disparity. Setting

rdin

to 1 forces the encoder to

produce an encoded word with positive or neutral disparity.

Cascaded Encoding

Two encoders can be cascaded to allow for 16-bit word encoding. The encoders are
cascaded by connecting the

rdcascade

output of the most significant byte (MSByte)

encoder to the

rdin

input of the least significant byte (LSByte) encoder, and by

connecting the

rdout

output of the LSByte encoder to the

rdin

input 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

rdin

inputs, rather than use their internally generated running disparity.

Both

ena

inputs 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–5

shows two

encoders connected together to perform cascaded encoding.

Figure 3–3. Encoder

clk

reset_n

kin

ena

rdin

rdcascade

rdout

valid

kerr

datain [7:0]

dataout [9:0]

rdforce

idle_ins