Technical data
(4) 4B/5B encoding/decoding
In 100BASE-TX mode, 4B/5B coding is used. The 4B/5B encoder converts 4-bit nibbles coming from
the MII interface to 5-bit symbols that are referred to as “code-groups”. The relation between original
and encoded data is shown in
Table 2.
For testing purposes the encoder and decoder can be bypassed with the Enable 4B5B bit in the PHY
special control/status register. In this case the 5th bit of the output pattern reflects the current level of
the TX_ERR_P(2:1) signal of the MII interface.
Code group Name Transmitter Receiver
from MAC via MII Interpretation Interpretation to MAC via MII
11110 0 0000 Data 0 Data 0 0000
01001 1 0001 Data 1 Data 1 0001
10100 2 0010 Data 2 Data 2 0010
10101 3 0011 Data 3 Data 3 0011
01010 4 0100 Data 4 Data 4 0100
01011 5 0101 Data 5 Data 5 0101
01110 6 0110 Data 6 Data 6 0110
01111 7 0111 Data 7 Data 7 0111
10010 8 1000 Data 8 Data 8 1000
10011 9 1001 Data 9 Data 9 1001
10110 A 1010 Data A Data A 1010
10111 B 1011 Data B Data B 1011
11010 C 1100 Data C Data C 1100
11011 D 1101 Data D Data D 1101
11100 E 1110 Data E Data E 1110
11101 F 1111 Data F Data F 1111
11111 I
Sent after /T and /R (end of stream)
until TX_EN_P(2:1) is asserted
again
Idle
11000 J
Sent, when TX_EN_P(2:1) is
asserted
1
st
nibble of start of stream data
(SSD); translates to 0101 if
received after “idle”; otherwise
RX_ERR_P(2:1) is asserted
10001 K Sent after /J
2
nd
nibble of SSD; translates to
0101 if received after /J; otherwise
RX_ERR_P(2:1) is asserted
01101 T
Sent when TX_EN_P(2:1) is deas
serted
1
st
nibble of end of stream data
(ESD); translates to 1010 and
causes deassertion of CRS_P(2:1)
when fol lowed by /R; otherwise
RX_ERR_P(2:1) is asserted
00111 R Sent after /T
2
st
nibble of ESD; translates to
1010 and causes deassertion of
CRS_P(2:1) when preceded by /T;
otherwise RX_ERR_P(2:1) is
asserted
00100 H
Sent when TX_ERR_P(2:1) is
asserted
Transmit error Undefined
all others V Invalid code
Invalid code; RX_ERR_P(2:1) is
asserted if received while
RX_DV_P(2:1) is active
Table 2: 4B/5B Code Table
Copyright © Siemens AG 2008. All rights reserved. Page 11 ERTEC 200 PHY
Technical data subject to change Version 1.0.0










