SPRUIU1C July 2020 – February 2024 DRA821U , DRA821U-Q1
The 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.
The PTM defines the following components:
When using PTM between two components on a Link, the EP sends PTM requests to the RP on the same link. During each dialog, the RP populates the PTM Response message based on timestamps stored during previous PTM dialogs. Once each component has historical timestamps from the preceding dialog, the EP can combine its timestamps with those passed in the PTM Response message to calculate the PTM Master Time.
The PCIe core implements all of the features required to handle the PTM conversation between the requestor and responder in hardware. In addition, an internal TimeStamp module (CPTS) is connected to the timestamp interface of the PCIe core so that events can be logged.
The Precision Time Measurement (PTM) support in the PCIe subsystem is handled by the combination of the PCIe core and the CPTS module.
The PCIe core controller handles the PCIe conversation to exchange timestamps between the RP and EP. It also includes logic to calculate the timestamp differences as specified in the PCIe standard. A 64-bit timer that is the master clock is included in the PCIe core. The PCIe controller can be programmed to initiate the PTM conversation automatically by setting the [0] PTMRQM bit in the PCIE_CORE_LM_I_PTM_LOCAL_CONTROL_REG register.
In EP mode, there are two methods to register a CPTS HW1 push timestamp that is needed to transfer the PCIe PTM timebase to the local system time base.
In RP mode, the CPTS can take control of the PTM master time. The 64-bit CTPS timer is continuously loaded into the PCIe PTM master clock by tying high the PTM_TIMER_IN_VALID input of the PCIe controller. This allows for software to adjust the PCIe PTM master clock as necessary using the CTPS module and maintain the PTM master time by monotonically increasing it as required by the PCIe standard. The CPTS HW1_PUSH timestamp input is driven by the particular bit of the PTM_LOCAL_TIMER_IN counter, as selected by the value in the PCIE_USER_PTM_CFG[6-0] PTM_CLK_SEL register field.
The reference clock (RCLK) for the CPTS can be controlled via the CTRLMMR_PCIE1_CLKSEL[3-0] CPTS_CLKSEL register field in the device Control Module. This enables the SoC flexibility in choosing the CPTS reference clock input. In RP mode, the RCLK needs to be connected to the SERDES PIPE clock since the CPTS will be driving the PTM master clock. For more information on the RCLK source clock selection, see PCIe Subsystem Integration.
Figure 12-1265 shows the PTM support logic in the PCIe subsystem.