Triple-Speed Ethernet Intel® FPGA IP User Guide

ID 683402
Date 5/30/2022
Public
Document Table of Contents

4.1.9. MAC Local Loopback

You can enable local loopback on the MII/GMII/RGMII of the MAC function to exercise the transmit and receive paths. If you enable local loopback, use the same clock source for both the transmit and receive clocks. If you use different clock sources, ensure that the difference between the transmit and receive clocks is less than ±100 ppm.

To enable local loopback:

  1. Initiate software reset by setting the SW_RESET bit in command_config register to 1.

    Software reset disables the transmit and receive operations, flushes the internal FIFOs, and clears the statistics counters. The SW_RESET bit is automatically cleared upon completion.

  2. When software reset is complete, enable local loopback on the MAC's MII/GMII/RGMII by setting the LOOP_ENA bit in command_config register to 1.
  3. Enable transmit and receive operations by setting the TX_ENA and RX_ENA bits in command_config register to 1.
  4. Initiate frame transmission.
  5. Compare the statistics counters aFramesTransmittedOK and aFramesReceivedOK to verify that the transmit and receive frame counts are equal.
  6. Check the statistics counters ifInErrors and ifOutErrors to determine the number of packets transmitted and received with errors.
  7. To disable loopback, initiate a software reset and set the LOOP_ENA bit in command_config register to 0.

Did you find the information on this page useful?

Characters remaining:

Feedback Message