Vivado Design Suite用户指南之约束的使用第二部分(约束方法论)

Constraints Methodology(约束方法论)

关于约束方法论

设计约束定义了编译流程必须满足的要求,以使设计在板上起作用。 并非所有步骤都使用所有约束
在编译流程中。 例如,物理约束仅在实现步骤期间使用(即,由布局器和路由器)
由于Xilinx®Vivado®集成设计环境(IDE)综合和实现算法是时序驱动的,因此必须创建适当的时序约束。
过度约束或设计不足会使时序收敛变得困难。 您必须使用符合您的应用程序要求的合理约束。

 

也就是说这一章主要就是讲解约束的行为规范,上一章讲述的是如何输入约束文件,这都是有一定顺序的

组织你的约束(个人认为比较重要,应该是我所需要的部分)

The Vivado IDE allows you to use one or many constraint files. While using a single
constraint file for the entire compilation flow might seem more convenient, it can be a
challenge to maintain all the constraints as the design becomes more complex. This is
usually the case for designs that use several IP cores or large blocks developed by different
teams.
After the timing and physical constraints have been imported, independent of the number
of source files or whether the design is in Project/Non-Project mode, all the constraints can
be exported as a single file with the write_xdc command. The constraints are written to
the specified output file in the same order that they were read into the project or design.
The command line option write_xdc -type can be used to select a sub-set of
constraints (timing, physical, or waiver) to export.

又是一大段英文,不归说真的,技术开发人员一些技术资料一定要看懂,但是比较权威的大部分都源自英文版,所以学好英语很重要!!! 不过没有那么多时间让我现学英文

只能退而求其次,想想办法,

Vivado IDE允许您使用一个或多个约束文件。 虽然对整个编译流使用单个约束文件似乎更方便,但随着设计变得更加复杂,维护所有约束可能是一个挑战。 对于使用由不同团队开发的多个IP核或大块的设计,通常就是这种情况。
导入定时和物理约束后,独立于源文件的数量或设计是否处于项目/非项目模式,可以使用write_xdc命令将所有约束导出为单个文件。
约束以与读入项目或设计相同的顺序写入指定的输出文件。
命令行选项write_xdc -type可用于选择要导出的约束(时间,物理或豁免)子集。

不过这里有一个建议:

RECOMMENDED: Xilinx recommends that you separate timing constraints and physical constraints by
saving them into two distinct files. You can also keep the constraints specific to a certain module in a
separate file.

建议:Xilinx建议您将时序约束和物理约束分开,将它们保存为两个不同的文件。 您还可以将特定于某个模块的约束保存在单独的文件中。

项目模式(工程模式)/非项目模式(非工程模式)的概念:

这是两种VIVADO的两种设计流程模式

(一) 设计者可以使用基于工程的方法自动管理设计过程和设计数据,这个就是说可以用VIVADO软件来进行

(二)可以根据TCL脚本的方法,可以自己设计管理源文件和设计流程,这种方法称为非工程模式,这就非常高大上了,就像是Linux里shell Windows里的doc,不过我作为初学者,还是选用第一种方法吧。

Project Flows
You can add your Xilinx Design Constraints (XDC) files to a constraints set during the
creation of a new project, or later, from the Vivado IDE menus.
Figure 2-1 shows two constraint sets in a project, which are Single or Multi XDC. The first
constraint set includes two XDC files. The second constraint set uses only one XDC file
containing all the constraints.

You can also add Tcl scripts to your constraints set as unmanaged constraints or
unmanaged Tcl scripts. The Vivado Design Suite does not write modified constraints back
into an unmanaged Tcl script. Tcl scripts and XDC files are loaded in the same sequence as
displayed in the Vivado IDE (if they belong to the same PROCESSING_ORDER group) or as
reported by the command report_compile_order -constraints.
An XDC file or a Tcl script can be used in several constraints sets if needed. For more
information on how to create and add constraint files and constraints sets to your project,
see Working with Constraints in the Vivado Design Suite User Guide: System-Level Design
Entry (UG895) [Ref 2].

