I need to update a pcell parameter in a layout; specifically the pcell revision parameter. I would like to open the layout and update all the instances from the process library to the latest revision. I have included the following code that seems to work but I wanted to ask if there is a safer way to update this parameter and also if there is anything I'm omitting in the update process that may be a problem. I know that different pcell revisions have new layers/parameters that are added and I'm thinking there might be another step I'm missing. Note: this code assumes that the defValue param is the latest rev. procedure( updatePcellRevs( lib cell view pLib) let ( cv targetObjs paramIQ ) cv=dbOpenCellViewByType( lib cell view "" "a") targetObjs=setof(x cv~>instances x~>libName==pLib) if( targetObjs then foreach( inst targetObjs if( paramIQ=cdfFindParamByName(cdfGetInstCDF(inst),"pcellRev") then if( paramIQ~>value==paramIQ~>defValue then printf("No update needed.\n" nil ) else if( cdfUpdateInstSingleParam(inst,paramIQ) then printf("Changing \"%s\": %s --> %s\n" paramIQ~>prompt paramIQ~>paramIQ~>value paraIQ~>defValue ) else printf("ERROR --> Parameter update failed!\n" nil ) ); close if ); close if ); close if ); close foreach ); close if dbSave(cv) dbClose(cv) ); close let ); close procedure
↧