F-Tile Ethernet Intel® FPGA Hard IP User Guide

ID 683023
Date 12/19/2022
Public

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

Document Table of Contents

7.15.3. TX 1-Step Timestamp Interface

When transmitting a 1-step PTP packet, the IP core modifies the PTP field on-the-fly. The IP core can change the UDP checksum or add extension bytes to adjust it. PTP headers can be part of the VLAN packets and can be encapsulated by UDP datagrams inside of the IPv4 and IPv6 packets.
Figure 58. Example of Ethernet Packet with a PTP HeaderThe figure depicts an Ethernet packet with PTP header embedded as an Ethernet payload in a simple non-VLAN packet.

The figure below shows how the PTP 1-step interface writes a 1-step timestamp to a PTP header. The timestamp signals are valid when i_tx_valid and i_tx_startofpacket signals are high. To initiate a timestamp request, the i_ptp_ins_ets signal must be high.

The PTP header must provide the offset of the starting octet of the timestamp field, compared to the first byte of the frame, as the i_ptp_ts_offset signal.
  • In above diagram, first byte of timestamp field is 48th byte, the byte offset (i_ptp_tx_offset) is 47.
  • The timestamp must not overwrite other fields such as headers or packet CRCs.
Figure 59. Using the IEEE 1588 TX 1-Step Timestamp Interface The figure depicts writing a 1-step timestamp to a PTP header. The actual timestamp offset for this packet is 48 octets. Offset of the correction field starting octet is 22 octets.
Table 63.  Signals of the 1-Step TX Timestamp InterfaceAll interface signals are clocked by i_clk_tx clock. The timestamp is always in 1588 v2 format.

Signal Name

Width

Description

i_ptp_ins_ets

i_ptp_ins_ets[1:0]

1 bit (10GE/25GE,50GE/100GE/200GE)

2 bits (400GE)

Insert an egress timestamp signal for the current TX packet when Ethernet rate is 10GE/25GE/50GE/100GE/200GE/400GE.
  • For TX MAC Avalon ST client interface, i_ptp_its_ets[0] is valid only when both TX valid (i_tx_valid) and TX SOP (i_tx_startofpacket) signals are asserted.
  • For TX MAC segmented client interface, i_ptp_ins_ets[0] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[7:0] contains the start of the packet (SOP).

    The i_ptp_ins_ets[1] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[15:8] contains the SOP.

  • Must not use when i_tx_skip_crc = 1. To recalculate the CRC for the TX packet, the TX skip CRC signal must be 0.
  • Must not use when i_ptp_ins_cf = 1. You cannot update residence time and insert an egress timestamp on the same packet.
  • Set the PTP timestamp field in the TX packet (i_ptp_ts_offset) to the byte position of the start of the timestamp field in the PTP header.
  • Set the PTP correction field in the TX packet (i_ptp_cf_offset) to the byte position of the start of the correction field in the PTP header.

i_ptp_ins_cf

i_ptp_ins_cf[1:0]

1 bit (10GE/25GE,50GE/100GE/200GE)

2 bits (400GE)

Update the correction field with residence time in the current TX packet when Ethernet rate is 10GE/25GE/50GE/100GE/200GE/400GE.
  • For TX MAC Avalon ST client interface, i_ptp_ins_cf[0] is valid only when both TX valid (i_tx_valid) and TX SOP (i_tx_startofpacket) signals are asserted.
  • For TX MAC segmented client interface, i_ptp_ins_cf[0] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[7:0] contains the start of the packet (SOP).

    The i_ptp_ins_cf[1] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[15:8] contains the SOP.

  • Must not use when i_tx_skip_crc = 1. To recalculate the CRC for the TX packet, the TX skip CRC signal must be 0.
  • Do not use when the egress timestamp signal (i_ptp_ins_ets) is asserted. You cannot update residence time and insert an egress timestamp on the same packet.
  • To calculate the residence time, use the i_ptp_tx_its signal to provide IP core with the ingress timestamp of the current packet when it entered the system.
  • Set the position of the PTP correction field in the TX packet (i_ptp_cf_offset) to the byte position of the start of the correction field in the PTP header.

i_ptp_zero_csum

i_ptp_zero_csum[1:0]

1 bit (10GE/25GE,50GE/100GE/200GE)

2 bits (400GE)

Overwrites the UDP checksum with zeros in the current TX packet when Ethernet rate is 10GE/25GE/50GE/100GE/200GE/400GE.
  • For TX MAC Avalon ST client interface, i_ptp_zero_csum[0] is valid only when both TX valid (i_tx_valid) and TX SOP (i_tx_startofpacket) signals are asserted.
  • For TX MAC segmented client interface, i_ptp_zero_csum[0] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[7:0] contains the start of the packet (SOP).

    The i_ptp_zero_csum[1] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[15:8] contains the SOP.

  • Must not use when i_tx_skip_crc = 1. To recalculate the CRC for the TX packet, the TX skip CRC signal must be 0.
  • Do not use when the update extended bytes field signal (i_ptp_update_eb) is asserted. You cannot set a UDP checksum to 0, and update an extension field to cancel out checksum changes on the same packet.
  • Set the position of the UDP checksum field in the TX packet (i_ptp_csum_offset) to the byte position of the start of the UDP checksum in the TX packet.

