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:
- Local Fault—When XGMII RX detects ≥ 4 consecutive Local Fault sequences, it updates the link condition and communicates with XGMII TX to transmit a remote fault sequence.
- Remote Fault—When XGMII RX detects ≥ 4 consecutive Remote Fault
sequences, it updates the link condition and communicates with XGMII TX to
transmit
Idle. - Link Interrupt—When XGMII RX detects ≥ 4 consecutive Link Interrupt
sequences, it updates the link condition and communicates to the XGMII TX to
transmit
Idle.
To exit a faulty link condition, the Ethernet 10G MAC core RX requiress ≥128 consecutive non-faulty sequences.
- If the current link condition is No Link Fault, a single or 2 local fault
sequences do not constitute a new faulty link condition. Hence, the Ethernet 10G MAC core retains the current No Link Fault status. XGMII
TX continues to serve
RX_QUANT,tx_pause_gen, orTX_AXIsignals based on the original priority. - If the current link condition is Remote Fault, an alternating sequence of
no-fault and local fault does not warrant a new faulty link condition. Hence,
the link condition maintains the existing Remote Fault status. XGMII TX
continues to output
IDLE. - If the current link condition is Local Fault, a data frame with a frame length
of 146 (the data frame is preceded by
PREAMBLEandSFD, payload size = 128 octets), not including RX IPG, contributes a total of 39 no-fault sequences. Hence, the link condition persists with Local Fault. XGMII TX continues to transmit Remote Fault sequences.
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.
| Fault Detection at XGMII RX | Link Condition | XGMII TX Transmission |
|---|---|---|
| ≥ 4 consecutive local fault | Local Fault | Remote fault sequence |
| ≥ 4 consecutive remote fault | Remote Fault | Idle |
| ≥ 4 consecutive link interrupt | Link Interrupt | Idle |
| ≥ 128 consecutive non-fault sequences | No Link Fault | One of the following, in descending
priority:
|
| < 4 consecutive sequences of the same fault type | No update on link condition, i.e., retain the current link condition | Depends on the current link condition. |
TX_AXI_TREADYdeasserts to hold any incomingTX_AXIsignals.tx_pause_busyasserts in response to any assertion from thetx_pause_geninput port.
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.
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.RX_QUANT means pause for 64 octets, i.e.,
a single Quant spans 8 clock cycles.RX_QUANTFigure 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.