| |||
基于cadence SKILL的小脚本,使用方法是在 virtuoso ciw load 该脚本,会弹出一个输入框,分别输入源library name,目标library name,以及cell 的正则表达式,点击OK后,脚本会将所有源library 的 匹配正则表达式的 cell schematic 全部拷贝到目标library。
估计这个脚本应用不会太多,除了我自己这情况。。。
let((Slibstr Dlibstr Rexstr CopyForm Slib Dlib Rexcellname SlibID CellsIDlist Cellname viewslist CopySchObj viewIDsingle) Slibstr=hiCreateStringField( ?name 'Slibstr ?prompt "Source library" ?defValue "" ) Dlibstr=hiCreateStringField( ?name 'Dlibstr ?prompt "Destination library" ?defValue "" ) Rexstr=hiCreateStringField( ?name 'Rexstr ?prompt "Rexcellname" ?defValue "^Prefix_[A-Za-z0-9]+$" ) CopyForm=hiCreateAppForm( ?name 'CopyForm ?formTitle "Copy Sch to another library by regular expression" ?fields list(Slibstr Dlibstr Rexstr) ?buttonlayout 'OKCancel ) hiDisplayForm('CopyForm) Slib=Slibstr~>value ;Source library Dlib=Dlibstr~>value ;Destination library Rexcellname=Rexstr~>value ;Source regular expression string SlibID=ddGetObj(Slib) ;get Source library ID CellsIDlist = SlibID~>cells ;get all cells "IDlist" foreach(CellID CellsIDlist Cellname=CellID~>name ;get cell name rexCompile(Rexcellname) ;Source regular expression for matchs when(rexExecute(Cellname) ;when the cellname matchs the regular expression viewslist = CellID~>views~>name foreach(viewname viewslist when(viewname=="schematic" CopySchObj = dbOpenCellViewByType(Slib Cellname "schematic") dbCopyCellView(CopySchObj Dlib Cellname "schematic" nil nil nil) printf("Copy cell %s schematic from %s to %s succeeded\n" Cellname Slib Dlib ) );when viewname is "schematic",copy the "schematic" to Destination library ) ) ) )