ICC2中get_XXX等命令是抓取特定cell、net的良好方式,但是有很多初学者都曾被它们所困扰,具体有以下问题:
它们的后缀-hierarchical的具体含义是什么?-hierarchical与get_attribue 中is_hierarchical的区别是什么?为什么明明抓取到了特定的cell或者net,但是无法在gui界面将它们高亮出来?get_XXX与get_flat_XXX的区别具体是什么?
以下将结合实际项目做具体阐述,首先是get_cells的相关概念:
1.什么是leaf cell,如果简单解释的话在ICC2中只要不是module就是leaf cell,leaf cell的is_hierarchical必然是false。
2.get_cells 检索最顶层一级的module和leaf cell,检索得到的full_name必然是不带/的,比如下图的三个module以及若干个clamp_core均可用该命令进行检索,get_cells检索的范围还包括physical only cell。
3.get_cells -hierarchical 检索设计全部的module与leaf cell,涵盖的范围最大。
4.get_flat_cells 检索设计非block内部的leaf cell,get_flat_cells的is_hierarchical必然是false,表明不检索module名,该命令不检索任何physical only cell,若要检索,需额外带上-all选项。
5.get_flat_cells -hierarchical 相比于get_flat_cells额外检索block内部的leaf cell。比如下图中设计带四个block,可依此命令检索其内部的leaf cell。
6.如何检索非顶层的module:remove_from_collection [get_cells -hierarchical -filter is_hierarchical] [get_cells]。
7.检索block内部的physical cell:get_cells [remove_from_collection [get_cells -hierarchical] [get_cells]] -filter is_physical_only。
8.get_flat_cells -hierarchical 等价于 get_cells -hierarchical -filter “!is_hierarchical &&!is_physical_only”。
9.ICC2对cells的分类比较严格,对于非block内部的leaf cell,虽然其范围包括在get_cells -hierarchical里面,但直接get_cells -hierarchical 接cells的名字是无法获取的。应使用get_flat_cells 接cells名字获取。具体原因见下图。简单来说就是get_flat_cells匹配的是full_name,而get_cells -hierarchical匹配的是name,因此,推荐使用万能方法匹配:get_cells -hierarchical -filter “full_name=~XXX”。但这样检索的速度会慢一些,因此熟练之后还是应使用更准确的检索形式:
10.有时候明明在console界面能显示抓取的cell,但无法在gui界面将其高亮,这往往是因为抓取的cell是module性质(但注意,block形式的module是可以被高亮的),另外也有可能是犯了上述9的错误。
其次是get_pins的相关概念,get_pins、get_flat_pins、get_pins -hierarchical 、get_flat_pins -hierarchical的含义和get_cells等命令非常的相似; 对于logical leaf cell和module而言,它们的pin和name是完全对应的,因此:
get_flat_cells -of_objects [get_flat_pins] 等价于 get_flat_cells ;
get_flat_cells -hierarchical -of_objects [get_flat_pins -hierarchical] 等价于 get_flat_cells -hierarchical;
但对于部分physical only cell而言,它们不存在任何pin,因此,可以通过以下命令去寻找设计中的这类cell:
remove_from_collection [get_cells -hierarchical] [get_cells -of_objects [get_pins -hierarchical]]
get_nets、get_flat_nets、get_nets -hierarchical 、get_flat_nets -hierarchical的概念与上述同样类似,但是它们没有is_hierarchical这个attribute。