Attached find a circuit with PLL. Assume that PLL is analog and in the Netlist it just an empty module. In the practice, it has the known jitter and latency.
So, how should I define this circuit. What are the constrains?
Assumption, CLK1 is test clock. Mux infront of PLL has TEST_EN (port) as a selector that will bypass clock output from PLL and output CLK1 in test mode.
Now, you will need two constraint, one for functional mode when PLL clock is used and the other for test mode when CLK1 is used.
Functional_SDC
set_case_analysis 0 [get_ports TEST_EN]
create_clock -name PLL_CLK -period xx -waveform {0 x} PLL/CLKOUT
set_clock_uncertainty -setup xx [get_clocks PLL_CLK]
set_clock_uncertainty -hold xx [get_clocks PLL_CLK]
create_clock -name CLK1 -period xx -waveform {0 x} [get_ports CLK1]
create_generated_clock -name FUNC_CLK -source PLL/CLKOUT -divide_by xx [get_pins mux0/Y]
set_input_delay -clock FUNC_CLK xx [get_ports IN1]
set_output_delay -clock FUNC_CLK xx [get_ports OUT1]
set_output_delay -clock FUNC_CLK xx [get_ports OUT2]
set_input_transition xx [get_ports IN1]
set_load xx [get_ports OUT1]
set_load xx [get_ports OUT2]
set_max_capacitance xx [current_design]
set_max_delay xx -from [get_ports IN1] -to [get_ports OUT1]
Test_SDC
set_case_analysis 1 [get_ports TEST_EN]
create_clock -name CLK1 -period xx -waveform {0 x} [get_ports CLK1]
set_clock_uncertainty -setup xx [get_ports CLK1]
set_clock_uncertainty -hold xx [get_ports CLK1]
create_generated_clock -name TEST_CLK -source [get_ports CLK1] -divide_by xx [get_pins mux0/Y]
set_input_delay -clock TEST_CLK xx [get_ports IN1]
set_output_delay -clock TEST_CLK xx [get_ports OUT1]
set_output_delay -clock TEST_CLK xx [get_ports OUT2]
set_input_transition xx [get_ports IN1]
set_load xx [get_ports OUT1]
set_load xx [get_ports OUT2]
set_max_capacitance xx [current_design]
set_max_delay xx -from [get_ports IN1] -to [get_ports OUT1]