【问题标题】:How to pass an argument to dc_shell in tcl mode?如何在 tcl 模式下将参数传递给 dc_shell?
【发布时间】:2020-12-11 06:32:54
【问题描述】:

我正在尝试通过我的 shell 脚本将参数传递给设计编译器 shell。

clk_period=20.30
dc_shell-t -f my_scripts.tcl $clk_period

报错

 Error: Unexpected argument '20.30'

怎么可能使用这样的功能?我在 tcl 编程中通过 argc 和 argv 使用 tclsh 编译器时使用它。但是 dc shell 不接受额外的参数

【问题讨论】:

    标签: shell parameter-passing


    【解决方案1】:

    在我的搜索中出现这种情况后,我终于自己找到了一种方法。一些工具显然使用 -tclargs,但使用 Synopsys 的情况并非如此。 -x 选项允许您传入 tcl 命令。所以像这样的工作:

    % dc_shell -f script.tcl -x "set test true"
    

    脚本可以回显 $test 并显示为真。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-05
      • 2018-07-30
      相关资源
      最近更新 更多