1.4.3. Correcting TOD Offset
You can use the AdjustPeriod and AdjustCount registers to correct TOD offset between master and target TOD. AdjustPeriod register value is used as effective period value when AdjustCount register is a non-zero count value and AdjustPeriod clock is available to correct the offset. Write to these registers in sequence: AdjustPeriod register, followed by AdjustCount register. Adjustment happens whenever there is a write to the AdjustCount register.
- set AdjustPeriod to '8+b' ns (where b = a/c)
- set AdjustCount to 'c'
By setting a = 16 ns, b = 2 ns, and c = 8, the value of registers AdjustPeriod and AdjustCount would be AdjustPeriod = 10 and AdjustCount = 8. The logic produces TOD with effective period value of 10 ns (slower) in the next 8 clock cycles. After 8 clock cycles, the logic resumes the normal operation where effective period value = 8 ns.
Similarly, if the target TOD is slower than master TOD, to correct negative TOD offset, set AdjustPeriod to '<Period register value> – b'. For the example with target TOD slower than master TOD by 16ns, the correction values would be AdjustPeriod = 6ns and AdjustCount = 8.