• 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. Connectivity lost while changing technology.

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 145
  • Views 17598
  • 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

Connectivity lost while changing technology.

Atul Dwivedi
Atul Dwivedi over 12 years ago

Hi there,

As the subject suggests I am trying to migrate a design from one technology to another. The method adopted is by changing the master:

selectedObject=car(geGetSelSet())

masterID=dbOpenCellViewByType("newTechLibName" "newTechCellName" "symbol" "schematicSymbol") 

selectedObject~>master=masterID

This indeed changes the master and I can see the MOS of new technology appearing, but the wires connecting them are not connected now (it seems as if because of change in symbol).

A slight adjustment does the job at graphical schematic level. Is there any way to change the master and preserve the connectivity also (the w's and l's value remains same, fortunately!)

Thanks and Regards,

Atul 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Hi Atul,

    Are the pins in the same location? Maybe some pictures would help explain the problem.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Atul Dwivedi
    Atul Dwivedi over 12 years ago

    Hello Andrew,

    No, the pins are always located differently in space as it appears in the schematic, across technologies. Is there a work-around possible?

    The attached pic shows that difference b/w analogLib nmos4 and one of our tech NMOS.

    Thanks and Regards,

    Atul 

    • upload_mismatched_pins.jpg
    • View
    • Hide
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Hi Atul,

    This SKILL code may help you (please ensure the file has a .ils suffix, since it uses SKILL++ semantics). See the comments at the top for some guidelines as how to use it.

    Regards,

    Andrew.

     

    /* abMapAndWire.ils
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       May 20, 2004 
    Modified   
    By         
    
    Map instances from one library to another, with wiring
    because the symbols are a different size.
    
    Two main entry functions:
    
    (abMapAndWireLoadConfig "config.file")
    (abMapAndWire cellView)
    
    The config file is in this format (it can have comments
    too, using normal SKILL conventions):
    
    (
      nil
      xSnapSpacing 0.0625   ; defaults to 0.0625
      ySnapSpacing 0.0625   ; defaults to 0.0625
      fontHeight 0.0625     ; defaults to xSnapSpacing
      addWireLabels t       ; if it should add labels for wire stubs left by
                            ; inherited connections
      map
      (
       (nil
        ; lib/cell/view to be converted, from and to.
        ; all to setting default to the from settings, and the
        ; fromView defaults to "symbol".
        fromLib "gpdk"
        fromCell "nmosa1"
        fromView "symbol"
        toLib "gpdk"
        toCell "nmosa2"
        toView "symbol"
        ; if any pin names need mapping, do that here. Otherwise
        ; can omit
        pinMap (("G" "g") ("D" "d"))
        ; Which pins should not be wired, but should replace with a
        ; netSet on the instance
        pinToNetSet (("B" "nbulk"))
        ; which pin should be considered the origin - in other words,
        ; stay where it is. It does not have to be the origin of the symbol
        pinOrigin "G"
        ; this is the orientation you need to give to the new symbol 
        ; to rotate it to the same orientation as the old symbol
        orient "R90"
        )
       ; and now for another mapping...
       (nil
        fromLib "gpdk"
        fromCell "pmosa1"
        fromView "symbol"
        toLib "gpdk"
        toCell "pmosa2"
        toView "symbol"
        pinOrigin "G"
        orient "R90"
        )
       )
      )
    
    ***************************************************
    
    SCCS Info: @(#) abMapAndWire.ils 05/27/04.16:01:39 1.4
    
    */
    
    ;------------------------------------------------------------------------
    ; The two functions which will be public later in the lexical
    ; scope
    ;------------------------------------------------------------------------
    (define abMapAndWireLoadConfig nil)
    (define abMapAndWire nil)
    
    (let (mapData xSnapSpacing ySnapSpacing wireCatch addWireLabels fontHeight)
    
    /***************************************************************
    *                                                              *
    *                  (getPinPositions cellView)                  *
    *                                                              *
    *   Private function to Get the positions of the centres of    *
    *  each pin on the symbol, and return a table with these in.   *
    *                                                              *
    ***************************************************************/
    
      (defun getPinPositions (cellView)
             (let (positionArray pin)
                  (setq positionArray (makeTable "pinPositions" nil))
                  (foreach terminal (getq cellView terminals)
                           ;-------------------------------------------------
                           ; Only looking at the location of the first pin
                           ; for each terminal - in practice there will be only
                           ; one anyway
                           ;-------------------------------------------------
                           (setq pin (car (getq terminal pins)))
                           (when pin
                                 (setarray positionArray (getq terminal name)
                                           (centerBox
                                            (getq (getq pin fig) bBox)
                                            )
                                           )
                                 )
                           )
                  positionArray
                  )
             ) ; defun getPinPositions
    
    /******************************************************************
    *                                                                 *
    *                       (getMapDetails dpl)                       *
    *                                                                 *
    *  Private function to figure out all the information about the   *
    * master (both from and to), as well as the transformation needed *
    *          to map from the old symbol to the new symbol.          *
    *                     Returns the fromMaster.                     *
    *                                                                 *
    ******************************************************************/
    
      (defun getMapDetails (dpl)
             (let (fromMaster toMaster toPin fromPin fromPos toPos badMaps)
                  (setq fromMaster
                        (dbOpenCellViewByType
                         (getq dpl fromLib)
                         (getq dpl fromCell)
                         (or (getq dpl fromView) "symbol")
                         ))
                  (getWarn)
                  (if fromMaster
                      (progn
                       (setq toMaster
                             (dbOpenCellViewByType
                              (or (getq dpl toLib) (getq dpl fromLib))
                              (or (getq dpl toCell) (getq dpl fromCell))
                              (or (getq dpl toView) (getq dpl fromView) "symbol")
                              ))
                       (getWarn)
                       (unless toMaster
                               (printf "NOTE: map from %s/%s/%s to %s/%s/%s skipped due to missing destination cellView\n"
                                       (getq dpl fromLib) 
                                       (getq dpl fromCell)
                                       (getq dpl fromView)
                                       (getq dpl toLib) 
                                       (getq dpl toCell)
                                       (getq dpl toView)
                                       )
                               (setq fromMaster nil)
                               )
                       )
                      ;------------------------------------------------------
                      ; Else fromMaster doesn't exist
                      ;------------------------------------------------------
                      (printf "NOTE: map from %s/%s/%s to %s/%s/%s skipped due to missing source cellView\n"
                              (getq dpl fromLib) 
                              (getq dpl fromCell)
                              (getq dpl fromView)
                              (getq dpl toLib) 
                              (getq dpl toCell)
                              (getq dpl toView)
                              )
                      )
                  ;----------------------------------------------------------
                  ; Only do the rest if we're going to keep this mapping
                  ;----------------------------------------------------------
                  (when
                   fromMaster
                   (putpropq dpl fromMaster fromMaster)
                   (putpropq dpl toMaster toMaster)
                   (putpropq dpl (getPinPositions fromMaster) fromPinPositions)
                   (putpropq dpl (getPinPositions toMaster) toPinPositions)
                   ;----------------------------------------------------------
                   ; Check all the pin mappings are OK
                   ;----------------------------------------------------------
                   (setq badMaps
                         (setof pinMap (getq dpl pinMap)
                                (and
                                 (arrayref (getq dpl fromPinPositions) (car pinMap))
                                 (null (arrayref (getq dpl toPinPositions) (cadr pinMap)))
                                 )))
                   (when badMaps
                         (error "The pinMap contains invalid pins %L for %s/%s/%s\n"
                                (mapcar 'cadr badMaps)
                                (getq toMaster libName)
                                (getq toMaster cellName)
                                (getq toMaster viewName)
                                ))
                   (setq toPin (getMappedPin dpl (getq dpl pinOrigin)))
                   ;----------------------------------------------------------
                   ; Figure out the transform needed to map from one to
                   ; another
                   ;----------------------------------------------------------
                   (setq fromPin (getq dpl pinOrigin))
                   (setq toPos (arrayref (getq dpl toPinPositions) toPin))
                   (setq fromPos (arrayref (getq dpl fromPinPositions) fromPin))
                   (unless toPos 
                           (error "Could not find mapped pin %s on %s/%s/%s\n"
                                  toPin
                                  (getq toMaster libName)
                                  (getq toMaster cellName)
                                  (getq toMaster viewName)
                                  ))
                   (unless fromPos 
                           (error "Could not find pin %s on %s/%s/%s\n"
                                  fromPin
                                  (getq fromMaster libName)
                                  (getq fromMaster cellName)
                                  (getq fromMaster viewName)
                                  ))
                   (putpropq dpl 
                             (dbConcatTransform
                              (dbConcatTransform
                               (list 
                                (mapcar minus toPos)
                                "R0"
                                )
                               (list
                                (list 0 0)
                                (getq dpl orient)
                                )
                               )
                              (list
                               fromPos
                               "R0"
                               )
                              )
                             transform
                             )
                   ) ; when
                  fromMaster
                  )
             ) ; defun getMapDetails
    
    /***************************************************************
    *                                                              *
    *                    (checkMapDetails dpl)                     *
    *                                                              *
    *  Private function for checking that the minimum information  *
    *              has been provided for a map entry.              *
    *                                                              *
    ***************************************************************/
    
      (defun checkMapDetails (dpl)
             (unless
              (and
               (getq dpl fromLib)
               (getq dpl fromCell)
               (getq dpl fromView)
               (getq dpl pinOrigin)
               )
              (error "Minimum of fromLib, fromCell, fromView, pinOrigin must be specified in config file\n")
              )
             ) ; defun checkMapDetails
    
    /*******************************************************************
    *                                                                  *
    *                     (loadConfig configFile)                      *
    *                                                                  *
    * Public function (exported as abMapAndWireLoadConfig) to load the *
    * config file for the mapping, and set up all the data structures  *
    *                 needed for doing the conversion.                 *
    *                                                                  *
    *******************************************************************/
    
      (defun loadConfig (configFile)
             (let (prt data fromMaster)
                  (setq prt (infile configFile))
                  (unless prt (error "Could not open config file %s\n" configFile))
                  ;----------------------------------------------------------
                  ; skip over blank lines/comments
                  ;----------------------------------------------------------
                  (while (equal (setq data (lineread prt)) t) t)
                  (setq data (car data))
                  (close prt)
                  ;----------------------------------------------------------
                  ; Take out the top level options from the config
                  ;----------------------------------------------------------
                  (setq xSnapSpacing (or (getq data xSnapSpacing) 0.0625))
                  (setq ySnapSpacing (or (getq data ySnapSpacing) 0.0625))
                  (setq wireCatch (list (times xSnapSpacing 0.5) (times ySnapSpacing 0.5)))
                  (setq addWireLabels (getq data addWireLabels))
                  (setq fontHeight (or (getq data fontHeight)
                                       (getq data xSnapSpacing)
                                       0.0625))
                  ;----------------------------------------------------------
                  ; Now create the config table
                  ;----------------------------------------------------------
                  (setq mapData (makeTable "mapData" nil))
                  (foreach dpl (getq data map)
                           (checkMapDetails dpl)
                           (setq fromMaster (getMapDetails dpl))
                           (when fromMaster
                                 (setarray mapData fromMaster dpl)
                                 )
                           )
                  mapData
                  )
             ) ; defun loadConfig
    
    /******************************************************************
    *                                                                 *
    *                   (getMappedPin dpl pinName)                    *
    *                                                                 *
    *    Private function for getting the pin name in the toMaster    *
    * if it has been mapped (or the original name if it is unmapped). *
    *                                                                 *
    ******************************************************************/
    
      (defun getMappedPin (dpl pinName)
             (or (cadr (assoc pinName (getq dpl pinMap))) pinName)
             )
    
    /***************************************************************
    *                                                              *
    *                     (isNetLabelled net)                      *
    *                                                              *
    * Private function to guess whether a label is needed. If the  *
    * net has a terminal (then there is a pin, and so it is going  *
    *  to be autonamed), or if there is a label attached. Doesn't  *
    *                   spot supply/ground taps.                   *
    *                                                              *
    ***************************************************************/
    
      (defun isNetLabelled (net)
             (or
              (getq net term)
              (exists fig (getq net figs) (equal (getq fig objType) "label"))
              )
             )
    
    /*******************************************************************
    *                                                                  *
    *                      (replaceInstance inst)                      *
    *                                                                  *
    *   Private function to replace an individual instance, and then   *
    * do the wiring up to the old locations, or add netSet expressions *
    *                            if needed.                            *
    *                                                                  *
    *******************************************************************/
    
      (defun replaceInstance (inst)
             (let (dpl cellView newTransform oldTransform fromPinPositions toPinPositions
                       fromPos toPos termsToNets wire wireBox netSet netName)
                  (setq dpl (arrayref mapData (getq inst master)))
                  (when dpl
                        (setq cellView (getq inst cellView))
                        ;----------------------------------------------------
                        ; Record all the instTerm information - need it
                        ; later for the netSet handling
                        ;----------------------------------------------------
                        (setq termsToNets
                              (foreach mapcar instTerm (getq inst instTerms)
                                       (list (getq instTerm name) 
                                             (getq (getq instTerm net) name))))
                        ;----------------------------------------------------
                        ; Work out the transformation, and replace the instance
                        ;----------------------------------------------------
                        (setq oldTransform (getq inst transform))
                        (setq newTransform (dbConcatTransform (getq dpl transform)
                                                              oldTransform))
                        (putpropq inst (getq dpl toMaster) master)
                        (putpropq inst (car newTransform) xy)
                        (putpropq inst (cadr newTransform) orient)
                        ;----------------------------------------------------
                        ; Now do the routing
                        ;----------------------------------------------------
                        (setq fromPinPositions (getq dpl fromPinPositions))
                        (setq toPinPositions (getq dpl toPinPositions))
                        (foreach pin fromPinPositions
                                 (cond
                                  ;------------------------------------------
                                  ; If it is one of the pins to be handled with
                                  ; a netSet, do that
                                  ;------------------------------------------
                                  ((setq netSet (assoc pin (getq dpl pinToNetSet)))
                                   (setq netName (cadr (assoc pin termsToNets)))
                                   (dbCreateProp inst (cadr netSet) "netSet" netName)
                                   ;-----------------------------------------
                                   ; Check to see if we're supposed to be adding 
                                   ; labels, and there doesn't already seem to be one
                                   ;-----------------------------------------
                                   (when 
                                    (and 
                                     addWireLabels
                                     (null
                                      (isNetLabelled 
                                       (dbFindNetByName cellView netName))
                                      )
                                     )
                                    ;----------------------------------------
                                    ; Find the wire end where the pin used to be.
                                    ;----------------------------------------
                                    (setq fromPos (arrayref fromPinPositions pin))
                                    (setq fromPos
                                          (geTransformUserPoint 
                                           fromPos oldTransform))
                                    (setq wireBox
                                          (list
                                           (mapcar difference fromPos wireCatch)
                                           (mapcar plus fromPos wireCatch)
                                           ))
                                    (setq wire 
                                          (car
                                           (dbGetOverlaps
                                            cellView wireBox '("wire" "drawing") 0)))
                                    ;----------------------------------------
                                    ; Now add a wire label, just to be safe.
                                    ;----------------------------------------
                                    (schCreateWireLabel
                                     cellView
                                     wire
                                     fromPos
                                     netName
                                     "lowerLeft"
                                     "R0"
                                     "stick"
                                     fontHeight
                                     nil
                                     )
                                    )
                                   ) ; end of arm for netSet
                                  ;------------------------------------------
                                  ; Otherwise if it is not the pin marked as the 
                                  ; origin, wire it up.
                                  ;------------------------------------------
                                  ((nequal pin (getq dpl pinOrigin))
                                   (setq fromPos (arrayref fromPinPositions pin))
                                   (setq toPos 
                                         (arrayref toPinPositions 
                                                   (getMappedPin dpl pin)))
                                   (when
                                    (and fromPos toPos)
                                    (setq fromPos
                                          (geTransformUserPoint 
                                           fromPos oldTransform))
                                    (setq toPos
                                          (geTransformUserPoint
                                           toPos newTransform))
                                    (schCreateWire
                                     cellView
                                     "route"
                                     "full"
                                     (list fromPos toPos)
                                     xSnapSpacing
                                     ySnapSpacing
                                     0.0
                                     )
                                    ) ; when
                                   ) ; end of arm for pin wiring
                                  ) ; cond
                                 ) ; foreach
                        t
                        ) ; when
                  ) ; let
             ) ; defun replaceInstance
    
    /***************************************************************
    *                                                              *
    *                (replaceInstances [cellView])                 *
    *                                                              *
    *   Public function (exported as (abMapAndWire) ) to do the    *
    *        mapping and wiring for the cellView passed in.        *
    *                                                              *
    ***************************************************************/
    
      (defun replaceInstances (@optional (cellView (geGetEditCellView)))
             (foreach instance (getq cellView instances)
                      (replaceInstance instance)
                      )
             t
             ) ; defun replaceInstances
    
      (setq abMapAndWireLoadConfig loadConfig)
      (setq abMapAndWire replaceInstances)
      ) ; end of lexical scope

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Atul Dwivedi
    Atul Dwivedi over 12 years ago

    Hi Andrew,

    Thanks a lot for this huge code!

    However, I did follow the instructions but the script did not change anything.

    (abMapAndWireLoadConfig "~/skillScripts/load.config")

    table:mapData 

    cv=geGetEditCellView()

    db:0x73f98a12

    cv~>cellName

    "trial_analogLib" 

    (abMapAndWire cv)

    t 

    Here is the trace:

    (abMapAndWire cv)

    |_aaBeforeProc((abMapAndWire(cv)))

    |_aaBeforeProc --> (abMapAndWire(cv))

    |abMapAndWire(db:0x73f98a12)

    |||||table:mapData[db:0x73f98292]

    |||||arrayref --> nil

    |||||table:mapData[db:0x73f98292]

    |||||arrayref --> nil

    |||||table:mapData[db:0x73f98292]

    |||||arrayref --> nil

    |||||table:mapData[db:0x73f98292]

    |||||arrayref --> nil

    |||||table:mapData[db:0x73f9cc12]

    |||||arrayref --> nil

    |||||table:mapData[db:0x73f9cc12]

    |||||arrayref --> nil

    |||||table:mapData[db:0x73f9cc92]

    |||||arrayref --> nil

    |||||table:mapData[db:0x73f9cc92]

    |||||arrayref --> nil

    |||||table:mapData[db:0x73f9cc92]

    |||||arrayref --> nil

    |||||table:mapData[db:0x73f99012]

    |||||arrayref --> nil

    |||||table:mapData[db:0x73f99412]

    |||||arrayref --> nil

    |abMapAndWire --> t

    t

    What am I doing wrong?

    Regards,

    Atul 

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Hi Atul,

    What does your load.config look like?

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Atul Dwivedi
    Atul Dwivedi over 12 years ago

    Hi Andrew,

    The config file has the following contents:

    (

      nil

      xSnapSpacing 0.0625   ; defaults to 0.0625

      ySnapSpacing 0.0625   ; defaults to 0.0625

      fontHeight 0.0625     ; defaults to xSnapSpacing

      addWireLabels t       ; if it should add labels for wire stubs left by

                            ; 

                            ons

      map

      (

       ;(nil

       ; ; lib/cell/view to be converted, from and to.

       ; ; all to setting default to the from settings, and the

       ; ; fromView defaults to "symbol".

       ; fromLib "cmos32lp"

       ; fromCell "egnfet_b"

       ; fromView "symbol"

       ; toLib "cmos090"

       ; toCell "nsvt33"

       ; toView "symbol"

       ; ; if any pin names need mapping, do that here. Otherwise

       ; ; can omit

       ; ;pinMap (("G" "g") ("D" "d"))

       ; ; Which pins should not be wired, but should replace with a

       ; ; netSet on the instance

       ; ;pinToNetSet (("B" "nbulk"))

       ; ; which pin should be considered the origin - in other words,

       ; ; stay where it is. It does not have to be the origin of the symbol

       ; pinOrigin "D"

       ; ; this is the orientation you need to give to the new symbol 

       ; ; to rotate it to the same orientation as the old symbol

       ; ;orient "R90"

       ; )

       ; and now for another mapping...

       ;(nil

       ; fromLib "cmos32lp"

       ; fromCell "egpfet_b"

       ; fromView "symbol"

       ; toLib "cmos090"

       ; toCell "psvt33"

       ; toView "symbol"

       ; ;pinOrigin "G"

       ; ;orient "R90"

       ; )

       (nil

        fromLib "analogLib"

        fromCell "pmos4"

        fromView "symbol"

        toLib "cmos090"

        toCell "psvt33"

        toView "symbol"

        ;pinOrigin "G"

        ;orient "R90"

        )

       (nil

        fromLib "analogLib"

        fromCell "nmos4"

        fromView "symbol"

        toLib "cmos090"

        toCell "nsvt33"

        toView "symbol"

        ;pinOrigin "G"

        ;orient "R90"

        )

       )

      ) 

     

    Regards,

    Atul 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Hi Atul,

    At the top you have:

     

                            ; 

                            ons

    The "ons" bit on a line on its own is causing it to disregard the map below - because it sees the word "map" as the value for the "ons" property.

    If I delete the word "ons" it reads the file, and then says:

    *Error* Minimum of fromLib, fromCell, fromView, pinOrigin must be specified in config file

    This is because  it needs the pinOrigin to know which pin should be kept in the same place - so you must at least provide that.

    Kind Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Atul Dwivedi
    Atul Dwivedi over 12 years ago

    Thanks a lot Andrew! It worked!

    It has solved a great problem. We had been trying to find a solution for this for a long time.

    Kind Regards,

    Atul 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • appathurai
    appathurai over 11 years ago

     Hi Andrew ,

      By using this  abMapAndWire.ils, I can able to migrate from tsmc65nm to cmos28lp. but here , i did not find any parameter migration, like i want to change length and width some 0.5 ratio. Is there that option too with is script? 

    without connectivity loss I migrated from tsmc65nm to cmos28lp. I want parameter migration also with this. Can you give some guidence or suggestion. 

    Also I am not able to migrate the entire library. Only I can able to migrate a particular cell. Is there any other way to migrate entire library without connectivity loss with parameter migration

      Advance thanking you,

     regards,

    Sundar.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Hi Sundar,

    I have this code which allows conversion of component parameters, but I've not unified it with abMapAndWire - I'll leave that as a task for you. Or you could probably run one after the other with a bit of thought.

    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