innovus 命令 remove_from_collection
remove_from_collection
base_collection
[-intersect]
collection_or_obj_list
通过从一个集合中移除另一个集合中指定的对象来创建新集合。
base_collection :基本集合,需要被移除的集合;
-intersect :提供两个集合的交集;
collection_or_obj_list :可以是个集合也可以是个列表,指定需要从base collection移除的;
示例:
集合 colall 移除 hierarchical_name U开头的 pin:
remove_from_collection $colall [get_pin -hierarchical -filter "hierarchical_name =~ U*"]
col1 和 col2 两个集合的交集:
set col1 [get_cells -hierarchical -filter "hierarchical_name =~ U*"]
set col2 [get_cell -filter "hierarchical_name =~ *172*"]
remove_from_collection $col1 $col2 -intersect
命令 range_collection
返回 base 集合的子集合。子集合范围为 'from' 和 'to' 之间(包括 'from' 和 'to') 。
示例:
得到 6 到倒数第二个的集合:
set col1 [get_cells -hierarchical -filter "hierarchical_name =~ U*"]
range_collection $col1 6 end-1
也可以倒序抓,从6到1 (index_collection可以正序,不能倒序):
range_collection $col 6 1
range_collection $col1 end 0
如果是list想实现倒序的话 lreverse 就可以;