喜欢就争取,得到就珍惜,错过就忘记—dbGet(二)

640?wx_fmt=gif

通过前面一篇对dbGet基本用法的介绍,大家应该对它有一定了解了吧。那接来下,我们就要学习一下进阶的dbGet用法了。

dbGet是由它基本的语法加上各种object的attribute的组合构成的。大家在熟悉基本语法之后,就应该去学习各个object的attribute了。说实话,这很难,因为attribute很多,而且有的attribute写法相当奇怪,怎么看都看不懂,比如hInstTerms、hTerms、instTerms的区别。。。那我们怎么去了解这些attribute的意思呢?平时要多学多用,还有多看doc。

其实,我们dbGet本身是提供一些简单的attribute介绍信息的,上一篇文章里也讲过,采用.?h来查询。比如说我们不知道insts下面的pStatus属性是什么意思,就可以采用如下命令,它会简单介绍pStatus的意思和用途

[DEV]innovus 3> dbGet top.insts.?h pStatus

pStatus(settable): enum(cover fixed placed softFixed unplaced), This attribute is the placement status of an instance during placement and optimization. The placer will look at both place_status and place_status_cts and use the more restrictive value.

可能你会觉得这样去查询一个介绍有点繁琐,不像别的cmd只要help一下就行了。这里,dbTcl提供了另外一个很方便去查询的命令,dbSchema。怎么使用呢?比如说你想知道net的意思,可以采用下面命令:

[DEV]innovus 16> dbSchema net

=====================

net: Canonical (flat) net (equivalent to connectivity in DEF NETS and SPECIALNETS)

--------------------------------------

allTerms: objList(instTerm term), List of pointers to connections (terms and instTerms)

area: area, Area of the net as defined by the LEF MACRO SIZE or OVERLAP information

看到木有,是不是和.?h具有相同功能,而且方便多了,它还会把这个attribute下一级子attribute都列出来。

它也支持通配符匹配,下面命令就会得到net和netgroup的信息

[DEV]innovus 17> dbSchema net*

=======================

net: Canonical (flat) net (equivalent to connectivity in DEF NETS and SPECIALNETS)

-----------------------------------------

allTerms: objList(instTerm term), List of pointers to connections (terms and instTerms)

area: area, Area of the net as defined by the LEF MACRO SIZE or OVERLAP information

===================

netGroup: Net group

--------------------------------------

excludeNet(settable): enum(allLayer allLayerInGuidedArea inclusive sameLayer), Indicates group net exclude type(allLayer, sameLayer, inclusive, allLayerInGuidedArea)

它更加有用的地方在于,它还能帮你查询到上一级的attribute是什么,这样我们就能很方便地写出我们想要的dbGet命令。比如说我们不知道在哪些attribute下面有net属性,可以采用下面命令:

[DEV]innovus 18> dbSchema -parent net

640?wx_fmt=jpeg

也可以采用通配符来匹配,功能和-parent一样

[DEV]innovus 20> dbSchema * net

640?wx_fmt=jpeg

采用-list就可以只列出parent attribute的名字

[DEV]innovus 18> dbSchema -parent net -list

bump bus hInstTerm hNet hTerm inst instTerm net netGroup pWire pd routeType sViaInst sWire term topCell vWire viaInst wire

但是如果你不知道想要查询的attribute名字,上一级或者下一级都完全没思路的话,那就没办法。只能查询doc了,下面我们就来介绍一下各个attribute的意思,(由于数目太庞大,简单的或者很冷门的属性我就直接跳过了,按字母顺序来介绍吧)

bndry

得到design中fence,region,guide的place信息

Parent Object

fPlan, hInst

Child Object

area,box,box_area,box_ll,box_llx,box_lly,box_size,box_sizex,box_sizey,box_ur,box_urx,box_ury,boxes,hInst,objtype,prop,type

经常有人问我,dbGet怎么没法得到fence,region,guide属性。那这个attribute就是来得到这些东西的。前面的box,area,size就不介绍了,大家试一下就知道了。

hInst: 这边可能有些新人不理解hInst, inst和cell的区别,cell是netlist里面最基本的单元,inst是cell被实例化以后的东西,而hInst则是带有hierarchy结构的module,它的下层还有东西,那它就是hInst。下面这张图很好地表达了三者的区别

640?wx_fmt=jpeg

所以这边dbGet bndrys的hinst的话,

[DEV]innovus 3> dbget top.fPlan.bndrys.hInst.name

SUB_INTER_PH SUB_Tran_PH

objtype: 该attribute的类型是什么,通常可以用于检查一个指针是什么类型

prop: 可以自己使用define_property来定义新的property

type: 这个类型就是指module的约束属性了,分别是fence,region,guide,none,cluster. (注意的是,这里的cluster指的是softGuide)。这些约束的区别如下:


bump

得到design中的bump信息

Parent Object

topCell

Child Object

640?wx_fmt=jpeg

cell: bump cell

net: bump上assign的net

pStatus: bump placement status,分为cover, fixed, placed, softFixed, unplaced

term: bump的terminal

type: bump的terminal属性,分为analogTerm, asyncCtrlTerm, clockTerm, dQTerm, dTerm, fFQTerm, feedTerm, gatedClockTerm, groundTerm, latchQTerm, normalTerm, powerTerm, rSTerm, triStateTerm

