FIFO Latency Estimation for High-Precision Packet Timestamping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Estimating latency with sufficient accuracy for timestamping packets in high-speed transceiver channels under protocols like IEEE-1588 is challenging due to the complexity of synchronizing clocks across multiple clock domains and the need for high-precision timestamping within media access control circuitry operating at slower frequencies.

Innovation Solution

The method involves sampling read and write pointers for a FIFO using a sampling clock to determine the average difference, which is then used to estimate latency and insert timestamps into packets, employing techniques such as Little's Law to indirectly measure phase relationships and using FIFO buffers to cross clock domains while accounting for latency variations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If timestamping is performed in MAC circuitry operating at slower frequencies, then timestamping can be implemented in standard hardware, but the timestamping precision is limited by the clock frequency

Engineering Contradiction:
Improvetimestamping implementationVSAvoidtimestamp precision
Core Design Contradiction:
Ease of manufactureVSMeasurement precision

Solution Approach 1:

The system divides the timestamping function into two independent parts: a high-speed FIFO buffer that captures precise arrival/departure times at the serial interface, and a separate MAC circuitry that processes packets at slower speeds. The FIFO buffer operates independently at high speed to capture timing information, while the MAC processes data at its own pace, eliminating the constraint of MAC clock frequency on timestamp precision.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A high-speed FIFO buffer is introduced as an intermediary between the serial interface and the MAC circuitry. This FIFO buffer captures timing information at high speed and transfers it to the MAC, which then uses this pre-captured timing data for timestamping. The FIFO buffer acts as a mediator that bridges the speed gap between high-speed serial interface and slower MAC processing.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If FIFO buffers are used to cross clock domains, then data can be transferred between different clock frequencies, but latency variations occur due to phase differences between clocks

Engineering Contradiction:
Improveclock domain crossingVSAvoidlatency accuracy
Core Design Contradiction:
Adaptability or versatilityVSMeasurement precision

Solution Approach 1:

The system performs preliminary measurement of the phase difference between read and write clocks by sampling both clock signals and measuring their phase offset. This measured phase difference is then used to pre-calculate and store the latency offset in a lookup table. When data is transferred through the FIFO, the system retrieves the pre-calibrated latency value to compensate for phase-induced variations, eliminating the need for real-time phase measurement.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements a feedback mechanism where the actual phase difference between read and write clocks is continuously measured and used to adjust the latency compensation. The measured phase information feeds back into the latency calculation, allowing the system to dynamically compensate for phase variations and maintain accurate timing despite clock domain crossing.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS9369363B2Apparatus and methods for determining latency of a network port
Publication Date: 2016.06.14 ALTERA CORP
  • US9369363B2 patent drawing
  • US9369363B2 patent drawing
  • US9369363B2 patent drawing

AI summary

One embodiment relates to a method for determining a latency of a network port. Read and write pointers for a FIFO are sampled at the same time. An average difference between a plurality of samples of the read and write pointers is determined. Another embodiment relates to an apparatus for providing timestamps to packets at a network port. Registers sample read and write pointers of a FIFO using a sampling clock. Logic circuitry determines an average difference between the read and write pointers, and timestamping circuitry receives the average difference and inserts timestamps into packets. Other embodiments and features are also disclosed.