项目流程
您可以在创建新项目期间或稍后从Vivado IDE菜单中将Xilinx设计约束(XDC)文件添加到约束集中。
图2-1显示了项目中的两个约束集,即单XDC或多XDC。 第一个约束集包括两个XDC文件。 第二个约束集仅使用一个包含所有约束的XDC文件。

如果项目包含使用其自身约束的IP,则相应的约束文件不会出现在约束集中。 相反,它与IP源文件一起列出

您还可以将Tcl脚本添加到约束集中作为非托管约束或非托管Tcl脚本。 Vivado设计套件不会重新编写修改的约束
进入一个非托管的Tcl脚本。 Tcl脚本和XDC文件的加载顺序与Vivado IDE中显示的顺序相同(如果它们属于同一个PROCESSING_ORDER组)或命令report_compile_order -constraints报告的顺序。
如果需要,可以在多个约束集中使用XDC文件或Tcl脚本。 有关如何为项目创建和添加约束文件和约束集的更多信息,请参阅“Vivado Design Suite用户指南”中的使用约束:系统级设计
参赛作品(UG895)[参考文献2]。

非项目流程
在非项目模式下,必须在执行编译命令之前单独读取每个文件。
下面的示例脚本显示了如何使用一个或多个XDC文件进行综合和实现。
示例脚本:
read_verilog [glob src / * .v]
read_xdc wave_gen_timing.xdc
read_xdc wave_gen_pins.xdc
synth_design -top wave_gen -part xc7k325tffg900-2
opt_design
place_design
route_design

语境外约束
在HD或PR流中,通常以上下文(OOC)方法合成设计的各部分。 当使用这样的流时,可以仅为OOC合成指定一些约束。 例如,当块合成OOC时,必须定义在块的输入边界处传播的时钟。 这些时钟在OOC XDC文件中定义。

In Project Mode:
add_file constraints_ooc.xdc
set_property USED_IN {synthesis out_of_context} [get_files constraints_ooc.xdc]
The Out-of-Context can also be set on the XDC file through the GUI (property on file
constraints_ooc.xdc).

也可以通过GUI(文件constraints_ooc.xdc上的属性)在XDC文件上设置Out-of-Context。
In Non-Project Mode:
read_xdc -mode out_of_context constraints_ooc.xdc

Synthesis and Implementation Constraint Files
By default, all XDC files and Tcl scripts added to a constraint set are used for both synthesis
and implementation. Set the USED_IN_SYNTHESIS and USED_IN_IMPLEMENTATION
properties on the XDC file or the Tcl script to change this behavior. This property can take
the value of either TRUE or FALSE.

合成和实现约束文件
默认情况下,添加到约束集的所有XDC文件和Tcl脚本都用于合成和实现。 在XDC文件或Tcl脚本上设置USED_IN_SYNTHESIS和USED_IN_IMPLEMENTATION属性以更改此行为。 此属性可以采用TRUE或FALSE的值。

重要信息:DONT_TOUCH属性不遵循USED_IN_SYNTHESIS和USED_IN_IMPLEMENTATION的属性。 如果在合成XDC中使用DONT_TOUCH属性,则为
无论USED_IN_IMPLEMENTATION的值如何,都会传播到实现中。 有关DONT_TOUCH属性的更多信息,请参阅RTL属性,第58页,这可能是最需要注意的地方

For example, to use a constraint file for implementation only:
1. Select the constraint file in the Sources window.
2. In the Source File Properties window:
a. Uncheck Synthesis.
b. Check Implementation.

The equivalent Tcl commands are:
set_property USED_IN_SYNTHESIS false [get_files wave_gen_pins.xdc]
set_property USED_IN_IMPLEMENTATION true [get_files wave_gen_pins.xdc]
When running the Vivado IDE in Non-Project Mode, you can read in the constraints directly
between any steps of the flow. The properties USED_IN_SYNTHESIS and
USED_IN_IMPLEMENTATION do not matter in this mode.

