I have seen enough confusion in hardware specs that I would only trust the IEEE spec.
In gPTP there is one hardware clock, yes. The Local Clock. PTP time is not a hardware clock, it is a virtual clock. The Local Clock is not synchronised to PTP time. Do you have a copy of 802.1AS-2020 there? Here are a few quick quotes resulting from searching for "local clock":
"3.16 local clock: A free-running clock, embedded in a respective entity (e.g., PTP Instance, CSN node), that provides a common time to that entity relative to an arbitrary epoch." (p. 21)
"Each PTP Instance measures, at each PTP Port, the ratio of the frequency of the PTP Instance at the other end of the link attached to that PTP Port to the frequency of its own clock. The cumulative ratio of the Grandmaster Clock frequency to the local clock frequency is accumulated in a standard organizational type, length, value (TLV) attached to the Follow_Up message (or the Sync message if the optional one-step
processing is enabled). The frequency ratio of the Grandmaster Clock relative to the local clock is used in computing synchronized time, and the frequency ratio of the neighbor relative to the local clock is used in correcting the propagation time measurement." (p. 44)
"10.1.2.1 LocalClock entity
The LocalClock entity is a free-running local clock (see 3.16) that provides a common time to the PTP Instance, relative to an arbitrary epoch. A PTP Instance contains a LocalClock entity. The requirements for the LocalClock entity are specified in B.1. All timestamps are taken relative to the LocalClock entity (see 8.4.3). The LocalClock entity also provides the value of currentTime (see 10.2.4.12), which is used in the
state machines to specify the various timers.
NOTEāThe epoch for the LocalClock entity can be the time that the PTP Instance is powered on.
" (p.66)
Need I continue?
I may be mistaken, but I thought in this sub-thread we were talking about the PTP clock and the system clock (e.g. the x86 tsc). Only one of these is relevant to PTP but the system clock is the only one available to timestamp software events and so you may want to be able to convert between tsc time, NIC local clock time, or PTP time. If you want to schedule GPIO events on the NIC, given a PTP time you can compute the corresponding local clock time, and schedule the event on the GPIO. This does not require disciplining the NIC clock (i.e. the PTP local clock, as defined in my quotes above) to PTP time.
In gPTP there is one hardware clock, yes. The Local Clock. PTP time is not a hardware clock, it is a virtual clock. The Local Clock is not synchronised to PTP time. Do you have a copy of 802.1AS-2020 there? Here are a few quick quotes resulting from searching for "local clock":
"3.16 local clock: A free-running clock, embedded in a respective entity (e.g., PTP Instance, CSN node), that provides a common time to that entity relative to an arbitrary epoch." (p. 21)
"Each PTP Instance measures, at each PTP Port, the ratio of the frequency of the PTP Instance at the other end of the link attached to that PTP Port to the frequency of its own clock. The cumulative ratio of the Grandmaster Clock frequency to the local clock frequency is accumulated in a standard organizational type, length, value (TLV) attached to the Follow_Up message (or the Sync message if the optional one-step processing is enabled). The frequency ratio of the Grandmaster Clock relative to the local clock is used in computing synchronized time, and the frequency ratio of the neighbor relative to the local clock is used in correcting the propagation time measurement." (p. 44)
"10.1.2.1 LocalClock entity The LocalClock entity is a free-running local clock (see 3.16) that provides a common time to the PTP Instance, relative to an arbitrary epoch. A PTP Instance contains a LocalClock entity. The requirements for the LocalClock entity are specified in B.1. All timestamps are taken relative to the LocalClock entity (see 8.4.3). The LocalClock entity also provides the value of currentTime (see 10.2.4.12), which is used in the state machines to specify the various timers.
NOTEāThe epoch for the LocalClock entity can be the time that the PTP Instance is powered on. " (p.66)
Need I continue?
I may be mistaken, but I thought in this sub-thread we were talking about the PTP clock and the system clock (e.g. the x86 tsc). Only one of these is relevant to PTP but the system clock is the only one available to timestamp software events and so you may want to be able to convert between tsc time, NIC local clock time, or PTP time. If you want to schedule GPIO events on the NIC, given a PTP time you can compute the corresponding local clock time, and schedule the event on the GPIO. This does not require disciplining the NIC clock (i.e. the PTP local clock, as defined in my quotes above) to PTP time.