| |
procedure(FilterLib(lib)
foreach(cellID ddGetObj(lib)->cells
cell=celllD~>name
FilterCell(cell) ;This function is defined below.
);end foreach
printf(" ^_^ Library \"%s\" is finished. \n" lib)
);end procedure
procedure(FilterCell(lib cell)
printf(" ^_^ Cell \"%s\" begins! \n" cell)
destLib="Digital" ;Define the destination library.
when(cv=dbOpenCellViewByType(lib cell "schematic" "" "r")
foreach(instID cv~>instances
when((instID~>libName=="specified library")
dest_cell = ddGetObj(destLib instID~>cellName)
if(dest_cell==nil then
foreach(view list("schematic" "symbol")
source_cell = dbOpenCellViewByType( "specified library" instID~>cellName view)
dbCopyCellView(source_cell destLib instID~>cellName view)
dbClose(source_cell)
);end foreach view
);end if dest_ceH
);end when
);end foreach instID
dbClose(cv)
);end when cv
);end procedure FilterCell
1,这个脚本没有计数功能。我是初学者,计数方法对我来说是个新课题,我需要时间研究一下,希望能拿出来。
2,论坛上有同学说,可以使用virtuoso自带的“print tree”来实现这个功能,位置在Virtuoso Schematic Editor->Edit->Hierarchy->rint Tree. 默认快捷键是“Shift+T”。可以列出用到的所有library、cell和对应数目。(我的virtuoso版本是IC617,不知道之前的版本是否支持这个功能。)
/2