小风哥FPGA进阶二 Xilinx 约束那点事儿1
0赞约束那点事儿1
约束的顺序
Xilinx 官方手册ug907中推荐了一种引脚约束的顺序:
译文大意:无论你是使用一个或多个XDC,推荐组织你的约束文件时,遵循以下顺序:
## Timing Assertions Section
# Primary clocks
# Virtual clocks
# Generated clocks
# Clock Groups
# Input and output delay constraints
## Timing Exceptions Section (sorted by precedence)
# 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 XDC file
在我们进行项目维护时,有时会遇到从ISE到Vivado的工程移植。移植时,代码可以直接搬移,但是ISE下的约束文件UCF(user constraints file)却无法在Vivado中直接使用。
别着急,Xilinx官方手册UG911中推荐了一种从ISE软件中导出XDC(Xilinx design constrains)文件的方法,即使用软件中自带的TCL脚本,导出XDC文件。
现在我们学习一下这个小技巧的使用方法吧。
前提:必须是已经通过了工程实现Implementation的工程,或者已经在ISE下约束已经生效的工程。
步骤:
打开你包含UCF约束的工程;
点击 Open Synthesized Design.
3. 在 Tcl Console 命令栏中输入
write_xdc <filename>.xdc
但是,Xilinx重申了这个脚本并非是一个文件转换器。在我理解,这个TCL命令只是约束导出工具,只限于将工程中的已有约束导出成指定的文件格式。
如果你是单纯的想ucf转换为xdc,劝你还是用Python做个小脚本试试吧。