Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20735 Discussions

how to set timing constraint for clock

mappy5
Beginner
597 Views

In the case of the circuit shown in the figure, how should the timing constraint be set?

Do CLK_1 and CLK_2 need timing constraints?

 

create_clock -name {in_CLK} -period 20.0 [get_ports {in_CLK}]

create_generated_clock -name {CLK_half} -source [get_ports {in_CLK}] -divide_by 2 -master_clock {in_CLK} [get_nets{CLK_half}]

 

 

0 Kudos
6 Replies
mappy5
Beginner
596 Views

clk.PNG

0 Kudos
sstrell
Honored Contributor III
574 Views

Yes, all clock domains need constraints.  

If you are using a PLL to create these clocks, you can simply use derive_pll_clocks.  If you are not using a PLL, you will need additional generated clock constraints for clk_1 and clk_2 (and possibly that other clock that generates clk_1 and clk_2).

See the unconstrained paths report in the timing analyzer to see which clocks are considered unconstrained, if any.

0 Kudos
mappy5
Beginner
558 Views

hi, Thank you for answering.

 

PLL is not use.

Generate the clock with the logic I created.

 

clk_1 is 132Hz

clk_2 is 339Hz

Clk_1 and clk_2 were not pointed to unconstrained paths in the timing analyzer.

Is there no timing constraints for such a low speed clock?

0 Kudos
sstrell
Honored Contributor III
547 Views

Unconstrained clocks are reported based on them driving the clock inputs of registers or other clocked logic.  Even super slow clocks should have timing constraints for completeness.  

0 Kudos
mappy5
Beginner
534 Views

Is this the right way to set timing constraints on CLK_1?

create_generated_clock -name CLK_1 -source [get_registers {yyy:xxx|half_1}] -divide by 245760 [get_registers {yyy:xxx|CLK_1}]

clk.PNG

0 Kudos
sstrell
Honored Contributor III
521 Views

Yes, that's the idea, though like I said, you probably have to create a clock for half_1 as well.

0 Kudos
Reply