【发布时间】:2016-08-29 09:12:19
【问题描述】:
我正在尝试在 Vivado GUI Tcl 控制台中执行一个 tcl 脚本,我的脚本需要一个参数来决定必须配置哪种类型的运行(synth、impl、bitgen 等)。
我知道,如果脚本在 Vivado 命令行模式下执行,则使用 -tclargs 可以传递参数。比如:
vivado -mode batch -source <filename> -tclargs <arguments>
我在 Vivado gui 模式下尝试过同样的操作,但出现错误。
ERROR: [Common 17-170] Unknown option '-tclargs', please type 'source -help' for usage info.
运行'source -help':
Syntax:
source [-encoding <arg>] [-notrace] [-quiet] [-verbose] <file>
Usage:
Name Description
------------------------
[-encoding] specify the encoding of the data stored in filename
[-notrace] disable tracing of sourced commands
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution
<file> script to source
通过查看-help,我感觉这是不可能的。另外,我找不到任何这样做的文件。我想知道是否有任何方法可以实现这一点。
【问题讨论】:
-
也许可以在调用 source 之前设置 argv 和 argc?
-
@haggai_e,谢谢。现在可以了。