在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 15320|回复: 1

[资料] From Solvnet: set_app_var and set Command in a Procedure.

[复制链接]
发表于 2011-7-9 09:31:26 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
Why Am I Getting a Different Behavior Between the set_app_var Command and the set Command in a Procedure?
Doc Id:033324 Product:Design Compiler Last Modified:07/07/2011
Average User Rating:

                               
登录/注册后可看大图

                               
登录/注册后可看大图
(0)        Rate Article:

                               
登录/注册后可看大图


[url=]

                               
登录/注册后可看大图
Save Article[/url][url=]

                               
登录/注册后可看大图
Tag Article[/url]

                               
登录/注册后可看大图
Print [url=]

                               
登录/注册后可看大图
Email[/url]

Question:I wrote the following Tcl procedure and noticed a different behavior between the set_app_var command and the set command.proc.tcl:proc abc {} {set bind_unused_hierarchical_pins false}proc def {} {set_app_var bind_unused_hierarchical_pins false}When I ran the following commands in Design Compiler,dc_shell> source ./proc.tcldc_shell> set bind_unused_hierarchical_pins truedc_shell> abc dc_shell> printvar bind_unused_hierarchical_pinsdc_shell> defdc_shell> printvar bind_unused_hierarchical_pinsthe first printvar command returned a true value, and the second printvar command returned a false value.It seems that the set command fails to set a Design Compiler application variable in a procedure and that only the set_app_var command correctly sets a Design Compiler application variable in a procedure. Is this the expected behavior?
Answer:All variables within a procedure are local unless you set them as global. Using the set_app_var command correctly sets the scope to global automatically.The following update to your procedure will resolve the problem:proc abc {} {global bind_unused_hierarchical_pinsset bind_unused_hierarchical_pins false}
发表于 2011-7-11 09:07:51 | 显示全部楼层
学习了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-26 04:56 , Processed in 0.016634 second(s), 6 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表