PLL Cascading Clock Latency
The SDC constraint formulas for the receive clock delay are:
set_clock_latency -source -setup <max calculation> <clock ports>
set_clock_latency -source -hold <min calculation> <clock ports>
The equations for the source PLL are:
<max calculation> = <max board constraint> - <source PLL clock latency>
<min calculation> = <min board constraint> - <source PLL clock latency>
The equations for the cascaded PLL are:
<max calculation> = <source PLL clock latency>max + <cascaded PLL clock latency>max
<min calculation> = <source PLL clock latency>min + <cascaded PLL clock latency>min
The Efinity software v2023.2 and higher calculates the GPIO input buffer and PLL compensation delays and provides them in a template in the <project>.pt.sdc file. You still need to add any board delays (if needed).
For the cascaded PLL, the software includes the clock network delay in the PLL compensation delay value.
The following example shows how to calculate the delays and set the constraints.
PLL Cascading Clock Latency
clk. This example
assumes that the clock and data traces on the board are well matched; therefore,
there is no external board delay. ---------- 1. PLL Timing Report (begin) ----------
+--------------+----------+-----------------+-...-+---------------------------------+---------------------------------+
| PLL Instance | Resource | Reference Clock | ... | PLL Compensation Delay Max (ns) | PLL Compensation Delay Min (ns) |
+--------------+----------+-----------------+-...-+---------------------------------+---------------------------------+
| src_pll | PLL_BL0 | external | ... | 2.346 | 1.519 |
| casc_pll | PLL_BL1 | core | ... | 2.341 | 1.516 |
+--------------+----------+-----------------+-...-+---------------------------------+---------------------------------+
+--------------+-------------+----------------------------+-----------------------+----------+
| Clock | Period (ns) | Enable Dynamic Phase Shift | Phase Shift (degrees) | Inverted |
+--------------+-------------+----------------------------+-----------------------+----------+
| src_pll_clk | 10.0000 | False | 0.0 | false |
| casc_pll_clk | 10.0000 | False | 0.0 | false |
+--------------+-------------+----------------------------+-----------------------+----------+
---------- PLL Timing Report (end) ----------
---------- 2. GPIO Timing Report (begin) ----------
Non-registered GPIO Configuration:
===================================
+---------------+----------+-----------+----------+----------+
| Instance Name | Pin Name | Parameter | Max (ns) | Min (ns) |
+---------------+----------+-----------+----------+----------+
| refclk | refclk | GPIO_IN | 0.828 | 0.552 |
+---------------+----------+-----------+----------+----------+
# Clock Latency Constraints
############################
# set_clock_latency -source -setup <board_max -1.517> [get_ports {src_pll_clk}]
# set_clock_latency -source -hold <board_min -0.967> [get_ports {src_pll_clk}]
# set_clock_latency -source -setup <board_max + 0.004> [get_ports {casc_pll_clk}]
# set_clock_latency -source -hold <board_min + 0.003> [get_ports {casc_pll_clk}]
set_clock_latency -source -setup - 1.517 [get_ports {src_pll_clk}]
set_clock_latency -source -hold - 0.967 [get_ports {src_pll_clk}]
set_clock_latency -source -setup - 1.513 [get_ports {casc_pll_clk}]
set_clock_latency -source -hold - 0.964 [get_ports {casc_pll_clk}]