Link Fault Sequence

The link fault sequence indicates the condition of the link between 2 Ethernet devices. The Ethernet 10G MAC core includes Detect Link Fault capability. By setting the Detect Link Fault option to Enable, the Ethernet 10G MAC core detects, decodes, and communicates the relevant sequences. When the Detect Link Fault option is set to Disable, there will be no link fault handling in Ethernet 10G MAC core. The following describes the mechanism of the link fault handling when the Detect Link Fault option is set to Enable.

There are 3 types of fault sequences: Local Fault, Remote Fault, and Link Interrupt. A sequence is based on a block of 32 bits. At the RX channel, every block of 32-bit data, together with its corresponding control bits, i.e., (XGMII_RXD[31:0] and XGMII_RXC[3:0]) or (XGMII_RXD[63:32] and XGMII_RXC[7:4]), is decoded to determine the type of the link fault sequences.

When ≥ 4 consecutive sequences of the same fault type occur at the RX channel, the Ethernet 10G MAC core has detected a faulty link condition. The condition for the fault sequences is as follows:

To exit a faulty link condition, the Ethernet 10G MAC core RX requiress ≥128 consecutive non-faulty sequences.

If ≥ 4 consecutive sequences of the same fault type do not occur at the RX channel, the link condition remains the same. The following are scenario examples:

Refer to Table 1, which describes the decoding mechanism of the link condition by XGMII RX and the XGMII TX transmission based on the link condition.

At XGMII TX, a faulty link condition has the highest priority. However, if a faulty link condition occurs in the middle of the TX transfer, whether it is a TX data frame or a TX pause frame, XGMII TX continues with the ongoing TX transfer until EOF. Upon EOF, if the link fault condition persists, the XGMII TX outputs the appropriate fault sequences. When XGMII TX is addressing a faulty link condition, the following may occur:

Refer to Figure 1, which illustrates how the link condition is updated and how XGMII TX prioritizes a faulty link condition above tx_pause_gen and TX_AXI signals.

If a faulty link condition occurs during pause mode with RX_QUANT, it will wait for the current single Quant to complete. Upon completion of the current single Quant, if the faulty link condition persists, it terminates the pause state and resets the remaining RX_QUANT to 0. Upon terminating pause mode, XGMII TX transmits the appropriate fault sequences, based on the prevailing faulty link condition. Refer to Figure 2.

Figure 2 illustrates the behavior of the signals at the RX AXI ST interface during a faulty and non-faulty link condition. During a faulty link condition, RX_AXI_TDATA outputs the content from XGMII_RXD, which includes the Local Fault sequence, the Remote Fault sequence, the Link Interrupt sequence, the Idle octet, the PREAMBLE, the Data, and the CRC. Upon exiting a faulty link condition and adopting a non-fault link condition, AXI RX ST outputs only data and CRC. During a faulty link condition, XGMII_RXD = IDLE appears as 07 at RX_AXI_TDATA. When there is no faulty link condition, XGMII_RXD = IDLE translates to 00 at RX_AXI_TDATA.

An occurrence of any fault sequence may not necessarily warrant a faulty link condition. If there is any single occurrence of fault sequence at XGMII_RXD during the ongoing streaming RX data, i.e., between PREAMBLE and EOF (EOF is denoted by TERMINATE octet), it signifies an unexpected end of frame. In this scenario, RX_AXI_TUSER asserts due to a CRC mismatch. Other statistics, such as cnt_rx_frame_undersized, cnt_rx_frame_oversized, and cnt_rx_frame_mismatched_length may also increment, depending on the actual value of the frame length when the link fault condition occurs. The behavior of RX_AXI_TKEEP, RX_AXI_TLAST, and RX_AXI_TVALID signals remains the same even if there is a faulty link condition. Refer to Figure 3.

A single occurrence of the Link Fault sequence occupies 4 octets. In the event that the singular Link Fault sequence occurs at the end of frame (EOF) and is followed immediately by PREAMBLE, as illustrated in Figure 4, it is equivalent to RX_IPG < 5.