EETOP专注芯片、微电子,点击上方蓝字关注我们
EETOP创芯网(易特创芯):国内著名的老牌电子工程师社区及半导体行业门户网站(150万会员)
blog.eetop.cn edu.eetop.cn
本文转载自公众号:不忘初心的模拟小牛牛
在模拟前端设计验证中,经常会碰到testbench的调试或者切换,比较笨的方法就是一个个删除,或者替换,很不方便。
其实Virtuoso版本在617及以后,已经添加了快捷键shift+delete,可以快速的false掉激励源,器件或者子模块,并且显示一个红色的X号,起到标识作用。但在IC616及以前版本是无法使用的,其本质是在property中增加了用户自定义的属性nlaction如图1所示。属性值为ignore或者stop。
图1
所以我们可手动的添加这个属性,并通过修改其属性false掉不想产生网标的block。但该方法存在缺点就是没有标识,不够直观,需要点开才能确认是否包含nlaction属性及其属性值。
图2
因为我虚拟机中装的还是616,所以查了些资料,动手自己写了个skill,实现了快捷键添加/删除ignore属性,并且打上/去掉ignore标识"X"。基本上实现了617上的功能。
目前脚本还是有些瑕疵:
但基本满足了我的需要,这里分享给大家,也希望skill脚本大牛能够改进完善。
目前实现效果如图3和图4所示。
图3
图4
图5(左右)分别是图3图4电路图产生的网表对比,符合预期。
图5
图6是脚本内容,变量名字也是起的很不规范哈,大家可以参考下。最后一句话是设置快捷键,大家也可以修改,这里我使用了617中默认的快捷键。
图6
使用方法有两种,第一种是需要使用时,在CIW窗口使用load命令加载。如图7所示;第二种是在.cdsinit中添加内容(如图8),这样每次启动virtuoso都会自动加载,并提示加载成功的信息(如图9),会比较方便。
图7
图8
图9
欢迎大家试用,碰到问题可以在公号下留言,讨论。也欢迎大家有比较好实用的脚本投稿,我会分享给大家。
procedure(InstIgnore()
let((cvId inst_sel bbox_x0 bbox_y0 bbox_x1 bbox_y1 new_x0 new_y0 new_x1 new_y1 obj_list obj_list_index)
cvId = geGetEditCellView()
inst_sel=car(geGetSelSet())
; if Not find nlaction
if(dbFindProp(inst_sel "nlAction")==nil then
; add user property nlAction ignore
dbCreateProp(inst_sel "nlAction" "string" "ignore")
; get selected instance bbox dimension
bbox_x0=nth(0 nth(0 inst_sel~>bBox))
bbox_y0=nth(1 nth(0 inst_sel~>bBox))
bbox_x1=nth(0 nth(1 inst_sel~>bBox))
bbox_y1=nth(1 nth(1 inst_sel~>bBox))
; calulate noteshape " X " located on symbol
new_x0=bbox_x0+(bbox_x1-bbox_x0)/2.5
new_y0=bbox_y0+(bbox_y1-bbox_y0)/5
new_x1=bbox_x1-(bbox_x1-bbox_x0)/2.5
new_y1=bbox_y1-(bbox_y1-bbox_y0)/5
; draw noteshape
schCreateNoteShape( cvId "line" "solid" list(new_x0:new_y0 new_x1:new_y1 ) 0.025)
schCreateNoteShape( cvId "line" "solid" list(new_x0:new_y1 new_x1:new_y0 ) 0.025)
else
; if find nlAction property ,delete it
dbDeletePropByName(inst_sel "nlAction")
; get selected instance bbox dimension
bbox_x0=nth(0 nth(0 inst_sel~>bBox))
bbox_y0=nth(1 nth(0 inst_sel~>bBox))
bbox_x1=nth(0 nth(1 inst_sel~>bBox))
bbox_y1=nth(1 nth(1 inst_sel~>bBox))
; selcet New Area based on selected instance
geSelectArea(hiGetCurrentWindow() list(list(bbox_x0 bbox_y0) list(bbox_x0 bbox_y1) list(bbox_x1 bbox_y1) list(bbox_x1 bbox_y0)) "polygon")
obj_list=geGetSelSet()
obj_list_index=0
foreach(var obj_list~>objType
; find objType path ,only delete previous added noteshpe "X"
if(var=="path" then
dbDeleteObject(nth(obj_list_index obj_list))
)
obj_list_index++
)
geSingleSelectPoint(hiGetCurrentWindow() nil list(0 0))
)
)
)
hiSetBindKey("Schematics" "Shift<Key>Delete" "InstIgnore()")