SPRUIM2H May 2020 – October 2023 AM2431 , AM2432 , AM2434 , AM6411 , AM6412 , AM6421 , AM6422 , AM6441 , AM6442
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 Controller 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 RC on the same link. During each dialog, the RC 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 Controller 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 RC and EP. It also includes logic to calculate the timestamp differences as specified in the PCIe standard. A 64-bit timer that is the controller 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 RC mode, the CPTS can take control of the PTM controller time. The 64-bit CPTS timer is continuously loaded into the PCIe PTM controller clock by tying high the PTM_TIMER_IN_VALID input of the PCIe controller. This allows for software to adjust the PCIe PTM controller clock as necessary using the CPTS module and maintain the PTM controller 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_PCIE0_CLKSEL[2-0] CPTS_CLKSEL register field in the device Control Module. This enables the SoC flexibility in choosing the CPTS reference clock input. In RC mode, the RCLK needs to be connected to the SERDES PIPE clock since the CPTS will be driving the PTM controller clock. For more information on the RCLK source clock selection, see Section 12.2.2.3, PCIe Subsystem Integration.
Figure 12-753 shows the PTM support logic in the PCIe subsystem.