用户工具

站点工具


语法:tcl_synopsys

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
语法:tcl_synopsys [2024/10/08 08:01] – 移除 - 外部编辑 (Unknown date) 127.0.0.1语法:tcl_synopsys [2026/10/15 21:29] (当前版本) – 外部编辑 127.0.0.1
行 1: 行 1:
 +# tcl for synopsys
 +这个tcl是只用于snps的tcl环境,其它家可能不能用。
 +
 +## - filter expression
 +### - 表达式匹配 expression
 +
 +```tcl
 +get_cells * -filter "full_name =~ *abc*"
 +# 这个例子是获取full_name与*abc*相匹配的cells
 +```
 +
 +filter可以使用如下的表达式\
 +![:edastudy:pasted:20230608-084822.png](:edastudy:pasted:20230608-084822.png?nolink)
 +
 +
 +### - attribute function match
 +
 +```tcl
 +get_cells * -filter "defined(full_name)"
 +# 这个例子是获取所有define了full_name属性的cells
 +```
 +
 +![:edastudy:pasted:20230608-084915.png](:edastudy:pasted:20230608-084915.png?nolink)
 +
 +
 +## - lsc
 +
 +```tcl
 +set fp [open "abc.log" w];
 +
 +foreach_in_collection tmp [get_pins -hierarchical *Q] {
 +    set tt [get_attribute [get_pins $tmp] FULL_NAME];
 +    puts $fp $tt;
 +}
 +
 +close $fp;
 +```
 +
 +
 +
 +## - cc
 +
 +```tcl
 +
 +list get_attribute
 +    object_list
 +    attribute_name
 +    [-bus]
 +    [-quiet]
 +    [-return_null_values]
 +```
 +
 +
 +
 +
 +```tcl
 +proc cc {coll} { foreach_in_collection item $coll { puts [get_attribute $item full_name] } }
 +
 +# 用于将coll list打印为行形式。
 +cc [get_cells]
 +```
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki