学习日记 remove_from_collection & range_collection

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

range_collection
[-help]
base_collection
from
to

返回 base 集合的子集合。子集合范围为 'from' 和 'to' 之间(包括 'from' 和 'to') 。

base_collection :基本集合;
from :"form" 的索引号;
to : "to" 索引号;
索引号可以是整数或表达式,例如 “end 或者 end-integer” (表达式中没有空格);
如果指定的 to/from 值为负数(小于 0),则软件会将此值更改为 0。如果该值大于 “collection_size – 1”,则它将更改为 “collection_size – 1”。

示例:

得到 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 就可以;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值