• 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. create custom via and save it

Stats

  • Locked Locked
  • Replies 14
  • Subscribers 143
  • Views 21376
  • 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

create custom via and save it

primemath
primemath over 8 years ago

Hi,

I was going through the create via form and saw that there is an option to save custom via.
But I can make the change and save it to the library, but then each time I restart icfb, the change is lost and it reverts to the previous.
How do i save it for usage even after restarting the icfb ?

Regards,
Priyankar

  • Cancel
  • primemath
    primemath over 8 years ago
    Hi Andrew,

    Thanks for this valuable information.
    How can i perform this action "(you could always create your design library to reference the technology library rather than attaching it, and then you would be able to save into your own technology library - this is the ITDB mechanism)", i can save it in technology library but after i do file->closedata it gets removed.
    The custom via which i placed gets replaced by default via.
    Can you pls share that SKILL code so that i can use it ?
    And also if you can explain more on how i can use it by attaching to technology lib ?

    Regards,
    Priyankar
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Hi Priyankar,

    OK, there are several things to answer here.

    First of all, you didn't mention that the File->Close Data failure was related to when you saved to the technology  library. If you save to the technology library then it updates the technology library (or rather technology file) in memory (as it does if you save to the design). In order for that to be preserved, you need to save the technology file; if you don't have write permission on the technology library you won't be able to do that and the viaVariant will only be valid for that session (and hence gets purged when you close data).

    My suggestion to use ITDB (Incremental Technology Database) was a way of allowing you to have your own writable technology library. When you create a library, you can choose to either have no technology information, to attach a technology library, or to reference a technology library. The attach mechanism is the one that has existed since the 4.4 release (9504) and is probably the most commonly used; in this case all the technology information comes from the technology library you're referencing, and commonly that library would be readonly because it is shared by multiple people. If instead you reference a technology library, it actually creates a local technology database in the newly created library which contains a reference to the other technology library. It means that you can extend the technology data in your own library to augment the central one - any changes you make get stored in this local technology library. This local technology library could be your design library, or it could be a project-level technology library that everyone "attaches" to (if you attach your design libraries to this, it will pick up the combination of the original technology data plus the extensions in this local technology library, without needing each and every design library to be a technology library). You need to think carefully about what your strategy for your design and project should be so that all designers work in a consistent way before adopting this methodology, I'd say. In fact these incremental technology databases are actually a graph - you can have multiple levels of reference (there are UIs to display the graph in the Tools->Technology File Manager). 

    If you have this local technology  library, then you would have the ability to save your via variants into it as presumably you'd have write permission in this case.

    Now, for the SKILL code I originally said it wasn't necessarily in a fit state to share. However, I've reviewed my colleague's code and cleaned it up (very slightly) as I realised that much of the code was actually borrowed from another bit of code I'd written some time ago. This SKILL code is for the situation where you have viaVariants saved in one design and want to copy them to another. Simply load this code using:

    load("CCScopyViaVariants.il") 

    and then call:

    CCShiCopyViaVariants()

    to bring up a form to do the copying. This can then be a stop-gap until the CCR I mentioned earlier gets implemented so that the VLS XL "Load Physical View" performs this task.

    Regards,

    Andrew.

    /* CCScopyViaVariants.il
    
    Language   SKILL
    Date       Jan 9, 2013 (small mods Jan 4, 2017)
    Lint Score 100
    
    Code to copy design-specific variants from one
    cellView to another. 
    
    Two public functions:
    
    CCScopyViaVariants()
      Copies design via variants from one cellView ID to another.
    
    CCShiCopyViaVariants()
      Does the copy with a user interface for the user
      to select the cellviews
    
    **************************************************
    
    SCCS Info: @(#) CCScopyViaVariants.il 01/04/17.21:21:20 1.1
    
    */
    
    /*******************************************************************************
    *  DISCLAIMER: The following code is provided for Cadence customers to use at  *
    *   their own risk. The code may require modification to satisfy the           *
    *   requirements of any user. The code and any modifications to the code may   *
    *   not be compatible with current or future versions of Cadence products.     *
    *   THE CODE IS PROVIDED "AS IS" AND WITH NO WARRANTIES, INCLUDING WITHOUT     *
    *   LIMITATION ANY EXPRESS WARRANTIES OR IMPLIED WARRANTIES OF MERCHANTABILITY *
    *   OR FITNESS FOR A PARTICULAR USE.                                           *
    *******************************************************************************/
    
    /***************************************************************
    *                                                              *
    *         (CCScopyViaVariants srcCv dstCv [overwrite])         *
    *                                                              *
    * Copy constraint groups from source cellView to a destination *
    *  cellView. Default is to not overwrite, but if t is passed   *
    *  as the third argument, existing constraint groups with the  *
    *                same name will get recreated.                 *
    *                                                              *
    ***************************************************************/
    
    defun(CCScopyViaVariants (srcCv dstCv @optional overwrite)
      let( (srcViaVars dstViaVars dstViaVar srcParams)
        srcViaVars=srcCv~>viaVariants
        foreach(srcViaVar srcViaVars
          dstViaVars=dstCv~>viaVariants
          ;------------------------------------------------------------------
          ; When overwriting, check if the via variant
          ; already exists, and delete it
          ;------------------------------------------------------------------
          when(overwrite               
            dstViaVar=car(exists(dstVV dstViaVars 
              equal(dstVV~>name srcViaVar~>name)))
            when(dstViaVar
              dbDeleteObject(dstViaVar)
            )
          )
          ;------------------------------------------------------------------
          ; Add the new via variant if it does not already exist
          ;------------------------------------------------------------------
          if(member(srcViaVar~>name dstViaVars~>name) then
            warn("Via Variant %s could not be created - already exists in destination CV?" srcViaVar~>name)
          else
            ;--------------------------------------------------------------
            ; Create a stdVia variant in the dstCv. Construct arguments
            ; from source via variant params
            ;--------------------------------------------------------------
            srcParams=srcViaVar~>params
            apply('dbCreateStdViaVariant
              dstCv
              srcViaVar~>name    
              srcViaVar~>viaDefName
              list(nth(0 srcParams) nth(1 srcParams) nth(2 srcParams))
              list(nth(3 srcParams) nth(4 srcParams) nth(5 srcParams))
              nthcdr(6 srcParams)
            )
            printf("Copied: %s \n" srcViaVar~>name)               
          ) ;if
        ) ;foreach
      t
      )
    )
    
    /***************************************************************
    *                                                              *
    *             (CCShiCopyViaVariantsCreateForm)                 *
    *                                                              *
    *      Create the form for the HI version of the utility       *
    *                                                              *
    ***************************************************************/
    
    (defun CCShiCopyViaVariantsCreateForm ()
      (let (field fieldList attachList (prompt 80) y)
        ;--------------------------------------------------------------------
        ; Loop over the source and destination columns on the form
        ;--------------------------------------------------------------------
        (foreach (srcdst srcdstName x) '(src dst) '("From" "To") '(0 300)
                 (setq y 0)
                 ;-----------------------------------------------------------
                 ; Create the frame for the source/dst
                 ;-----------------------------------------------------------
                 (setq field (hiCreateFrameField
                               ?name concat(srcdst 'Fram)
                               ?labelText srcdstName))
                 (setq fieldList (cons (list field x:y 290:160 30) 
                                       fieldList))
                 (setq y (plus y 20))
                 (setq attachList (cons
                                    (if (eq srcdst 'src) 
                                      hicLeftPositionSet|hicRightPercentSet 
                                      hicLeftPercentSet|hicRightPositionSet)
                                    attachList))
                 ;-----------------------------------------------------------
                 ; Create each of the lib cell view fields
                 ;-----------------------------------------------------------
                 (foreach (lcv lcvName) 
                          '(Lib Cell View) '("Library" "Cell" "View")
                          (setq field (hiCreateStringField
                                        ?name concat(srcdst lcv)
                                        ?prompt lcvName
                                        ?callback "ddsUpdateSyncWithForm()"
                                        ))
                          (setq fieldList (cons (list field (plus x 5):y 280:30
                          prompt) 
                                                fieldList))
                          (setq attachList (cons
                                             (if (eq srcdst 'src) 
                                               hicLeftPositionSet|hicRightPercentSet 
                                               hicLeftPercentSet|hicRightPositionSet)
                                             attachList))
                          (setq y (plus y 30))
                          )
                 ;-----------------------------------------------------------
                 ; Create the browse button for source or dest
                 ;-----------------------------------------------------------
                 (setq field (hiCreateButton
                               ?name concat(srcdst 'Browse)
                               ?buttonText "Browse"
                               ?callback (sprintf nil
                               "CCScopyViaVariantsSyncWithForm('%s)" srcdst)
                               ))
                 (setq fieldList (cons (list field (plus x 5):y 100:30) 
                                       fieldList))
                 (setq attachList (cons
                                    (if (eq srcdst 'src) 
                                      hicLeftPositionSet
                                      hicLeftPercentSet)
                                    attachList))
                 )
        ;--------------------------------------------------------------------
        ; And finally the overwrite button
        ;--------------------------------------------------------------------
        (setq field (hiCreateBooleanButton
                     ?name 'overwrite
                     ?buttonText "Overwrite viaVariant with same name"
                     ))
        (setq fieldList (cons (list field 5:(plus y 50) 400:30 250) 
                              fieldList))
        (setq attachList (cons hicLeftPositionSet attachList))
        ;--------------------------------------------------------------------
        ; Now glue everything together into a form
        ;--------------------------------------------------------------------
        (hiCreateAppForm
          ?name 'CCScopyViaVariantsForm
          ?formTitle "Copy Via Variants"
          ?fields fieldList
          ?attachmentList attachList
          ?initialSize 600:190
          ?callback list('CCShiCopyViaVariantsCB "ddsEndSyncWithForm()")
          )
        )
      )
    
    /****************************************************************
    *                                                               *
    *         (CCScopyViaVariantsSyncWithForm srcdst)               *
    *                                                               *
    * Callback for the browse buttons on the form to sync with the  *
    *                        library browser.                       *
    *                                                               *
    ****************************************************************/
    
    (defun CCScopyViaVariantsSyncWithForm (srcdst)
      (ddsSyncWithForm
        CCScopyViaVariantsForm
        'browse
        concat(srcdst 'Lib)
        concat(srcdst 'Cell)
        concat(srcdst 'View)
        )
      )
    
    /*******************************************************************
    *                                                                  *
    *                  (CCShiCopyViaVariantsCB form)                   *
    *                                                                  *
    *      Callback for the form. Gets the src and dst cellViews,      *
    *   does some sanity checks, and then calls (CCScopyViaVariants)   *
    *                                                                  *
    *******************************************************************/
    
    (defun CCShiCopyViaVariantsCB (form)
      (let (src dst)
        (setq src (dbOpenCellViewByType 
                    (getq (getq form srcLib) value)
                    (getq (getq form srcCell) value)
                    (getq (getq form srcView) value)
                    ))
        (setq dst (dbOpenCellViewByType 
                    (getq (getq form dstLib) value)
                    (getq (getq form dstCell) value)
                    (getq (getq form dstView) value)
                    "maskLayout"
                    "a"
                    ))
        (cond
          ((null src) (error "Source cellView %s/%s/%s could not be opened"
                             (getq (getq form srcLib) value)
                             (getq (getq form srcCell) value)
                             (getq (getq form srcView) value)))
          ((null dst) (error "Destination cellView %s/%s/%s could not be opened"
                             (getq (getq form dstLib) value)
                             (getq (getq form dstCell) value)
                             (getq (getq form dstView) value)))
          ((equal src dst)
           (error "Source and Destination cellViews are the same"))
          )
        (ddsEndSyncWithForm)
        (CCScopyViaVariants src dst (getq (getq form overwrite) value))
        ; Save the target cellview and close both 
        dbClose(src)
        dbSave(dst)
        dbClose(dst)
        )
      )
    
    /***************************************************************
    *                                                              *
    *                  (CCShiCopyViaVariants)                      *
    *                                                              *
    *       HI version of CCScopyViaVariants. Builds the form      *
    *                  if needed, and displays it.                 *
    *                                                              *
    ***************************************************************/
    
    (defun CCShiCopyViaVariants ()
      (let (cv)
        (unless (boundp 'CCScopyViaVariantsForm)
          (CCShiCopyViaVariantsCreateForm)
          )
        (setq cv (geGetEditCellView))
        ;--------------------------------------------------------------------
        ; Note, this doesn't currently swallow the warnings from
        ; geGetEditCellView - working to get this resolved
        ;--------------------------------------------------------------------
        (getWarn)
        (when cv
          (putpropq (getq CCScopyViaVariantsForm dstLib)
                    (dbGetq cv libName) value)
          (putpropq (getq CCScopyViaVariantsForm dstCell)
                    (dbGetq cv cellName) value)
          (putpropq (getq CCScopyViaVariantsForm dstView)
                    (dbGetq cv viewName) value)
          )
        (hiDisplayForm CCScopyViaVariantsForm)
        )
      )
    

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • primemath
    primemath over 8 years ago
    Thanks Andrew for detailed information and the SKILL Code.
    Is there a way that i can save the via variant and use it across all the design libraries in my cds.lib ?
    because by the SKILL code which you have sent i have to manually copy it for each design i want to use.
    Is there way that it can be automatically saved for all the libs in defined in my cds.lib ?

    Regards,
    Priyankar
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Priyankar,

    The only way you can do this is to save the via variant into a technology library (e.g. an incremental technology library) that you have write access to, and which all the design libraries are either referencing or attached to.

    Saving it into a design only saves it in that design (it's part of the cellView) and so that cannot be accessed by other designs unless you copy them into that design.

    So the answer to your question is probably "no" (unless you can sort out all the design libraries sharing a technology library to which you have write access).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
<

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