The IEEE 1588 uses two types of time field formats:
- Time-of-Day (ToD) Format
- IEEE 1588-2008 format consisting of an unsigned 48-bit second field and a 32-bit nanosecond field. This format is compatible with version 1 of the standard.
- Correction Field Format
- Introduced in version 2 to handle Transparent clocks and better than 1 ns precision.
It is a signed 64-bit integer in units of 2-16 ns. For
example, 2.5 ns is represented as
system_timer is implemented as an
internal, unsigned linear counter which counts time in units of 2-40 ns. Each clock cycle
incremented by the quantity
represents the period of the system timer clock in the same units. For example, for a
nominal 644.0625 MHz clock, the increment value would be
42'h18D_3018_D302 (1,705,908,949,762 × 2-40 ns). This
increment value is configured by the MRMAC at
start-up. If KR4-FEC is in use, a different initial value is configured:
The MRMAC exposes 55 bits of
system_timer through the various timestamping
interfaces (that is, TX and RX packet timestamps). This is equivalent to a timer which
counts in units of 2‑8 ns (that is, ~3.9 ps). User logic can map
these 55 bits directly into Bits[62:8] of a Correction Field format timestamp. The bottom
eight correction field bits should be set to
8’h0 as this
degree of precision is not supported by the architecture. Note that this same mapping is
used in 1-step timestamp insertion.
The least-significant 32 bits of the MRMAC (that is, < 2-8 ns portion of the
counter) is not available through the timestamping interfaces. This allows the
system_timer to be adjusted at sub-nanosecond levels to track an
external master clock as described in the next section.