beautypg.com

Character codes, Encoder, Character codes –3 encoder –3 – Altera 8B10B Encoder/Decoder MegaCore Function User Manual

Page 21

background image

Chapter 3: Specifications

3–3

Functional Description

May 2011

Altera Corporation

8B10B Encoder/Decoder MegaCore Function User Guide

Character Codes

In addition to 256 data characters, the 8b/10b code defines thirteen out-of-band
indicators, also called special control characters. The 256 data characters are named
Dx.y, and the special control characters are named Kx.y—except for the special code
10B_ERR (see

Table 3–1 on page 3–3

). The x value corresponds to the five-bit group,

and the y value to the three-bit group.

The special control characters indicate, for example, whether the data is idle, test data,
or data delimiters. In applications where encoded characters are transmitted bit-
serially, the comma character (K28.5) is usually used for alignment purposes as its 10-
bit code is guaranteed not to occur elsewhere in the encoded bit stream, except after
K28.7 which is normally only sent during diagnostic.

Table 3–1

lists the special K codes used by the MegaCore function.

Encoder

To encode an 8-bit word, the 8-bit value must be applied to the

datain

inputs and the

ena

input must be asserted (active high).

When one of the thirteen special 10-bit codes is to be inserted, the equivalent 8-bit
code is placed on the

datain

lines and the

kin

input is asserted. The MegaCore

function performs error checking to ensure the out-of-band 8-bit code is valid. If not,
the

kerr

output is asserted. See

Table 3–1

for a list of the valid K codes.

1

Although the 10B_ERR code is considered to be an invalid special character, it does
not cause the

kerr

signal to be asserted.

Idle (K28.5) characters can be automatically inserted when

ena

is not asserted by

asserting the

idle_ins

input.

Table 3–1. Character Codes

10-Bit Special K Codes

Equivalent 8-Bit Codes

K28.0

8'b000_11100

K28.1 8'b001_11100

K28.2 8'b010_11100

K28.3

8'b011_11100

K28.4

8'b100_11100

K28.5

(1)

8'b101_11100

K28.6

8'b110_11100

K28.7

8'b111_11100

K23.7

8'b111_10111

K27.7

8'b111_11011

K29.7

8'b111_11101

K30.7

8'b111_11110

10B_ERR

8'b111_11111

Note to

Table 3–1

:

(1) K28.5 is a comma character used for alignment purposes, and to represent the IDLE code.