简体   繁体   English

在Vivado中编写脚本

[英]Scripting in Vivado

I am using Vivado for running my Verilog codes. 我正在使用Vivado来运行我的Verilog代码。 Even though I do not see any errors while running synthesis and implementation, bitstream cannot be built. 即使我在运行综合和实现时没有看到任何错误,也无法构建比特流。

This is the error I get: 这是我得到的错误:

ERROR: [Drc 23-20] Rule violation (NSTD-1) Unspecified I/O Standard - 12 out of 12 logical ports use I/O standard (IOSTANDARD) value 'DEFAULT', instead of a user assigned specific value. 错误:[Drc 23-20]规则违规(NSTD-1)未指定的I / O标准 - 12个逻辑端口中的12个使用I / O标准(IOSTANDARD)值'DEFAULT',而不是用户指定的特定值。 This may cause I/O contention or incompatibility with the board power or connectivity affecting performance, signal integrity or in extreme cases cause damage to the device or the components to which it is connected. 这可能会导致I / O争用或与电路板电源或连接不兼容,从而影响性能,信号完整性或在极端情况下导致设备或其所连接的组件受损。

Which also suggests: 这也表明:

To correct this violation, specify all I/O standards. 要更正此违规,请指定所有I / O标准。 This design will fail to generate a bitstream unless all logical ports have a user specified I/O standard value defined. 除非所有逻辑端口都定义了用户指定的I / O标准值,否则此设计将无法生成比特流。 To allow bitstream creation with unspecified I/O standard values (not recommended), use this command: 要允许使用未指定的I / O标准值创建比特流(不推荐),请使用以下命令:

 set_property SEVERITY {Warning} [get_drc_checks NSTD-1] 

NOTE: When using the Vivado Runs infrastructure (eg launch_runs Tcl command), add this command to a .tcl file and add that file as a pre-hook for write_bitstream step for the implementation run. 注意:使用Vivado运行基础结构(例如,launch_runs Tcl命令)时,将此命令添加到.tcl文件,并将该文件添加为执行运行的write_bitstream步骤的预挂钩。

Which comes down to how can I script in Tcl using Vivado? 这归结为我如何使用Vivado在Tcl编写脚本? I added the suggested command to the tcl console but I still get the same error. 我将建议的命令添加到tcl控制台,但我仍然得到相同的错误。

I sugest you do what the tool is telling to do, which is specify IO standard for your top level ports, for example, if you have sys_rst_n top level port you may add the following line to your .xdc constraint file: 我知道该工具正在执行的操作,即为顶级端口指定IO标准,例如,如果您有sys_rst_n顶级端口,则可以sys_rst_n添加到.xdc约束文件中:

set_property IOSTANDARD LVCMOS18 [get_ports sys_rst_n]

of course you should change LVCMOS18 to match IO standard of you port. 当然你应该改变LVCMOS18以匹配你端口的IO标准。

The error you get is really not a Tcl issue. 你得到的错误实际上不是 Tcl问题。

YOU WANT to fix these IOs, otherwise you may damage your hardware. 您想要修复这些IO,否则可能会损坏您的硬件。

  • open the routed checkpoint (dcp) 打开路由检查点(dcp)
  • using the IO port window fix the IOs that have default IO standard (one by one if needed) 使用IO端口窗口修复具有默认IO标准的IO(如果需要,逐个)
  • create the bitstream from the tcl window 从tcl窗口创建比特流

Here's how to create a .tcl to fix this without having to re-implement the whole project: 以下是如何创建.tcl来解决此问题,而无需重新实现整个项目:

  • copy the commands that ran to fix the IOs from above (from the tcl console) and put the commands in a tcl file 复制从上面(从tcl控制台)修复IO的命令,并将命令放在tcl文件中
  • add this tcl file as a hook to "post route physopt" so the tcl runs automatically when this last step in the implementation flow. 将此tcl文件添加为“post route physopt”的挂钩,以便在实现流程的最后一步时tcl自动运行。
  • if you'll be rerunning implementation in the future, you should just place the commands in the project xdc file instead. 如果您将来重新运行实现,则应该将命令放在项目xdc文件中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM