|
SatCat5
|
PTP reference with rate-control and coarse-adjust command.
Definition at line 53 of file cfgbus_ptpref.h.
#include <cfgbus_ptpref.h>
Public Member Functions | |
| constexpr | PtpRealtime (const satcat5::cfg::Register ®, double ref_clk_hz, unsigned scale=40) |
| PtpRealtime uses a block of six control registers. More... | |
| satcat5::ptp::Time | clock_adjust (const satcat5::ptp::Time &amount) override |
| Make a one-time adjustment of the specified magnitude. More... | |
| void | clock_rate (s64 offset) override |
| Adjust rate by a normalized frequency offset. More... | |
| satcat5::ptp::Time | clock_now () override |
| Return the current time if available, TIME_ZERO otherwise. | |
| void | clock_rate_raw (s64 rate) |
| Legacy API for rate-control without additional scaling. | |
| satcat5::ptp::Time | clock_ext () |
| Read timestamp of external rising-edge signal. | |
| void | clock_set (const satcat5::ptp::Time &new_time) |
| Coarse adjustment of the current time. | |
| s64 | get_rate () const |
| Read the current clock-tuning parameter. More... | |
Protected Member Functions | |
| void | load (const satcat5::ptp::Time &time) |
Protected Attributes | |
| satcat5::cfg::Register | m_reg |
| const satcat5::ptp::RateConversion | m_rate |
| s64 | m_offset |
Private Attributes | |
| satcat5::ptp::TrackingClock * | m_next |
|
inlineconstexpr |
PtpRealtime uses a block of six control registers.
Clock rate is required to renormalize frequency adjustments. Default scale parameter matches "ptp_realtime.vhd".
Definition at line 58 of file cfgbus_ptpref.h.
|
overridevirtual |
Make a one-time adjustment of the specified magnitude.
Positive quantities indicate the clock should move forward. Return value is the estimated remainder or residual error.
Implements satcat5::ptp::TrackingClock.
Definition at line 57 of file cfgbus_ptpref.cc.
|
overridevirtual |
Adjust rate by a normalized frequency offset.
Positive offsets command the clock to run faster. (See discussion above, near definition of RATE_ONE_PPB.)
Implements satcat5::ptp::TrackingClock.
Definition at line 64 of file cfgbus_ptpref.cc.
|
inlineinherited |
Read the current clock-tuning parameter.
Definition at line 70 of file ptp_tracking.h.