大致知道powerTerm,groundTerm,normalTerm区别就行了。

具体内容参考:


bus

得到design中bus net的属性

Parent Object

net, term

Child Object

baseName,bits,lsb,msb

baseName: bus的基本名,比如A[7:0]的base name 就是A

bits: bus的每个bit

lsb: bus最小的有效bit

msb: bus最大的有效bit


busGuide

得到floorplan中bus guide的信息

Parent Object

fplan

Child Object

area,botLayer,box,box_area,box_ll,box_llx,box_lly,box_size,box_sizex,box_sizey,box_ur,box_urx,box_ury,netGroup,topLayer

这个比较简单,就是bus guide本身的一些内容了,可以参考以下文章:


fPlan

这是一个很常用的属性了,基本上physical的东西都能在这个parent下搜到

Parent Object

topCell

Child Object

640?wx_fmt=jpeg

这些child 属性都会在下文或者前文中介绍过,暂时不重复一遍了。


gCellGridDef

得到design中gcell grid的属性,其实输出的就是def文件中gcell grid的内容

Parent Object

fPlan

Child Object

dir,numGrids,start,step

dir: design中所有类型的gcell grid的方向

numGrids:design中所有类型gcell grid的属性

start: design中所有类型gcell grid的起始点

step:design中所有类型gcell grid的间距

可以参考以下文章


group

得到design中inst group的信息

Parent Object

fPlan, hInst, inst, pd

Child Object

area,boxes,conType,density,members,name,parent,pd,props

conType:得到instance group所添加的constrain属性

members:得到添加到instance group中的instance属性

parent:得到sub group所属的parent group属性

pd: 得到instance group的power domain

可以参考以下文章


head

head是整个design中包括库在内的所有东西总和。

Parent Object

No Parents

Child Object

allCells,cellEdgeSpacings,dbUnits,finGridDirection,finGridOffset,finGridPitch,instMaskShiftLayers,layers,libCells,mfgGrid,props,ptnCells,routeTypes,rules,sites,topCells,vCells,vias

instMaskShiftLayers:得到instance哪层layer可以shift

ptnCells: 得到partition cell名字

rules: design中的ndr rules

vCells:verilog中的module


hInst
hierarchical insts

Parent Object

bndry,group,hInstTerm,hTerm, inst,ptn,topCell,vCell

Child Object

allInsts,allTreeInsts,area,bndry,box,box_area,box_ll,box_llx,box_lly,box_size,box_sizex,box_sizey,box_ur,box_urx,box_ury,boxes,cell,group,hInstTerms,hInsts,hNets,insts,name,parent,props,ptn,treeHInsts,treeInsts

Hierarchical的db object总是有点复杂,这里也一样

allInsts:指的是当前hinst level下的所有insts

allTreeInsts: 指的是所有hinst以及所有子level下的insts

hInstTerms: hinst的terminal,就是传统意义上的hinst的port口,如下图所示:红圈圈的就是top下hinst的hInstTerms

[DEV]innovus 13>dbGet top.hInst.hInsts.hInstTerms.name

SUB_PH/cpureq

640?wx_fmt=jpeg

hNets:指hinst的net,如下图中红圈就是top下hinst的hNet

[DEV]innovus 14> dbGet top.hInst.hInsts.hNets.name 

SUB_PH/sec_mem_t_req

640?wx_fmt=jpeg

parent:指的是hinst上一级parent hinst的属性

treeHInsts:得到所有的hinsts属性

treeInsts:得到所有的insts属性,treeInsts加上treeHInsts就是allTreeInsts


hInstTerm

hinst的terminal

Parent Object

hInst, hNet

Child Object

downHNet,hInst,hTerm,layer,name,net,props,pt,pt_x,pt_y,term,upHNet

这个概念在hInst里已经解释过,但它下面还有很多child Object比较混乱

downHNet/upHNet: 这两个得放一起讲,如下图所示,对一条hierarchical net来说,对交接处的port口来说,往下走的net就是downHNet,就是蓝色圆圈;往上走的net的就是upHNet,就是红色圆圈。

640?wx_fmt=jpeg

[DEV]innovus 15> dbGet top.hInst.hInsts.hInstTerms.downHNet.name

SUB_PH/lx_dmu_debug_enable

[DEV]innovus 16> dbGet top.hInst.hInsts.hInstTerms.upHNet.name

lmi_lmipl_vid_maX1X

hTerm:hierarchical term,这个和hinstTerm的区别在于,hinstTerm是对一个hinst来说,从外往里看的teminal;而hTerm是从里往外看的teminal,是flat的

[DEV]innovus 16> dbGet top.hInst.hinsts.hinsts.hInstTerms.hTerm.name

target_1_asb_add[9]

对应着下面的图片上的红圈,就是这条命令get的hterm名字

640?wx_fmt=jpeg

term:term的概念是cell的terminal,可以是lib cell,partition cell或者top cell

先介绍到这里吧,剩余的下期再一起介绍~~


640?wx_fmt=jpeg

往期回顾

简历请戳邮箱:taozhang3260@163.com

觉得有用的话,给我点个好看吧640?wx_fmt=gif

  • 5
    点赞
  • 42
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值