i_ptp_update_eb

i_ptp_update_eb[1:0]

1 bit (10GE/25GE,50GE/100GE/200GE)

2 bits (400GE)

Update the extended bytes field to cancel out checksum changes in the current TX packet when Ethernet rate is 10GE/25GE/50GE/100GE/200GE/400GE.

When asserted, overwrites the extended bytes field in an IPv6 packet carried inside the current TX packet with a value that cancels out changes to the checksum due to changes to the UDP packet.

  • For TX MAC Avalon ST client interface, i_ptp_update_eb[0] is valid only when both TX valid (i_tx_valid) and TX SOP (i_tx_startofpacket) signals are asserted.
  • For TX MAC segmented client interface, i_ptp_update_eb[0] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[7:0] contains the start of the packet (SOP).

    The i_ptp_update_eb[1] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[15:8] contains the SOP.

  • Must not use when i_tx_skip_crc = 1. To recalculate the CRC for the TX packet, the TX skip CRC signal must be 0.
  • Do not use when the overwrite a UDP checksum with zeros signal (i_ptp_zero_csum) is asserted. You cannot set a UDP checksum to 0, and update an extension field to cancel out checksum changes on the same packet.
  • You do not have to provide the byte position of the start of the UDP extension field in the TX packet. The IP core assumes that the byte position starts two bytes before the CRC field.

i_ptp_p2p

i_ptp_p2p[1:0]

1 bit (10GE/25GE,50GE/100GE/200GE)

2 bits (400GE)

Add peer-to-peer mean path delay to correction field for the current TX packet when Ethernet rate is 10GE/25GE/50GE/100GE/200GE/400GE.
  • For TX MAC Avalon ST client interface, i_ptp_p2p[0] is valid only when both TX valid (i_tx_valid) and TX SOP (i_tx_startofpacket) signals are asserted.
  • For TX MAC segmented client interface, i_ptp_p2p[0] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[7:0] contains the start of the packet (SOP).

    The i_ptp_p2p[1] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[15:8] contains the SOP.

  • Must not use when i_tx_skip_crc = 1. To recalculate the CRC for the TX packet, the TX skip CRC signal must be 0.

i_ptp_asym

i_ptp_asym[1:0]

1 bit (10GE/25GE,50GE/100GE/200GE)

2 bits (400GE)

Add asymmetric latency to the correction field for the current TX packet when Ethernet rate is 10GE/25GE/50GE/100GE/200GE/400GE.
  • For TX MAC Avalon ST client interface, i_ptp_asym[0] is valid only when both TX valid (i_tx_valid) and TX SOP (i_tx_startofpacket) signals are asserted.
  • For TX MAC segmented client interface, i_ptp_asym[0] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[7:0] contains the start of the packet (SOP).

    The i_ptp_asym[1] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[15:8] contains the SOP.

  • Must not use when i_tx_skip_crc = 1. To recalculate the CRC for the TX packet, the TX skip CRC signal must be 0.

i_ptp_asym_sign

i_ptp_asym_sign[1:0]

1 bit (10GE/25GE,50GE/100GE/200GE)

2 bits (400GE)

Sign of an asymmetry delay added to the correction field for the current TX packet when Ethernet rate is 10GE/25GE/50GE/100GE/200GE/400GE.
  • 0: Asymmetry delay is a positive value.
  • 1: Asymmetry delay is a negative value.
  • For TX MAC Avalon ST client interface, i_ptp_asym_sign[0] is valid only when both TX valid (i_tx_valid) and TX SOP (i_tx_startofpacket) signals are asserted.
  • For TX MAC segmented client interface, i_ptp_asym_sign[0] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[7:0] contains the start of the packet (SOP).

    The i_ptp_asym_sign[1] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[15:8] contains the SOP.

i_ptp_asym_p2p_idx[6:0]

i_ptp_asym_p2p_idx[13:0]

7 bits (10GE/25GE,50GE/100GE/200GE)

14 bits (400GE)

Index of asymmetry delay and peer-to-peer mean path delay in the configurable lookup table 18 when Ethernet rate is 10GE/25GE/50GE/100GE/200GE/400GE.
  • For TX MAC Avalon ST client interface, i_ptp_asym_p2p_idx[6:0] is valid only when both TX valid (i_tx_valid) and TX SOP (i_tx_startofpacket) signals are asserted.
  • For TX MAC segmented client interface, i_ptp_asym_p2p_idx[6:0] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[7:0] contains the start of the packet (SOP).

    The i_ptp_asym_p2p_idx[13:7] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[15:8] contains the SOP.

