xl4-shiro / excelfore-gptp

gPTP, IEEE 802.1AS-REV implementation
GNU General Public License v2.0
63 stars 38 forks source link

About frequency rateratio #9

Open uestcgxh opened 2 years ago

uestcgxh commented 2 years ago

This project is great, and it has successfully run on my machine. But I have a few questions:

  1. The time of the slave clock is updated in the clockslavesync state machine, that is, after the update, are the frequency and phase of the slave clock the same as the source clock?
  2. If the first question is the same, then why calculate gmRateRatio, in my case, my machine shows that the synchronization rate of the master clock is 11000ppb. Does it mean that there is a time difference of 11 microseconds per second after the frequency and phase of the slave clock are synchronized.
xl4-shiro commented 2 years ago

the time is updated in ClockMasterSyncReceive state machine. how the update happens depends on the configuration. In the default, the phase update go to a memory, and the frequency update applied on the HW clock. The printing shows the difference from the origin frequency. If the original clock is 100.0000Mhz, and it is adjusted to 100.0010Mhz, the printing shows 10000ppb.