1-Step Insertion - 1.3 English

Versal Devices Integrated 100G Multirate Ethernet MAC Subsystem Product Guide (PG314)

Document ID
PG314
Release Date
2021-02-05
Version
1.3 English

In 1-step insertion mode, egress PTP packets are modified in flight with a calculated timestamp. The PTP Timestamper logic takes in packet data from the TX interface, locates the embedded PTP packet, inserts the timestamp, (optionally) recalculates the UDP checksum, and recalculates the Ethernet FCS field.

Note: When ctl_tx_ptp_1step_enable = 0 field of the CONFIGURATION_1588_REG is set to 0, the timestamp insertion block is bypassed to minimize the latency through the TX MAC. Insertion is not supported for preempted packets (used in TSN).
The 1588 specification defines two supported timestamping modes:
Ordinary/Boundary Clock Mode
The time-of-day timestamp is inserted into a combination of the Timestamp and the Correction field of the PTP packet.
Transparent Clock
The Correction field contains a residence time which is calculated by subtracting the ingress timestamp and adding the egress timestamp (the difference is the residence time).

The MRMAC performs packet-level timestamp insertion using a read-modify-write method. When an outbound packet passes through the TX PTP Insert logic, the existing value in the Correction Field is located using the offset provided to the command port tx_ptp_cf_offset field. The current timestamp, TS’egress, (provided by the PTP Timer logic) is added to the value discovered in the PTP Correction field. The PTP packet Timestamp field is left untouched.

The following table depicts the handling of the two PTP timestamp fields for each available timestamping mode. The Timestamp Field and Incoming Correction Field columns contain the values that should be seeded into outbound PTP frames by the user logic. The Outgoing Correction Field column is what is placed into the outbound Correction Field by the MRMAC logic.

Table 1. Correction Field Adjustment Rules
Mode Timestamp Field Incoming Correction Field Outgoing Correction Field
Transparent TSorig CFingress - TS'ingress CFingress - TS'ingress + TS'egress
Ordinary/Boundary TScurr -TS'curr - TS'curr + TS'egress

From this table, it is apparent that the MRMAC logic does not need to be aware of the selected timestamp mode, as it behaves the same way regardless of the selected mode. The user logic is responsible for setting appropriate initial timestamp values in both the Timestamp and Correction fields of outbound PTP packets.

Note: The two PTP fields use different timestamp formats. In this table, TS indicates a timestamp in Timestamp Field format, while TS’ means a timestamp in Correction Field format. In most cases, the eight least significant bits of the incoming Correction field are not used in the calculation and are unmodified by the insertion logic. The exception is in the Wrap/Saturate saturation mode.