微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微电子和IC设计 > IC后端设计交流 > From Solvnet: set_app_var and set Command in a Procedure.

From Solvnet: set_app_var and set Command in a Procedure.

时间:10-02 整理:3721RD 点击:
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:


Save Article
Tag Article
Print
Email
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}

学习了

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top