其他分享
首页 > 其他分享> > 时序约束

时序约束

作者:互联网

目录

学习手册 UG949
对更加详细的约束信息参照 UG906 UG903

1.组织管理约束文件
对于简单的工程,我们可以按照下面的方法组织我们的约束文件:

对于大型的项目或者是多个团队合作实现的约束可以采用下面的方法:

如果一个工程中存在多个约束文件,那么此时需要注意约束文件的编译顺序:

ug949 P151 打开实际的工程进行测试

Defining Clock Constraints 时钟约束:

Identifying Clock Sources

Clock Networks Report 报告工程中的时钟网络:

其中包括可以报告未添加约束的时钟!!!
命令:

report_clock_networks

这个命令可以报告出未添加约束的时钟网络,
example:

Clock Networks Report

Constrained Clocks
-------------------

Clock clk_fpga_0 (50MHz)(endpoints: 0 clock, 1 nonclock)
PS7/FCLKCLK[0] (processing_system_i/processing_system7_0/inst/PS7_i)

Unconstrained Clocks
-------------------
Clock osc_clk (endpoints: 38 clock, 0 nonclock)
Port osc_clk

在上面的例子中可以看到在报告中已经指出哪些时钟已经添加了约束,哪一些没有添加约束(osc_clk)。

Check Timing Report

在这个报告中的no_clock 不懂

check_timing -override_defaults no_clock

result:

check_timing report

Table of Contents
-----------------
1. checking no_clock

1. checking no_clock
--------------------
 There are 38 register/latch pins with no clock driven by root clock pin: osc_clk (HIGH)

在上面的这个例子中我猜测这个no_clock 与我没有约束osc_clk 有关。后面添加一下约束后再测试一下。

Creating Primary Clocks

Input Ports

Constraint example:

create_clock -period 20.000 -name osc_clk -waveform {0.000 10.000} -add [get_ports osc_clk]

Gigabit Transceiver Output Pins in 7 Series Devices

如下图所示:
在这里插入图片描述Constraint example:

create_clock -name txclk -period 6.667 [get_pins gt0/TXOUTCLK]

推荐:对于目标7系列设备的设计,Xilinx也建议定义 GT incoming clocks,因为Vivado工具计算GT输出引脚上的预期时钟,并比较这些时钟用户创建的时钟。如果时钟缺少或缺少GT的传入时钟,则该工具发出了机理方法检查警告。
对于目标UltraScale™设备的设计,Xilinx不建议在GT的输出上定义primary 时钟,因为GT时钟是自动的当相关的电路板输入时钟被占用时衍生。

Certain Hardware Primitive Output Pins

不推荐使用扇出的时钟进行约束![在这里插入图片描述](https://www.icode9.com/i/ll/?i=20210328193039209.png?,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM5NTk3NDg5,size_16,color_FFFFFF,t_70

Creating Generated Clocks

生成的时钟是从称为主时钟的另一个现有时钟导出的时钟。它通常通过逻辑块在主时钟上执行的波形变换。

生成时钟分为自动生成时钟和用户自定义生成时钟:

Adjusting Clock Characteristics

Jitter

For jitter, it is best to use the default values used by the Vivado Design Suite. You can modify thedefault computation as follows:
• If a primary clock enters the device with a random jitter greater than zero, use theset_input_jitter command to specify the peak-to-peak jitter value in nanoseconds.
• To adjust the global jitter if the device power supply is noisy, use set_system_jitter.Xilinx does not recommend increasing the default system jitter value.For generated clocks, the jitter is derived from the master clock and the characteristics of theclock modifying block. You do not need to adjust these numbers.

Additional Uncertainty

For example, the margin on all intra-clock paths of the design clock clk0 needs to be tightenedby 500 ps to make the design more robust to noise for both setup and hold:

set_clock_uncertainty -from clk0 -to clk0 0.500

Clock Latency at the Source

MMCM or PLL External Feedback Loop Delay

Defining Clock Groups and CDC Constraints

example

create_clock -name clk_mode0 -period 10 [get_ports clkin]
create_clock -name clk_mode1 -period 13.334 -add [get_ports clkin]
set_clock_groups -physically_exclusive -group clk_mode0 -group clk_mode1

If the clk_mode0 and clk_mode1 clocks generate other clocks, the same constraint needs tobe applied to their generated clocks as well, which can be done as follows:

set_clock_groups -physically_exclusive \
-group [get_clocks -include_generated_clock clk_mode0] \
-group [get_clocks -include_generated_clock clk_mode1]

Global Constraints Between Clocks in Both Directions

When there is no need to limit the maximum latency, the clock groups can be used. Following isan example to ignore paths between clkA and clkB:

set_clock_groups -asynchronous -group clkA -group clkB

When two master clocks and their respective generated clocks form two asynchronous domainsbetween which all the paths are properly synchronized, the clock groups constraint can beapplied to several clocks at once:

set_clock_groups -asynchronous \
-group {clkA clkA_gen0 clkA_gen1 } \
-group {clkB clkB_gen0 clkB_gen1 }

Constraining Input and Output Ports (约束输入输出端口)

在工程中需要一些高级的参数设置,平时没有设置过,暂时跳过,后面遇到再补充……

Specifying Timing Exceptions

Timing Exceptions Guidelines

Adding False Path Constraints

在这里插入图片描述

标签:Clock,clk,clock,约束,clocks,时序,时钟
来源: https://www.cnblogs.com/amxiang/p/15650274.html