Hard Processor System Technical Reference Manual: Agilex™ 3 SoCs

ID 848530
Date 6/23/2025
Public
Document Table of Contents

12.3.2.5. Deterministic Latency

In a TSN design, path delay till EMAC is known as its hard logic but there is an additional FPGA fabric logic like 1G/2.5G/5G/10G Multirate Ethernet PHY IP in the data path after EMAC which needs to be considered for deterministic path delay as well as for the Precision Time Protocol (PTP) by the software applications. The 1G/2.5G/5G/10G Multirate Ethernet PHY IP calculates the delay it inserts based on its configuration and convey the same to the software stack through the control and status register (CSR) interface. Software TSN applications add these offsets to determine the actual path delay. If the design requires additional pipe stages in the data path between the 1G/2.5G/5G/10G Multirate Ethernet PHY IP and HPS to meet the timing, then it must be conveyed to the software through the user CSR interface. This calculation is based on the number of pipe stages multiplied by the clock cycle period.

The Deterministic Latency (DL) refers to the ability to precisely determine the delay between the elastic FIFO (EFIFO) and the PMA pins. It is based on the concept of measuring the time when a given word is at the interface to the PMA and when the same word is at the FPGA core. The difference in time between these two events, when added to the PMA propagation delay, determines the total latency between the FPGA core and the serial pins. Such a calculation inherently accounts for delays caused by intermediate logic, FIFOs, and other effects.
Note: You must select the Enable timestamping and Enable deterministic latency options to enable the DL feature.
Table 370.  Parameter Description for 1G/2.5G/5G/10G Multirate Ethernet PHY IP Deterministic Latency Measurement
Parameter Value Description
sampling_clk period 4.375 ns Period for sampling clock of 228.571 MHz for rates up to 2.5G.
UI period

0.8 ns (up to 1G) = 1/1.25 Gbps

0.32 ns (2.5G) = 1/3.125 Gbps

Period for unit interval.
parallel_clk 20 UI Period for 1 parallel clock cycle.
tx_delay (TxDL)

Read from EFIFO-DL registers

 
rx_delay (RxDL)

Read from EFIFO-DL register [0x1B:0x1A] – [20:0]

TX delay value in sampling_clk cycles, fixed point format Q13.8.

Bit [20:8] is integer, bit [7:0] is fractional number.

For example, tx_delay = 0x27F4, Bit [20:8] = 0x27 = 39

Bit [7:0] = 0xF4 (0.953125 * 256) = 0.953125

Hence, tx_delay = 39.953125 clock cycles.

0x18: [7:0] Fractional part of delay, [15:8]—Unused

0x19: [12:0] Integer part of delay, [15:13]—Unused

tx_soft_pcs_delay

Read from EFIFO-DL registers [0x1D:0x1C] – [21:0]

RX delay value in the sampling_clk cycles, fixed point format Q13.8.

Bit [20:8] is integer, bit [7:0] is fractional number.

For example, rx_delay = 0x27F4, Bit [20:8] = 0x27 = 39

Bit [7:0] = 0xF4 (0.953125 * 256) = 0.953125

Hence, rx_delay = 39.953125 clock cycles.

0x1A: [7:0] Fractional part of delay, [15:8]—Unused

0x1B: [12:0] Integer part of delay, [15:13]—Unused

rx_soft_pcs_delay

Read from EFIFO-DL register [0x1F:0x1E] – [21:0]

RX soft PCS datapath latency value to the GMII output interface from the 20 bit soft PCS, fixed point format Q12.10.

Bit [21:10] is integer, bit [9:0] is fractional number.

For example, rx_soft_pcs_delay = 0x27F4,

Bit [21:10] = 0x09 = 09

Bit [9:0] = 0x2F4 (0.73828125 * 1024) = 0.73828125

Hence, rx_soft_pcs_delay = 9.73828125 clock cycles (62.5 MHz clock).

0x1E: [9:0] Fractional part of delay, [15:10]—Unused

0x1F: [11:0] Integer part of delay, [15:12]—Unused

TX PMA Delay

Simulation: 49

Hardware: 49

TX PMA delay in number of UI. Multiply by UI period to convert to nanosecond and fractional nanosecond format.
RX PMA Delay

Simulation: 68

Hardware: 68

RX PMA delay in number of UI. Multiply by UI period to convert to nanosecond and fractional nanosecond format.
Note: The DL synchronization registers are being hardened in Agilex™ 3, due to which there can be slight changes in the numerals in the Parameter Description for 1G/2.5G/5G/10G Multirate Ethernet PHY IP Deterministic Latency Measurement table.
Table 371.  Latency Calculation for 10M/100M/1G
Latency Type Calculation
TX TxDL * (sampling_clock_period in ns)
RX RxDL * (sampling_clock_period in ns)

The PCS delay also follows the similar calculation where its measured in clock cycles and fractional clock cycles but the clock is 156.25 MHz fixed for this.