Hard Processor System Technical Reference Manual: Agilex™ 3 SoCs
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.
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. |
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.