Ethernet Design Example Components User Guide

ID 683044
Date 4/01/2024
Document Table of Contents

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 value. Write to these registers in sequence: AdjustPeriod register, followed by AdjustCount register. Adjustment happens whenever there is a write to the AdjustCount register.

For example, if the target TOD is faster than master TOD by 'a' ns, to correct the TOD offset of 'a' ns by increasing the value of 'a' for a TOD clock running at 125 MHz (Period register value is 0x8 ns):
  • set AdjustPeriod to '8+b' ns
  • set AdjustCount to 'c'
where 'a = b * c' is fulfilled.

By setting a = 16 ns, b = 2 ns, and c = 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'.