• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Creating a Form to create libraries, import GDS

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 144
  • Views 15882
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Creating a Form to create libraries, import GDS

imecabhi
imecabhi over 10 years ago

Hello,

I am trying to write a code to create a form in which I can create a few libraries using a technology (.tf) file and then streamIn the GDS into one for these libraries, but I am stuck at a point where the GDS has to be imported. I still have to add to this code which will instantiate the top cell of the imported GDS into a new Cell view of another library. and then streamout that cellview. Below is the code that I have written so far.

/***************************************************************
*                                                              *
*                       abCreateForm()                         *
*                                                              *
*                     Create the main form                     *
*                                                              *
***************************************************************/
procedure(abCreateForm()
    let((techFile browsetf tfView inpLibName inpGds browseInp sep1 maskLibName maskStrLibName sep2  
        destLibName destCellName destViewName sourceLibName sourceCellName sourceViewName sourceBrowse rotation)
    
    ; techfile browsing and viewing
    
    techFile=hiCreateStringField(
        ?name 'techFile
        ?prompt "Tech File"
       
        )
    
    browsetf=hiCreateButton(
        ?name 'browsetf
        ?buttonText "Browse"
        ?callback "abTechfileBrowseCB()"
        )
    
    tfView=hiCreateButton(
        ?name 'tfView
        ?buttonText "View"
        ?callback "abViewTech()"
        )
    
    ;Input Library and streaming Input GDS
    
    inpLibName=hiCreateStringField(
        ?name 'inpLibName
        ?prompt "Input GDS Library Name"
      
        )
    
    inpGds=hiCreateStringField(
        ?name 'inpGds
        ?prompt "Input GDS to stream"
      
        )
    
    browseInp=hiCreateButton(
        ?name 'browseInp
        ?buttonText "Browse"
        ?callback "abGDSFileBrowseCB()"
        )
    
    sep1=hiCreateSeparatorField(?name 'sep1)
    
    ;Mask Design Library and Mask Structures Library
    
    maskLibName=hiCreateStringField(
        ?name 'maskLibName
        ?prompt "Mask Library Name"
       
        )
    
    maskStrLibName=hiCreateStringField(
        ?name 'maskStrLibName
        ?prompt "Mask Structures Library Name"
        ?callback "abImportGDS()"
        )
    
    sep2=hiCreateSeparatorField(?name 'sep2)
    
    ;Cellview creation and browsing an instance from source library
    
    destLibName=hiCreateStringField(
        ?name 'destLibName
        ?prompt "Enter Library Name"
        ?callback "abCreateInst()"
        )
        
    destCellName=hiCreateStringField(
        ?name 'destCellName
        ?prompt "Enter Cell Name"
        ?callback "abCreateInst()"
        )
        
    destViewName=hiCreateStringField(
        ?name 'destViewName
        ?prompt "Enter View Name"
        ?callback "abCreateInst()"
        )
    
    sourceLibName=hiCreateStringField(
        ?name 'sourceLibName
        ?prompt "Source Library Name"
        ?callback "ddsUpdateSyncWithForm()"
        )
        
    sourceCellName=hiCreateStringField(
        ?name 'sourceCellName
        ?prompt "Source Cell Name"
        ?callback "ddsUpdateSyncWithForm()"
        )
        
    sourceViewName=hiCreateStringField(
        ?name 'sourceViewName
        ?prompt "Source View Name"
        ?callback "ddsUpdateSyncWithForm()"
        )
        
    sourceBrowse=hiCreateButton(
        ?name 'sourceBrowse
        ?buttonText "Browse"
        ?callback "abSyncBrowser()"
        )
        
    rotation=hiCreateRadioField(
        ?name    'rotation
        ?prompt    "Rotation"
        ?choices list("R0" "R90" "R180" "R270" "MY" "MYR90" "MX" "MXR90")
        ?value    "R0"
        ?callback list("abRotationButtonCB()")
        )
        
    hiCreateAppForm(
        ?name 'abInputForm
        ?formTitle "Input Information Form"
        ?fields
            list(
                list(techFile 0:0 450:30 200)
                list(browsetf 450:5 60:25)
                list(tfView 520:5 50:25)
                list(inpLibName 0:30 500:30 200)
                list(inpGds 0:60 500:30 200)
                list(browseInp 500:65 60:25)
                list(sep1 0:95 600:0)
                list(maskLibName 0:100 600:30 200)
                list(maskStrLibName 0:130 600:30 200)
                list(sep2 0:165 600:0)
                list(destLibName 0:170 600:30 200)
                list(destCellName 0:200 600:30 200)
                list(destViewName 0:230 600:30 200)
                list(sourceLibName 0:260 600:30 200)
                list(sourceCellName 0:290 600:30 200)
                list(sourceViewName 0:320 600:30 200)
                list(sourceBrowse 200:350 60:25)
                list(rotation 0:380 600:0 200)
                )
            )
        
        )
    )


/***************************************************************
*                                                              *
*                      abTechfileBrowseCB()                    *
*                                                              *
*                     Browsing the Tech File                   *
*                                                              *
***************************************************************/
procedure(abTechfileBrowseCB()
    ddsFileBrowseCB(
    abInputForm
    'techFile
    "*.tf"
    'browsetf
    )
    )
    
    
/***************************************************************
*                                                              *
*                         abViewTech()                         *
*                                                              *
*                     Viewing the Tech File                    *
*                                                              *
***************************************************************/
procedure(abViewTech()
    view(
    abInputForm->techFile->value
    )
    )
    

/***************************************************************
*                                                              *
*                      abGDSFileBrowseCB()                     *
*                                                              *
*                     Browsing the Input GDS                   *
*                                                              *
***************************************************************/
procedure(abGDSFileBrowseCB()
    ddsFileBrowseCB(
    abInputForm
    'inpGds
    "*.gds"
    'browseInp
    )
    )


/***************************************************************
*                                                              *
*                      abSyncBrowser()                         *
*                                                              *
*                 Synchronise with the browser                 *
*                                                              *
***************************************************************/
procedure(abSyncBrowser()
    ddsSyncWithForm(
    abInputForm
    'sourceBrowse
    'sourceLibName
    'sourceCellNamefileName
    'sourceViewName
    )
    )


/***************************************************************
*                                                              *
*                        abImportGDS()                         *
*                                                              *
*                  Import the GDS into Library                 *
*                                                              *
***************************************************************/
procedure(abImportGDS()
    let((libName libPath techName tfId tfId1 tfId2 GDSName maskLib maskStrLib template)
        libName = abInputForm->inpLibName->value
        libPath = "./"
        techName = abInputForm->techFile->value
        template = "./xstreamInp.temp"
        GDSName = abInputForm->inpGds->value
        maskLib = abInputForm->maskLibName->value
        maskStrLib = abInputForm->maskStrLibName->value
        ddCreateLib(libName libPath)
            tfId = techOpenTechFile(libName techGetDefaultTechName() "w")
            tcLoadTechFile(tfId techName)
            techSaveTechFile(tfId)
            techCloseTechFile(tfId)
            
            xstInSetField("templateFile" template)
            xstInSetField("techFile" techName)
            xstInSetField("library" libName)
            xstInSetField("strmFile" GDSName)
            xstInSetField("logFile" libName.log)
            xstInSetField("summaryFile" libName.sum)
            xstInDoTranslate()
            
            

procedure(xstInOnCompletion(libName)
    printf ("The GDS has been translated")

)


            
        ddCreateLib(maskLib libPath)
            tfId1 = techOpenTechFile(maskLib techGetDefaultTechName() "w")
            tcLoadTechFile(tfId1 techName)
            techSaveTechFile(tfId1)
            techCloseTechFile(tfId1)
            
            
        ddCreateLib(maskStrLib libPath)
            tfId2 = techOpenTechFile(maskStrLib techGetDefaultTechName() "w")
            tcLoadTechFile(tfId2 techName)
            techSaveTechFile(tfId2)
            techCloseTechFile(tfId2)
            
            
            
        )
)









/***************************************************************
*                                                              *
*                        abInput()                             *
*                                                              *
*                       Main entry point                       *
*                                                              *
***************************************************************/

procedure(abInput()
    unless(boundp('abInputForm)
    abCreateForm()
    )
    
    hiDisplayForm(abInputForm)
   
    )


When I load this code and run it in CIW, I get a following message:

INFO (TECH-180006): Compiling class 'controls'....

INFO (TECH-180006): Compiling class 'layerDefinitions'....

*Error* ilGetString: arg must be symbol or string - nil

What am I doing wrong here or what needs to be added/corrected? I am new to SKILL and write few codes after referring to the SKILL guide.

  • Cancel
Parents
  • imecabhi
    imecabhi over 10 years ago

    Thanks Lawrence! I did figure out after going through some documentation and made following changes. :)

    procedure(abImportGDS()
        let((libName libPath techName tfId tfId1 tfId2 GDSName maskLib maskStrLib template ipcId logFile summaryFile)
            libName = abInputForm->inpLibName->value
            libPath = "./"
            techName = abInputForm->techFile->value
            template = "./xstreamInp.temp"
            GDSName = abInputForm->inpGds->value
            maskLib = abInputForm->maskLibName->value
            maskStrLib = abInputForm->maskStrLibName->value
            logFile = strcat(libName ".log")
            summaryFile = strcat(libName ".sum")
            when( ddCreateLib(libName libPath)
                tfId = techOpenTechFile(libName techGetDefaultTechName() "w")
                tcLoadTechFile(tfId techName)
                techSaveTechFile(tfId)
                techCloseTechFile(tfId)
                
                xstInSetField("templateFile" template)
                xstInSetField("techFile" techName)
                xstInSetField("library" libName)
                xstInSetField("strmFile" GDSName)
                xstInSetField("logFile" logFile)
                xstInSetField("summaryFile" summaryFile)
                xstInDoTranslate()
              

    Thanks for your help. I will come back if I face more issues.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • imecabhi
    imecabhi over 10 years ago

    Thanks Lawrence! I did figure out after going through some documentation and made following changes. :)

    procedure(abImportGDS()
        let((libName libPath techName tfId tfId1 tfId2 GDSName maskLib maskStrLib template ipcId logFile summaryFile)
            libName = abInputForm->inpLibName->value
            libPath = "./"
            techName = abInputForm->techFile->value
            template = "./xstreamInp.temp"
            GDSName = abInputForm->inpGds->value
            maskLib = abInputForm->maskLibName->value
            maskStrLib = abInputForm->maskStrLibName->value
            logFile = strcat(libName ".log")
            summaryFile = strcat(libName ".sum")
            when( ddCreateLib(libName libPath)
                tfId = techOpenTechFile(libName techGetDefaultTechName() "w")
                tcLoadTechFile(tfId techName)
                techSaveTechFile(tfId)
                techCloseTechFile(tfId)
                
                xstInSetField("templateFile" template)
                xstInSetField("techFile" techName)
                xstInSetField("library" libName)
                xstInSetField("strmFile" GDSName)
                xstInSetField("logFile" logFile)
                xstInSetField("summaryFile" summaryFile)
                xstInDoTranslate()
              

    Thanks for your help. I will come back if I face more issues.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information