cadence

Is there a way for a SKILL script to find and replace parts on schematic?


I am trying to write a SKILL script that replaces parts on a schematic given a csv file with the original part, and the desired replacement. So far I have looked through the Intro to Skill Programming. I only see information about file I/O and nothing, to my knowledge, that would allow the script to find and replace parts in the schematic.


Solution

  • You should register on the Cadence support site https://support.cadence.com/ There is a lot of information and examples on the site. Below is just an example of how to find and update instances in schematic

    procedure(ATUpdateSchematicInstances(libName cellName viewName updateTable @optional (ignoreErrors nil))
            let( (cvId instList instOldLib instOldCell key destLibName destCellName vicViewList instOldView updateResult errorInstList)
                
                cvId=dbOpenCellViewByType(libName cellName viewName "schematic" "a")
                instList=cvId~>instHeaders
                foreach(inst instList
                    instOldLib=inst->libName
                    instOldCell=inst->cellName
                    instOldView=inst->viewName
        
                    key=ATCreateCellInfo(instOldLib instOldCell)
        
                    when(updateTable[key]
                        destLibName=updateTable[key]->libName
                        destCellName=updateTable[key]->cellName
                        
                        updateResult=dbSetInstHeaderMasterName(inst destLibName destCellName instOldView)
                    );when
                );foreach
                
                schCheck(cvId)
                dbSave(cvId)
                dbClose(cvId)
            );let
    
    );procedure ATUpdateSchematicInstances