GTS AXI Streaming Intel® FPGA IP for PCI Express* User Guide

ID 813754
Date 5/15/2024
Public

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

Document Table of Contents

4.10. Precision Time Measurement (PTM)

Precision Time Measurement (PTM) enables precise coordination of events across multiple components with independent local time clocks. Ordinarily, such precise coordination would be difficult given that individual time clocks have differing notions of the value and rate of change of time. To work around this limitation, PTM enables components to calculate the relationship between their local times and a shared PTM Master Time: an independent time domain associated with a PTM Root. Each PTM Root supplies PTM Master Time for a PTM Hierarchy.

Note: Only applicable when operating in Endpoint Mode (PTM Requester).

The PTM Requester of the GTS AXI Streaming IP automatically updates PTM context (starting dialogs) when enabled. It can be configured to be an automatic trigger every 1 to 10 ms (configuration in the IP parameter editor)_or a manual trigger through user input (ptm_manual_update) only.

The received PTM messages are also be forwarded out to the application layer. You may drop the messages if not useful. PTM context valid indicates if the context is valid. The PTM context is automatically invalidated when:
  • Clock stops or runs at the wrong frequency (for example, when the link speed is changing)
  • PTM is disabled
  • PTM response timeouts (the requester restarts the PTM dialog when the auto-update or manual update start conditions are met)
  • A duplicate PTM TLP is received or a replay TLP is sent (if waiting for a response the requester waits for 100 μs since the last non-duplicate request was sent, before allowing a new PTM dialog to be started)
Figure 25. PTM Link Protocol

When using PTM between two components on a PCIe* link, the Upstream Port, which acts on behalf of the PTM Requester, sends PTM Requests to the Downstream Port on the same Link, which acts on behalf of the PTM Responder as shown in the figure above.

The points t1, t2, t3, and t4 represent timestamps captured locally by each Port as they transmit and receive PTM Messages. The component associated with each Port stores these timestamps from the first PTM dialog in internal registers for use in the second PTM dialog, and so on for subsequent PTM dialogs.

In the second PTM dialog, the Downstream Port populates the PTM ResponseD message based on timestamps stored during previous PTM dialogs, the format is shown in the figure below. It contains PTM Master Time, which is t2’, and propagation delay, which is t3-t2.

The component associated with the Upstream Port can then combine its timestamps with those passed in the PTM ResponseD message to calculate the PTM Master Time using the formula here:
PTM Master Time at t1’= t2' - [((t4-t1) - (t3-t2))/2]
Figure 26. PTM Request Message
Figure 27. PTM Response Message