innovus dbGet用法探索
专栏:iLoveIC Jan. 17, 2024, 10:55 a.m. 158 阅读
dbGet可以读取innovus的内部设计数据库,从中得到如inst、net、lib、lef等信息,也可以查询cell、net的状态和属性。

查询有哪些对象

dbGet后面不知道加什么参数时就按<tab>,会自动提示可用的关键词headselectedtop

dbGet <tab>

image.png

进一步看看headtopselected都有哪些下一级的对象:

dbGet head.<tab>

image.png

dbGet top.<tab>

image.png

selected就要看当前选中的什么,选inst就是列出top.insts的属性,选net就是列出top.nets.wires的属性,相当于是一个快捷操作:

dbGet selected.<tab>

查询每个对象有些属性

dbSchema *会把top.后面支持的对象和属性全部列出来:

dbSchema * > dbschema.log

也可以仅列出inst有哪些属性:

dbSchema inst

常见属性有:

  • area

  • box

  • defName

  • dontTouch

  • hInst

  • instTerms

  • isIsolation

  • isLevelShifter

  • isPhysOnly

  • isSpareGate

  • name

  • orient

  • pStatus: enum(cover fixed placed softFixed unplaced)

  • pStatusCTS

  • pStatusEffective

  • pgInstTerms

查看inst状态

# 取得所有fixed属性的inst
dbGet [dbGet -p top.insts.pStatus fixed].name

# 查看指定inst的pStatus
dbGet [dbGetInstByName WELLTAP_588].pStatus

-p来 控制打印的对象

先来做几个实验:

dbGet top.insts.dontTouch true
# true true true ...

dbGet -p top.insts.dontTouch true
# 0x7fbfcd468120 0x7fbfcd4680b0 0x7fbfcd468040 ...
dbGet [dbGet -p top.insts.dontTouch true].name
# C_345_OBUF C_344_OBUF C_343_OBUF ...

dbGet -p1 top.insts.dontTouch true
# 0x7fbfcd468120 0x7fbfcd4680b0 0x7fbfcd468040 ...
dbGet [dbGet -p1 top.insts.dontTouch true].name
# C_345_OBUF C_344_OBUF C_343_OBUF ...

dbGet -p2 top.insts.dontTouch true
# 0x7fbff5801880 0x7fbff5801880 0x7fbff5801880
dbGet [dbGet -p2 top.insts.dontTouch true].name
digital_top digital_top digital_top ...

总结:

  1. -p-p1作用相同,打印的是dontTouch的属性

  2. -p1打印的是具有dontTouch属性的cell inst的对象

  3. -p2打印的是top的名字

  4. -p[number]中的数字,表示的是从后往前的第几级对象(或者属性)

比如:

# 获取有M6走线的普通net的名字
dbGet [dbGet -p3 top.nets.wires.layer.name M6].name

dbGet的返回值类型

dbGet的返回值类型是list,不是collection。

所以,我们可以用llength来获取dbGet返回的对象个数,如:

llength [dbGet -p2 top.insts.cell.name "GCK*"]

一些常用的快捷命令

# dbGetInstByName
dbGetInstByName WELLTAP_588

# dbGetOrCreateSNetByName

# dbGetPrerouteAsObs

一些常用的命令举例

# 获取libcell列表
dbGet head.libCells.name

# 获取lib库里的clock buffer列表
dbGet head.libCells.name CKBD*

# 获取layer的名字
dbGet head.layers.name *

# 获取inst列表
dbGet top.insts.name *
dbGet top.insts.name FILLER_*
dbGet top.insts.name *_IBUF
dbGet top.insts.name u_*

# 获取dont touch为true的inst列表
dbGet [dbGet -p top.insts.dontTouch true].name

# 获取icg的inst列表
dbGet [dbGet -p2 top.insts.cell.name "GCK*"].name
感谢阅读,更多文章点击这里:【专栏:iLoveIC】