• 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 Design
  3. Design migration tool

Stats

  • Locked Locked
  • Replies 21
  • Subscribers 125
  • Views 38574
  • 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

Design migration tool

Faizan UL HAQ
Faizan UL HAQ over 10 years ago

Hi,

I have a problem to transfer the simulation files from one design kit to another design kit in cadence virtuoso. The simulation files and circuit diagrams are quite many and it will take ages for me if i tranfer the files manually. Is there any kind of tool which can convert one design kit circuit diagrams into another design kit circuit diagrams.
BR

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    This also uses (optionally);

    /* abInvokeCdfCallbacks.il
    
    Author     A.D.Beckett
    Group      Structured Custom, Cadence Design Systems Ltd.
    Machine    SUN
    Date       Jul 11, 1995 
    Modified   Dec 23, 2013 
    By         A.D.Beckett
    
    Invoke all the CDF callbacks for instances
    
    The main entry point is (abInvokeCdfCallbacks cellView)
    which invokes all the CDF callbacks for every instance in
    a cellView. This has some keyword arguments which allow debug
    messages to be displayed, to invoke the formInitProc if needed,
    and to invoke using the instance CDF directly, rather than try
    to create something that looks more like the effective CDF that
    is found when the callbacks are normally invoked from the forms.
    
    You can use the variable abCallbackPatternsToIgnore so
    that some callbacks can be omitted.
    
    Extended in version 1.16 to allow ?filterFunc to be passed.
    This is a function that gets the cdf, the param name (nil
    for the initProc) and callback string.
    The function should return t if the callback should be called, 
    and nil otherwise. For example:
    
    procedure(MYfilterFunc(cdf paramName callback)
        destructuringBind(
            (lib @optional cell) abGetLibCellFromCDF(cdf)
            ; t if any other parameter than w for gpdk090/nmos1v
            !(lib=="gpdk090" && cell=="nmos1v" && param=="w")
        )
    )
    
    abInvokeCdfCallbacks(geGetEditCellView() ?filterFunc 'MYfilterFunc)
    
    ***************************************************
    
    SCCS Info: @(#) abInvokeCdfCallbacks.il 12/23/13.12:50:52 1.16
    
    */
    
    /***************************************************************
    *                                                              *
    *     The variable abCallbackPatternsToIgnore is set to be     *
    *      a list of patterns against which the callbacks are      *
    *      checked. If any of these patterns are matched then      *
    *                 the callback is not invoked.                 *
    *                                                              *
    ***************************************************************/
    
    (unless (boundp 'abCallbackPatternsToIgnore)
      (setq abCallbackPatternsToIgnore
            '("^MYPDKNot_Allowed.*")))
    
    /***************************************************************
    *                                                              *
    *   (abShouldCallbackBeExecuted callback filterFunc cdf param) *
    *                                                              *
    *  This checks the callback against all the patterns defined   *
    *     in the list abCallbackPatternsToIgnore to determine      *
    *       whether the callback should be executed or not.        *
    *    If filterFunc is passed, call with cdf, param name and    *
    *            callback - this should return t or nil            *
    *                                                              *
    ***************************************************************/
    
    (procedure (abShouldCallbackBeExecuted callback filterFunc cdf param)
      (and
        (forall pattern abCallbackPatternsToIgnore
                (null (rexMatchp pattern callback)))
        (if filterFunc
          (funcall filterFunc cdf param callback)
          t
          )
        )
      )
    
    /***************************************************************
    *                                                              *
    *                  (abGetLibCellFromCDF cdf)                   *
    *                                                              *
    *   Utility function to retrieve a list of lib and cell name   *
    *  from the CDF, regardless of whether it is an inst, cell or  *
    * lib CDF. For lib CDF it only returns a list of the lib name  *
    *                                                              *
    ***************************************************************/
    
    (procedure (abGetLibCellFromCDF cdf)
      (let (id)
        (setq id (getq cdf id))
        (case (type id)
          (dbobject
            (list (getq id libName) (getq id cellName))
            )
          (ddCellType
            (list (getq (getq id lib) name) (getq id name))
            )
          (ddLibType
            (list (getq id name))
            )
          )
        )
      )
    
    /*********************************************************************
    *                                                                    *
    *        (abCreateEffectiveCDFLookalike cdf [lookalikeParams]        *
    *                       [resetLookalikeParams])                      *
    *                                                                    *
    *     Create a structure which looks (sort of) like an effective     *
    *  CDF. The reason for creating this is to allow the "id" parameter  *
    *  to be correctly set to the cell, rather than the instance, which  *
    * is what happens if we use the cdfGetInstCDF() function to simulate *
    * cdfgData. The lookalikeParams optional parameter allows creation   *
    * of the parameters to be "lookalike" as well, so that callbacks can *
    * be called even if there is no actual instance. By default, the     *
    * parameters will be reset with using lookalikeParams, unless you    *
    *                   pass nil as the third argument.                  *
    *                                                                    *
    *********************************************************************/
    
    (procedure (abCreateEffectiveCDFLookalike cdf @optional lookalikeParams
                                              (resetLookalikeParams t))
      (let (new cdfFields newParam)
           (unless (getd 'make_abEffCDF)
                   ;---------------------------------------------------------
                   ; Because some slots appear twice in cdf->? have
                   ; to make the list unique
                   ;---------------------------------------------------------
                   (setq cdfFields (makeTable 'cdfFields))
                   (foreach field (getq cdf ?)
                            (setarray cdfFields  field t)
                            )
                   (eval `(defstruct abEffCDF ,@(getq cdfFields ?))))
           (setq new (make_abEffCDF))
           (when (and lookalikeParams (null (getd 'make_abEffCDFparam)))
             (setq cdfFields (makeTable 'cdfFields))
             (foreach field (getq (car (getq cdf parameters)) ?)
                      (setarray cdfFields field t))
             (eval `(defstruct abEffCDFparam ,@(getq cdfFields ?))))
           ;-----------------------------------------------------------------
           ; populate the effective cdf with the top level cdf attributes
           ;-----------------------------------------------------------------
           (foreach param (getq cdf ?)
                    (putprop new (get cdf param) param))
           ;-----------------------------------------------------------------
           ; Set the id and type attributes appropriately
           ;-----------------------------------------------------------------
           (when (equal (getq new type) "instData")
             (putpropq new (dbGetq (dbGetq (getq cdf id) master) cell) id)
             (putpropq new "cellData" type)
             )
           ;-----------------------------------------------------------------
           ; If we want the parameters to be lookalike too, create those
           ;-----------------------------------------------------------------
           (when lookalikeParams
             (putpropq new 
                       (foreach mapcar param (getq cdf parameters)
                                (setq newParam (make_abEffCDFparam))
                                (foreach slot (getq param ?)
                                         (putprop newParam (get param slot) slot))
                                (when resetLookalikeParams
                                  ; reset the value to defValue for safety
                                  (putpropq newParam (getq newParam defValue) value)
                                  )
                                newParam
                                )
                       parameters)
             ) ; when
           ;-----------------------------------------------------------------
           ; Add the parameters as properties in the effective cdf
           ;-----------------------------------------------------------------
           (foreach param (getq new parameters)
                    (putprop new param (getq param name))
                    )
           new
           )
      )
    
    /*******************************************************************
    *                                                                  *
    *        (abAddFormFieldsToEffectiveCDFLookalike cdf inst)         *
    *                                                                  *
    * Populate four extra fields - libraryName, cellName, viewName and *
    *  instanceName to emulate the forms on the forms - i.e. so that   *
    *  cdfgForm gets these slots. This is for callbacks which (badly)  *
    *   use cdfgForm to find out libraryName, cellName and viewName.   *
    *                                                                  *
    *******************************************************************/
    
    (procedure (abAddFormFieldsToEffectiveCDFLookalike cdf inst)
      (let (fieldData value)
        (unless (getd 'make_abEffCDFFormFields)
          (defstruct abEffCDFFormFields value defValue lastValue 
            editable enabled invisible)
          )
        (foreach (field attr) '(libraryName cellName viewName instanceName) 
                 '(libName cellName viewName name)
                 (setq value (dbGet inst attr))
                 (setq fieldData
                       (make_abEffCDFFormFields
                         ?value value
                         ?defValue value
                         ?lastValue value
                         ?editable t
                         ?enabled t
                         ?invisible nil
                         ))
                 (putprop cdf fieldData field)
                 )
        cdf
        )
      )
    
    /*******************************************************************
    *                                                                  *
    *       (abInvokeObjCdfCallbacks cdf @key (debug nil) order        *
    *       (callInitProc nil) (setCdfgForm t) (filterFunc nil))       *
    *                                                                  *
    *      Underlying function which does all the real work. This      *
    * is separated from the original function abInvokeInstCdfCallbacks *
    *    so that this can be called with a completely virtual CDF.     *
    *      See abInvokeInstCdfCallbacks for a description of the       *
    *  arguments - note that there is the ability to control whether   *
    *                     cdfgForm is set or not.                      *
    * Return nil if any callback failed with a SKILL error, t otherwise*
    *                                                                  *
    *******************************************************************/
    
    (procedure (abInvokeObjCdfCallbacks cdf @key (debug nil) order
                                         (callInitProc nil) (setCdfgForm t)
                                         filterFunc)
      ;----------------------------------------------------------------------
      ; Make cdfgData and cdfgForm dynamically scoped, to avoid
      ; interfering with any global usage of these variables
      ;----------------------------------------------------------------------
      (let (callback parameters cdfgData cdfgForm (success t))
           ;-----------------------------------------------------------------
           ; Set the cdfgData to be the instance CDF
           ;-----------------------------------------------------------------
           (setq cdfgData cdf)
           (setq cdfgForm nil)
           (when setCdfgForm 
             ;---------------------------------------------------------------
             ; some callbacks use cdfgForm instead
             ;---------------------------------------------------------------
             (setq cdfgForm cdfgData)
             )
           ;-----------------------------------------------------------------
           ; Call the formInitProc if there is one.
           ;-----------------------------------------------------------------
           (when callInitProc
                 (setq callback (getq cdfgData formInitProc))
                 (when (and callback 
                            (nequal callback "")
                            (abShouldCallbackBeExecuted callback filterFunc 
                                                        cdfgData nil))
                       (when debug
                             (printf "  Invoking formInitProc: '%s'\n" callback))
                       ;-----------------------------------------------------
                       ; Evaluate the callback
                       ;-----------------------------------------------------
                       (unless
                        (errset (evalstring 
                                 (strcat callback "(cdfgData)")) t)
                        (setq success nil)
                        )
                       )
                 )
           ;-----------------------------------------------------------------
           ; Control order of parameter evaluation. If order specified,
           ; just do those, otherwise do all in arbitrary order
           ;-----------------------------------------------------------------
           (if order
               (setq parameters (foreach mapcar param order
                                         (get cdfgData param)))
               (setq parameters (getq cdfgData parameters))
               )
           ;-----------------------------------------------------------------
           ; loop through all parameters
           ;-----------------------------------------------------------------
           (foreach param parameters
                    (setq callback (getq param callback))
                    (when (and callback 
                               (nequal callback "")
                               (abShouldCallbackBeExecuted callback filterFunc
                                                           cdfgData
                                                           (getq param name)))
                          (when debug
                                (printf "  Invoking callback for '%s': '%s'\n"
                                        (getq param name) callback))
                          ;--------------------------------------------------
                          ; evaluate the callback
                          ;--------------------------------------------------
                          (unless (errset (evalstring callback) t)
                           (setq success nil)
                           )
                          ))
      success))
    
    /*****************************************************************
    *                                                                *
    *       (abInvokeInstCdfCallbacks instance [?debug debug]        *
    *  [?order order] [?callInitProc callInitProc] [?useInstCDF nil] *
    *            [?addFormFields nil] [?filterFunc  nil]             *
    *                                                                *
    * Invoke all the parameter callbacks in the CDF for an instance. *
    *       This won't do anything if it doesn't have any CDF.       *
    * debug is a flag to turn on debug messages. order allows just   *
    * selected parameters to be called, in the specified order.      *
    * callInitProc allows the formInitProc to be called. useInstCDF  *
    * tells the formInitProc to be called with the instCDF rather    *
    * than the effective lookalike CDF. addFormFields tells it to    *
    * add the libraryName/cellName/viewName slots to emulate the     *
    * fields on the cdfgForm, which are used by some bad callback    *
    * code - note this is only done if useInstCDF is nil             *
    *                                                                *
    *****************************************************************/
    
    (procedure (abInvokeInstCdfCallbacks instance @key (debug nil) order
                                         (callInitProc nil) (useInstCDF nil)
                                         (addFormFields nil) (filterFunc nil))
      ;----------------------------------------------------------------------
      ; Make cdfgData and cdfgForm dynamically scoped, to avoid
      ; interfering with any global usage of these variables
      ;----------------------------------------------------------------------
      (let (cdf)
           (when debug
                 (printf " Invoking callbacks for instance '%s'\n"
                         (dbGetq instance name)))
           ;-----------------------------------------------------------------
           ; Set the cdf to be the instance CDF
           ;-----------------------------------------------------------------
           (setq cdf (cdfGetInstCDF instance))
           (unless useInstCDF
                   (setq cdf (abCreateEffectiveCDFLookalike cdf))
                   (when addFormFields
                     (abAddFormFieldsToEffectiveCDFLookalike cdf instance)
                     )
                   )
           ;-----------------------------------------------------------------
           ; Return value will be nil if any callbacks had errors
           ;-----------------------------------------------------------------
           (abInvokeObjCdfCallbacks
             cdf 
             ?debug debug ?order order ?callInitProc callInitProc
             ?setCdfgForm (null useInstCDF) ?filterFunc filterFunc
             )
      ))
    
    /***************************************************************
    *                                                              *
    *               (abConvertCdfToPcellParams cdf)                *
    *                                                              *
    * Take modified parameters in the CDF, and return this as the  *
    *      list of parameter names, types, and values that is      *
    *       needed to create a pcell with dbCreateParamInst.       *
    *                                                              *
    ***************************************************************/
    
    (procedure (abConvertCdfToPcellParams cdf)
      (foreach mapcar param
               (setof par (getq cdf parameters) 
                      (nequal (getq par value) (getq par defValue)))
               (list
                 (getq param name)
                 ; need to map this to pcell parameter types...
                 (case (getq param paramType)
                   (("int" "boolean" "float" "string") (getq param paramType))
                   (t "string")
                   )
                 (getq param value)
                 )
               )
      )
    
    /***************************************************************
    *                                                              *
    *        (abInvokeCdfCallbacks cellView @key (debug nil)       *
    *   (callInitProc nil) (useInstCDF nil) (addFormFields nil))   *
    *                         (filterFunc nil)                     *
    *                                                              *
    *  Invoke the CDF callbacks for all instances in the cellView. *
    *  Returns nil if any callback had a SKILL error, otherwise t  *
    *                                                              *
    ***************************************************************/
    
    (procedure (abInvokeCdfCallbacks cellView @key (debug nil) 
                                     (order nil)
                                     (callInitProc nil) (useInstCDF nil)
                                     (addFormFields nil) (filterFunc nil))
      (let ((success t))
           (when debug
                 (printf "Invoking callbacks for all instances in cell '%s'\n"
                         (dbGetq cellView cellName)))
           (foreach instance (dbGetq cellView instances)
                    (unless
                     (abInvokeInstCdfCallbacks instance 
                                               ?debug debug
                                               ?order order
                                               ?callInitProc callInitProc
                                               ?useInstCDF useInstCDF
                                               ?addFormFields addFormFields
                                               ?filterFunc filterFunc
                                               )
                     (setq success nil)
                     )
                    ) ; foreach
           success
           )
      ) ; procedure
    
    
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Nikhil Malwatkar
    Nikhil Malwatkar over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    We want to try modifying this script for Layout migration. Is it possible for you to share the config file for this code? We want to check how the config file is written.

    Regards,

    Nikhil Malwatkar

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Nikhil Malwatkar
    Nikhil Malwatkar over 5 years ago in reply to Andrew Beckett

    Hi Andrew,

    We want to try modifying this script for Layout migration. Is it possible for you to share the config file for this code? We want to check how the config file is written.

    Regards,

    Nikhil Malwatkar

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Nikhil Malwatkar

    I can't give the config for your case because I don't know what exactly you need to migrate. There's an example config in the comments at the top of the code, and there are numerous examples given in the other replies to this post. So there really ought to be enough examples to get you started.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Nikhil Malwatkar
    Nikhil Malwatkar over 5 years ago in reply to Andrew Beckett

    Thank you for your reply. We are trying to migrate a complete project from 1 technology to another technology. Both technologies are internal to my company. Thus the layouts to be migrated will have multiple level of hierarchies with standard logic cells/components etc. In such a case will the config file above (or others shared already) be helpful? 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Nikhil Malwatkar

    Given that I cannot possibly provide a configuration file for converting some unknown devices with unknown parameters in an unknown internal technology to unknown devices with unknown parameters in a second unknown technology, the samples given in the code and in the various appends are as good as anything else I could provide. In other words they are a starting point that you will have to write given that presumably the information is known to you.

    I'm a bit mystified as to how you think I can give you something more specific?

    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