AN 647: Single-Port Triple Speed Ethernet and On-Board PHY Chip Reference Design

ID 683344
Date 12/14/2015
Public

1.4.3. Avalon-ST Reverse Loopback Test

Complete the tasks to run the Avalon-ST reverse loopback test.
Set up the development board. The Avalon-ST reverse loopback test requires an external Ethernet packet generator.
  1. Using the Ethernet cable assembly, connect the external generator to the RJ-45 port of the FPGA development board.
  2. Connect the programming cable to the JTAG connection port.
  3. Connect the board to the power supply input (J4).
To run the internal MAC loopback test:
  1. Set up the System Console.
    1. Open Qsys.
    2. On the Tools menu, click System Console.
      The System Console is a debugging tool that provides you with Tcl scripts to perform low-level hardware debugging and run tests on your reference designs. The console communicates to the hardware components instantiated into your Qsys system reference designs through the JTAG to Avalon Master Bridge.
  2. Open the config.tcl script and set LOOP_ENA to 0 to disable the MAC loopback mode.
    For more information, refer to Configuration Script.
  3. Type the following command to start the MAC and PHY configurations in the System Console:
    source config.tcl
    The System Console displays the copper link connection status and the PHY’s operating speed and mode. Verify that the console displays the correct configurations
  4. Start sending Ethernet packets from the external packet generator to the FPGA development board and verify that the packets are correctly looped back to the external packet generator.
  5. Type the following command to view the MAC statistic counters:
    source tse_stat_read.tcl