Ethernet Subsystem Intel® FPGA IP User Guide: Early Access Customer Release

ID 773413
Date 4/14/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

4.1.11. enable_loopback for F-Tile

Issuing the enable_loopback SAL command enables the serial loopback mode on FGT and FHT PMA (port 0 - 19). Below are the CSR sequences carried out by NIOS FW to enable serial loopback for F-tile transceiver PMA.

For FHT PMA (port 16 - 19),

  • Assert rx_reset.
  • Write 1'b1 to 0x45800[14] CSR register bit to enable serial internal loopback.
  • Deassert rx_reset.
  • Set car_tx_clk_src_sel (0x60000[2]) to 1’b1.
  • Set cfg_tx_bus_take_dft (0x45804[0]) to 1’b1. If using multi-lanes, set 1’b1 to all lanes.
  • Set cfg_lane_tx_prbs_en (0x42934[0]) to 1’b1. If using multi-lanes, set 1’b1 to all lanes.
  • Specify the PRBS generator pattern cfg_lane_tx_prbs_mode (0x42934[4:1]). If using multi-lanes, specify for all lanes.
  • Set cfg_lane_tx_prbs_init (0x4293C[0]) to 1’b1. If using multi-lanes, set 1’b1 to all lanes.
  • Set cfg_dft_rx_prbs_common_en (0x42930[0]) to 1’b1. If using multi-lanes, set 1’b1 to all lanes.
  • Specify the PRBS verifier pattern, cfg_dft_rx_prbs_sel (0x42930[4:1]). If using multi-lanes, specify for all lanes.
  • Set cfg_rx_dft_data_sel (0x42930[6:5]) to 2’b00. If using multi-lanes, set 2’b00 to all lanes.
  • Set cfg_ber_symb_cnt_limit_lsb (0x428EC[31:0]). If using multi-lanes, set for all lanes.
  • Set cfg_ber_symb_cnt_limit_msb (0x428F0[31:0]). If using multi-lanes, set for all lanes.
  • Set cfg_dft_ber_count_en (0x428DC[0]) to 1’b1. If using multi-lanes, set 1’b1 to all lanes.
  • Set cfg_dft_ber_count_mode (0x428DC[2:1]) to 2’b10. If using multi-lanes, set 2’b10 to all lanes.
For FGT PMA (port 0 - 15),
  • Assert rx_reset.
  • Enable serial loopback:
    1. Write 0x6A040 to address 0x9003C.
    2. Poll address 0x90040 until bit 14 = 0 and bit 15 = 1.
    3. Write 0x62040 to address 0x9003C.
    4. Poll address 0x90040 until bit 14 = 0 and bit 15 = 0.
  • Deassert rx_reset.
  • Confirm the channel is in serial loopback:
    1. Read out register 0x4781C; bit 1 should be high if serial loopback is enabled.
  • Check the FGT PMA’s status:
    1. Write 0x800D to address 0x9003C.
    2. Poll address 0x90040 until bit 15 = 1; bit 16 should also be high if the channel is located in physical local 0.
    3. Write 0x000D to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.
  • Set the PRBS31 pattern for both the TX and RX PMAs:
    1. Write 0x30CA041 to address 0x9003C.
    2. Poll address 0x90040 until bit 15 = 1.
    3. Write 0x30C2041 to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.
  • Set up the PMA to count the number of bit errors:
    1. Write 0x14A045 to address 0x9003C.
    2. Poll address 0x90040 until bit 15 = 1.
    3. Write 0x14C2045 to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.
    Note: This example selects the PRBS31 pattern for both the TX and RX PMA lanes and hence bits [27:16] for register 0x9003C are set to 0x30C. To select other PRBS patterns, set bits [27:16] for register 0x9003C as follows:
    • PRBS7: 0x208
    • PRBS9: 0x249
    • PRBS11: 0x28A
    • PRBS23: 0x2CB
    • QPRBS13: 0x34D
    • PRBS13Q: 0x820
    • PRBS31Q: 0x861
    • SSPR: 0x8A2
    • SSPR1: 0x8E3
    • SSPRQ: 0x924
    • PRBS13: 0x965
  • Start the test:
    1. Write 0x20A00F to address 0x9003C.
    2. Poll address 0x90040 until bit 15 = 1.
    3. Write 0x20200F to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.
  • Check that the test is running:
    1. Write 0x8049 to address 0x9003C.
    2. Poll address 0x90040 until bit 15 = 1; bits 25:24 should be 0x1 to indicate the test is running.
    3. Write 0x0049 to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.
  • Set up the PRBS generator to inject errors:
    1. Write 0x123A042 to address 0x9003C to inject 0x123 errors.
    2. Poll address 0x90040 until bit 15 = 1.
    3. Write 0x1232042 to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.
  • Tell the PRBS generator to inject errors:
    1. Write 0x23A00F to address 0x9003C.
    2. Poll address 0x90040 until bit 15 = 1.
    3. Write 0x23200F to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.
  • Stop the BER test:
    1. Write 0x21A00F to address 0x9003C.
    2. Poll address 0x90040 until bit 15 = 1.
    3. Write 0x21200F to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.
  • Check the test completed successfully:
    1. Write 0x8049 to address 0x9003C.
    2. Poll address 0x90040 until bit 15 = 1; bits 25:24 should be 0x3.
    3. Write 0x0049 to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.
  • Read out the 12 LSB of the error count:
    1. Write 0x804A to address 0x9003C.
    2. Poll address 0x90040 until bit 15 = 1; bits 27:16 represent the 12 LSBs of the error count.
    3. Write 0x004A to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.
  • Read out bits 27:12 of the error count:
    1. Write 0x804B to address 0x9003C.
    2. Poll address 0x90040 until bit 15 = 1; bits 31:16 represent bits 27:12 of the error count.
    3. Write 0x004B to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.
  • Read out bits 31:28 of the error count:
    1. Write 0x804C to address 0x9003C.
    2. Poll address 0x90040 until bit 15 = 1; bits 19:16 represent bits 31:28 of the error count.
    3. Write 0x004C to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.
  • Finish checking the PRBS and BER test:
    1. Write 0xA041 to address 0x9003C.
    2. Poll address 0x90040 until bit 15 = 1.
    3. Write 0x2041 to address 0x9003C.
    4. Poll address 0x90040 until bit 15 = 0.