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

ID 683344
Date 12/14/2015
Public

1.4.2. Internal MAC Loopback Test

Complete the tasks to run the internal MAC loopback test.
Set up the development board.
  1. Connect the programming cable to the JTAG connection port.
  2. Connect the board to the power supply input.
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 1 to enable the MAC loopback mode.
  3. Type the following command to start the MAC and PHY configurations in the System Console:
    source config.tcl
    For more information, refer to Configuration Script.
    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. Open and edit the eth_gen_start.tcl script.
    For more information, refer to Ethernet Packet Generator Script.
  5. Type the following command to start generating Ethernet packets:
    source eth_gen_start.tcl
    The Ethernet Packet Monitor automatically starts when you start the Ethernet Packet Generator.
    • When the monitor receives all the Ethernet packets, the System Console displays the loopback test result.
    • If the monitor receives packets with error, the console displays the total number of packets received with error and the type of error for each packet.
  6. Type the following command to view the MAC statistic counters:
    source tse_stat_read.tcl