F-Tile Ethernet Intel® FPGA Hard IP User Guide

ID 683023
Date 11/20/2024
Public
Document Table of Contents

4.4.4. RX Virtual Lane Offset Calculation for No FEC Variants

  1. Lock the RX PCS.

    The RX PCS must be fully aligned before extracting VL Offset data. Wait for o_rx_pcs_fully_aligned to be asserted.

  2. Read the VL data for each of the Local Virtual Lanes (VL):

    Perform the read operation from o_rx_pcs_status[mode] register via CSR interface. This returns VL data field data for all 20 virtual lanes.

  3. Set the Physical Lanes for each Remote Virtual Lane:
    Step through the data provided by each Local Virtual lane:
    • Each lane provides a REMOTE_VL and a LOCAL_PL value.

    For each of the 20 possible Remote virtual lanes, set PL[REMOTE_VL] = LOCAL_PL.

    For example, if you read Local Virtual lane 12, and get back REMOTE_VL = 5, LOCAL_PL = 2, that means the data for Virtual lane 5 from the link partner is coming in on our Physical lane 2. You store that as PL[5] = 2.

  4. To calculate PTP timestamps, the MAC uses aligner information from the PCS to translate the timestamp of a random Serdes bit to that of an Alignment Marker bit. This difference is called the Virtual Lane Offset:
    For 100G/50G, the status registers in the register maps provide the Aligner information:
    • ptp_vl_data_hi[19:0]
    • ptp_vl_data_lo[19:0]
    • ptp_lal[4:0] = This register indicates which local lane last received its alignment marker. This register is not used for VL OFFSET calculations

    When a sync_pulse is received, the PCS snapshots its aligner states and stores them in ptp_vl_data_hi and ptp_vl_data_hi. The MAC reads this from CSRs and calculates the bits between bit 0 of the sync block and bit 0 of the last AM received (Virtual Lane Offset).

  5. Calculate the Virtual Lane Offsets for each of the Remote Virtual Lanes in bits:
    For 100GE rate:
        Virtual Lane Offset = sync_pulse to last AM  
       = gb_33_66_occupancy + gb_66_110_occupancy + blk_align_occupancy
       + am_detect_occupancy + am_count - local_lane_adjust
    
    • gb_33_66_occupency (in PL bits) = ptp_gb33_66_occupancy (from register map)
    • gb_66_110_occupancy (in PL bits) = ptp_gb110_occupancy (from the register map)
    • blk_align_occupancy (in VL bits) = ptp_blk_align_occupancy (from register map) x 5 to convert to PL bits.
    • am_count (in VL blocks) = ptp_am_count (from the register map) x 66b/block x 5 to convert to PL bits
    • local_lane_adjust (in PL bits) = local_vl %5 (This is the bit offset of the local lane’s bit 0 from bit 0 of the interleaved sync block from PHY)
    For 50GE rate:
       Virtual Lane Offset = sync_pulse to last AM  
      = gb_33_66_occupancy + sep50_occupancy + blk_align_occupancy
      + am_detect_occupancy + am_count - local_lane_adjust
    • gb_33_66_occupancy (in PL bits) = ptp_gb_33_66_occupancy from the register map
    • sep50_occupancy (in PL bits) = ptp_gb110_occupancy from the register map
    • blk_align_occupancy (in VL bits) = ptp_blk_align_occupancy from the register map, x 2 to covert to PL bits
    • am_detect_occupancy (in VL bits) = ptp_am_detect_occupancy from the register map, x2 to convert to PL bits
    • am_count (in VL blocks) = ptp_am_count from the register map, x66b/block x 2 to convert to PL bits
    • local_lane_adjust (in PL bits) = local_vl %2 (This is the bit offset of the local lane’s bit 0 from bit 0 of the interleaved sync block from PHY)
  6. Apply shifts to the offsets for REMOTE_VLs {18..19} to account for the mii_am/mii_data reordering that happens in the PCS MII Decoder. This step is applicable for 50GE-2 and 100GE rates only.
    • Generate vl_offset_bits shifted for each of the REMOTE_VLs.
    • When using RX PTP on data from the RX PCS, shift the times for REMOTE_VLs 18 to 19 by -330 bits:
      vl_offset_bits_shifted[REMOTE_VL] = vl_offset_bits[REMOTE_VL] -330 for REMOTE_VL == {18..19}
      vl_offset_bits_shifted[REMOTE_VL] = vl_offset_bits[REMOTE_VL] for REMOTE_VL == {0..17}

      This shift accounts for a shift that is applied by the RX PCS to incoming data.

      For example, if vl_offset_bits[18] == 887, set vl_offset_bits_shifted[18] to 557. If vl_offset_bits[17] == 887, set vl_offset_bits_shifted[17] to 887.

    Note: For 50GE-2 rates, follow same instructions except only apply the shifting to VL3.
  7. Convert the vl_offset_bits to VL_OFFSET (in ns):
    For each REMOTE_VL, VL_OFFSET[REMOTE_VL] = vl_offset_bits_shifted[REMOTE_VL] * RX_UI