在非项目模式下运行Vivado IDE时,您可以直接在流的任何步骤之间读取约束。 在此模式下,属性USED_IN_SYNTHESIS和USED_IN_IMPLEMENTATION无关紧要。
The following compilation Tcl script shows how to read two XDC files for different steps of
the flow:

以下编译Tcl脚本显示了如何读取不同步骤的两个XDC文件
流程:

read_verilog [glob src/*.v]
read_xdc wave_gen_timing.xdc
synth_design -top wave_gen -part xc7k325tffg900-2
read_xdc wave_gen_pins.xdc
opt_design
place_design
route_design

 

Ordering Your Constraints

Because XDC constraints are applied sequentially, and are prioritized based on clear
precedence rules, you must review the order of your constraints carefully. For more
information, see Chapter 7, XDC Precedence.

由于XDC约束是按顺序应用的,并且基于明确的优先级规则进行优先级排序,因此必须仔细检查约束的顺序。 有关更多信息,请参见第7章,XDC优先级

注意:如果多个物理约束发生冲突,则最新约束将获胜。 例如,如果I / O端口通过多个XDC文件分配了不同的位置(LOC),则为最新位置
分配给端口优先。

The Vivado IDE provides full visibility into your design. To validate your constraints step by
step:

Vivado IDE可全面了解您的设计。 要逐步验证您的约束:

1. Run the appropriate report commands.
2. Review the messages in the Tcl Console or the Messages window.

建议:无论是为设计使用一个还是多个XDC文件,都按以下顺序组织约束。

## Timing Assertions Section
# Primary clocks
# Virtual clocks
# Generated clocks
# Clock Groups
# Bus Skew constraints
# Input and output delay constraints


## Timing Exceptions Section
# False Paths
# Max Delay / Min Delay
# Multicycle Paths
# Case Analysis
# Disable Timing


## Physical Constraints Section
# located anywhere in the file, preferably before or after the timing constraints
# or stored in a separate constraint file

Note: The case analysis constraints that change the clock relationships or clock propagation should
be defined prior to defining the generated clocks. This includes cases analysis defined on clock
buffers that result in the output clock of the buffer to be impacted by the case analysis.

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Vivado Design Suite 用户指南使用Vivado IDE.pdf》是一本关于使用Vivado IDE进行设计的用户指南Vivado Design Suite是赛灵思公司的一款设计软件套件,用于开发和实现FPGA(现场可编程门阵列)和SOC(系统片上芯片)设计。 这本用户指南旨在帮助用户了解和掌握Vivado IDE的各种功能和特性。它详细介绍了Vivado的安装、配置和基本使用方法,并提供了丰富的示例和案例,以帮助用户更好地理解和应用这个设计工具。 指南首先向读者介绍了Vivado Design Suite的基本架构和组成部分,如项目管理器、设计工具、约束编辑器和仿真工具等。然后,它介绍了如何创建、配置和管理项目,并详细说明了各种设计实体的创建和修改方法。 除此之外,用户指南还涵盖了Vivado IDE的高级特性,如IP(Intellectual Property)核的集成使用、设计验证和调试、时序优化等。读者可以通过本指南了解到如何使用Vivado IDE进行高级设计实践,以及如何提高设计效率和性能。 此外,用户指南还提供了详尽的参考资料,包括各种命令和选项的说明、错误和警告信息的解释、常见问题和解答等。这些参考资料可以帮助用户使用Vivado IDE过程中遇到问题时解决疑惑。 总之,《Vivado Design Suite 用户指南使用Vivado IDE.pdf》对于学习和使用Vivado IDE的用户来说是一本必备的参考书,它可以帮助用户更好地理解和掌握Vivado的设计工具,实现高效的FPGA和SOC设计。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值