4B5B
This article needs additional citations for verification. (March 2009) |
In
An alternative to using 4B5B coding is to use a
Depending on the standard or specification of interest, there may be several 5-bit output codes left unused. The presence of any of the unused codes in the data stream can be used as an indication that there is a fault somewhere in the link. Therefore, the unused codes can be used to detect errors in the data stream.
Applications
4B5B was popularized by Fiber Distributed Data Interface (FDDI) in the mid-1980s. It was adopted for digital audio transmission by MADI in 1989.[1] and by Fast Ethernet in 1995.
The name 4B5B is generally taken to mean the FDDI version. Other 4-to-5-bit codes have been used for magnetic recording and are known as group coded recording (GCR), but those are (0,2) run-length limited codes, with at most two consecutive zeros. 4B5B allows up to three consecutive zeros (a (0,3) RLL code), providing a greater variety of control codes.
On optical fiber, the 4B5B output is
The 4B5B encoding is also used for
Clocking
4B5B codes are designed to produce at least two transitions per 5 bits of output code regardless of input data. The transitions provide necessary transitions for the receiver to perform
There are eight 5-bit codes that have 3 consecutive 0s: 00000, 00001, 00010, 01000, 10000, 00011, 10001, 11000. This leaves 24 codes available.
Encoding table
|
|
|
Three consecutive zero bits only appear in normal data when a code ending with two 0 bits (2, E) is followed by a code beginning with a 0 bit (1, 4, 5, 6, 7), so will always appear separated by multiples of the 5-bit encoded symbol length (and never separated by a single symbol). Violations of this property are used for special synchronization codes.
Command characters
The following codes are sometimes referred to as command characters. They are commonly used in pairs, although
Control character | 5b symbols | Purpose |
---|---|---|
JK | 11000 10001 | Sync, Start delimiter |
I | 11111 | 100BASE-X idle marker |
T | 01101 | USB-PD end delimiter |
TT | 01101 01101 | FDDI end delimiter |
TS | 01101 11001 | Not used |
IH | 11111 00100 | SAL |
TR | 01101 00111 | 100BASE-X end delimiter |
SR | 11001 00111 | Not used |
SS | 11001 11001 | Not used |
H | 00100 | 100BASE-X transmit error |
JJJK | 11000 11000 11000 10001 | USB-PD Start Of Packet (SOP) |
JJLL | 11000 11000 00110 00110 | USB-PD SOP′ |
JLJL | 11000 00110 11000 00110 | USB-PD SOP″ |
JSSL | 11000 11001 11001 00110 | USB-PD SOP′_Debug |
JSLK | 11000 11001 00110 10001 | USB-PD SOP″_Debug |
RRRS | 00111 00111 00111 11001 | USB-PD Hard Reset |
RJRL | 00111 11000 00111 00110 | USB-PD Cable Reset |
See also
- GCR 4B-5B encoding
References
- ^ AES10-2008 (r2019): AES Recommended Practice for Digital Audio Engineering - Serial Multichannel Audio Digital Interface (MADI), Audio Engineering Society
- ^ "5.3 Symbol Encoding". Universal Serial Bus Power Delivery Specification. Revision 2.0 Version 1.3. USB Implementers Forum. 12 January 2017. p. 105.
4b5b line code Shall be used. This encodes 4-bit data to 5-bit symbols for transmission and decodes 5-bit symbols to 4-bit data for consumption by the receiver.