Gigabit Ethernet Debug Guide

Zynq UltraScale+ Device Technical Reference Manual (UG1085)

Document ID
UG1085
Release Date
2022-09-15
Revision
2.3 English

The gigabit Ethernet can encounter different kinds of errors while receiving or transmitting Ethernet frames. Refer to Zynq UltraScale+ MPSoC Register Reference (UG1087) [Ref 4] register details for more information on the transmit and receive error conditions listed in the description for gem.transmit_status and gem.receive_status registers, respectively.

Some common errors and the action necessary are described in Table: RX Status Errors and Table: TX Status Errors.

Table 34-18:      RX Status Errors

Error Condition

Necessary Action

RESP not OK

This is a condition where it is not easy for the controller to recover. Re-initialize the controller and buffer descriptors for receive and transmit paths after clearing the relevant register status bits: gem.receive_status[resp_not_ok] and gem.int_status[resp_not_ok].

Receive overrun

This condition implies that the packet is dropped because the packet buffer is full. It occurs occasionally when the controller is unable to process the packets when they arrive very fast. In most conditions, no action for error recovery needs to be taken. Ensure that the packet buffer is configured for 32 KB (see Configure the Controller) and clear bits gem.receive_status[receive_overrun] and gem.int_status[receive_overrun].

Notes:

On RX, there is no hard requirement to have multiple buffer descriptors, although it is recommended that you minimize the chance of getting buffer resource errors (where the hardware has a frame to write to memory, but there is no free buffer(s) to write to). Extreme overflow conditions in general are more likely when these buffer resource errors occur.

Table 34-19:      TX Status Errors

Error Condition

Necessary Action

RESP not OK

This is a condition where it is not easy for the controller to recover. Re-initialize the controller and buffer descriptors for receive and transmit paths after clearing the relevant register status bits: gem.transmit_status[resp_not_ok] and gem.int_status[resp_not_ok].

Transmit underrun

This implies a severe error condition on the transmit side in processing of the transmit buffers and buffer descriptors. For effective error recovery, the software must disable the transmitter by writing a 0 to the network_control[enable_transmit] bit, then re-initialize the buffer descriptors on the transmit side and enable the transmitter by writing a 1 to the gem.network_control[enable_transmit] bit. The bit gem.transmit_status[transmit_under_run] must be cleared in the interrupt handler.

Transmit buffer exhausted

This is a severe error condition on the transmit side. For effective error recovery, the software must disable the transmitter by writing a 0 to the network_control[enable_transmit] bit, then re-initialize the transmit buffer descriptors and transmitter. The register bits gem.transmit_status[amba_error] and gem.int_status[amba_error] must be cleared in the interrupt handler.

Retry limit exceeded

This implies there are a series of collisions for which an Ethernet frame could not be sent out even with multiple retries in half-duplex communication. Ethernet frames are dropped at the transmitter. The bits gem.transmit_status[retry_limit_exceeded] and gem.int_status[retry_limit_exceeded_or_late_collision] must be cleared in the interrupt handler. No drastic measures need to be taken for this error. However, it could also mean that there is a duplex setting mismatch.

Collisions

This error indicates that there are collisions for half duplex communication. Some collisions are expected in half-duplex mode and can be ignored. When a collision occurs, the frame is retransmitted after a while and the frame is not dropped. The register bit
gem.transmit_status[collision_occurred] must be cleared in the interrupt handler.

Notes:

On TX, GigE needs multiple descriptors with the last descriptor in the BD ring having the used bit set. It is needed to ensure the GigE does not wrap and attempt to transmit the same frames more than once.