i_ptp_ts_offset[15:0]

i_ptp_ts_offset[31:0]

16 bits (10GE/25GE,50GE/100GE/200GE)

32 bits (400GE)

Presents the position of the PTP timestamp field in the TX packet when Ethernet rate is 10GE/25GE/50GE/100GE/200GE/400GE.
  • For TX MAC Avalon ST client interface, i_ptp_ts_offset[15:0] is valid only when both TX valid (i_tx_valid) and TX SOP (i_tx_startofpacket) signals are asserted.
  • For TX MAC segmented client interface, i_ptp_ts_offset[15:0] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[7:0] contains the start of the packet (SOP).

    The i_ptp_ts_offset[31:16] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[15:8] contains the SOP.

  • It is the offset of the first octet of the field from the start of the frame, where the first byte of the frame (the first destination MAC address octet) is position 0.
  • The PTP timestamp field is 10 octets long, starting from the position given by the offset. PTP adds the lower 16 bits of the 96-bit timestamp in the lower 2 octets of the correction field.
    CAUTION:
    You must set the offset to a position within the TX packet, or the PTP insertion operation fails. Also, you must not overlap the PTP fields.

i_ptp_cf_offset[15:0]

i_ptp_cf_offset[31:0]

16 bits (10GE/25GE,50GE/100GE/200GE)

32 bits (400GE)

Presents the position of the PTP correction field in the TX packet when Ethernet rate is 10GE/25GE,50GE/100GE/200GE/400GE.
  • For TX MAC Avalon ST client interface, i_ptp_cf_offset[15:0] is valid only when both TX valid (i_tx_valid) and TX SOP (i_tx_startofpacket) signals are asserted.
  • For TX MAC segmented client interface, i_ptp_cf_offset[15:0] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[7:0] contains the start of the packet (SOP).

    The i_ptp_cf_offset[31:16] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[15:8] contains the SOP.

  • It is the offset of the first octet of the field from the start of the frame, where the first byte of the frame (the first destination MAC address octet) is position 0.
  • The PTP correction field is 8 octets long, starting from the position given by the offset. PTP adds the lower 16 bits of the 96-bit timestamp in the lower 2 octets of the correction field..
    CAUTION:
    You must set the offset to a position within the TX packet, or the PTP insertion operation fails. Also, you must not overlap the PTP fields.

i_ptp_csum_offset[15:0]

i_ptp_csum_offset[31:0]

16 bits (10GE/25GE,50GE/100GE/200GE)

32 bits (400GE)

Position of the UDP checksum field in the TX packet when Ethernet rate is 10GE/25GE,50GE/100GE/200GE/400GE.
  • For TX MAC Avalon ST client interface, i_ptp_csum_offset[15:0] is valid only when both TX valid (i_tx_valid) and TX SOP (i_tx_startofpacket) signals are asserted.
  • For TX MAC segmented client interface, i_ptp_csum_offset[15:0] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[7:0] contains the start of the packet (SOP).

    The i_ptp_csum_offset[31:16] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[15:8] contains the SOP.

  • It is the offset of the first octet of the field from the start of the frame, where the first byte of the frame (the first destination MAC address octet) is position 0.
    CAUTION:
    You must set the offset to a position within the TX packet, or the PTP insertion operation fails. Also, you must not overlap the PTP fields.

i_ptp_tx_its[95:0]

i_ptp_tx_its[191:0]

96 bits (10GE/25GE,50GE/100GE/200GE)

192 bits (400GE)

Presents the ingress timestamp for the TX packet residence time calculation when Ethernet rate is 10GE/25GE,50GE/100GE/200GE/400GE.

The timestamp represents time when packet arrives in the system. To generate the residence time, the TX packet compares this timestamp to the time when packet left the system.

  • For TX MAC Avalon ST client interface, i_ptp_tx_its[95:0] is valid only when both TX valid (i_tx_valid) and TX SOP (i_tx_startofpacket) signals are asserted.
  • For TX MAC segmented client interface, i_ptp_tx_its[95:0] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[7:0] contains the start of the packet (SOP).

    The i_ptp_tx_its[191:96] is valid only when TX valid (i_tx_mac_valid) is asserted and i_tx_mac_inframe[15:8] contains the SOP.

  • The residence time value updated in the correction field is not valid if TX egress timestamp is larger than the TX ingress timestamp by 4 seconds.
18 The lookup table is accessible via the PTP tile adapter module's Avalon® memory-mapped interface. For more information, refer to PTP Asymmetry Delay Reconfiguration Interface and PTP Peer-to-Peer MeanPathDelay Reconfiguration Interface.