• 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. How to flatten layout cells and preserve pin names when...

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 126
  • Views 19735
  • 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

How to flatten layout cells and preserve pin names when pin names from different cells are the same

twen
twen over 9 years ago

I am using virtuoso version 6.1.6-64b 12/07/2015 20:18 (sjfbm186) .

Suppose I have a top level cell T, and T contains two cells A and B, and there are a pin called P in both A and B. When I flatten cells A and B by gui (Preserve pins, preserve ROD Objects) to by foreach(s list(dbA dbB) dbFlattenInst(s 1 t t t t t t t)), the pin P in cell A is brought up into cell T without any problem. However, the label on pin P in cell B is renamed to something like dbNet032. I see this can be useful in certain cases, but it is not what I want.

Is there anyway that I can flatten A and B and brought up the pin P to cell T and keep both pins' label as it was?

Thanks in advance,

TJ

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

    Maybe this will help. I wrote this a long time ago - haven't tested it recently though.

    /* abFlattenInst.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Jul 29, 1998 
    Modified   
    By         
    
    Instance flattener which doesn't rename pins
    
    Can be used in place of dbFlattenInst() or leFlattenInst()
    The arguments are the same with the exception of the additional netSuffix argument,
    which can be ignored as it is optional. 
    
    Ended up slightly more complex because of having to deal with the case
    that you can't dbMergeNet two nets which both have terminals 
    
    ***************************************************
    
    SCCS Info: @(#) abFlattenInst.il 03/23/99.22:04:30 1.2
    
    */
    
    (procedure (abFlattenInst inst levels @optional pcells? preservePins? 
                              (netSuffix "_abFlatTmp"))
      (let (result termName oldNet newNet renamedNets cellView pinFigs)
           (if preservePins?
               (progn
                (setq cellView (dbGetq inst cellView))
                /* see if any of the terminal names on the instance match any
                   existing nets in the parent cellView; if so, rename them */
                (foreach term (dbGetq (dbGetq inst master) terminals)
                         (setq termName (dbGetq term name))
                         (when (setq oldNet (dbFindNetByName cellView termName))
                               (setq renamedNets (cons termName renamedNets))
                               /* rename the net */
                               (setq newNet (dbMakeNet cellView (strcat termName netSuffix)))
                               (dbMergeNet newNet oldNet)
                               /* rename the terminal, to stop it clashing too */
                               (when (dbGetq newNet term)
                                     (dbSetq (dbGetq newNet term) (strcat termName netSuffix) name))
                               )
                         )
                /* do the flattening */
                (setq result (dbFlattenInst inst levels pcells? preservePins?))
                /* any nets which were renamed have to be renamed back to the original name */
                (foreach netName renamedNets
                         (when (setq oldNet
                                     (dbFindNetByName cellView (strcat netName netSuffix)))
                               (setq newNet (dbMakeNet cellView netName))
                               /* get the figures which are the pins, and delete the "new"
                                  terminal */
                               (setq pinFigs (dbGetq (dbGetq (dbGetq newNet term) pins) fig))
                               (dbDeleteObject (dbGetq newNet term))
                               (dbMergeNet newNet oldNet)
                               /* rename the terminal back again */
                               (when (dbGetq newNet term)
                                     (dbSetq (dbGetq newNet term) netName name))
                               /* go through the old pin figures and reattach them to the
                                  new net */
                               (foreach fig pinFigs
                                        (dbCreatePin newNet fig))
                               ))
                result
                )
               /* otherwise, if preservation of pins is off, just flatten as normal */
               (dbFlattenInst inst levels pcells? preservePins?)
               )
           ))
    

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Maybe this will help. I wrote this a long time ago - haven't tested it recently though.

    /* abFlattenInst.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Jul 29, 1998 
    Modified   
    By         
    
    Instance flattener which doesn't rename pins
    
    Can be used in place of dbFlattenInst() or leFlattenInst()
    The arguments are the same with the exception of the additional netSuffix argument,
    which can be ignored as it is optional. 
    
    Ended up slightly more complex because of having to deal with the case
    that you can't dbMergeNet two nets which both have terminals 
    
    ***************************************************
    
    SCCS Info: @(#) abFlattenInst.il 03/23/99.22:04:30 1.2
    
    */
    
    (procedure (abFlattenInst inst levels @optional pcells? preservePins? 
                              (netSuffix "_abFlatTmp"))
      (let (result termName oldNet newNet renamedNets cellView pinFigs)
           (if preservePins?
               (progn
                (setq cellView (dbGetq inst cellView))
                /* see if any of the terminal names on the instance match any
                   existing nets in the parent cellView; if so, rename them */
                (foreach term (dbGetq (dbGetq inst master) terminals)
                         (setq termName (dbGetq term name))
                         (when (setq oldNet (dbFindNetByName cellView termName))
                               (setq renamedNets (cons termName renamedNets))
                               /* rename the net */
                               (setq newNet (dbMakeNet cellView (strcat termName netSuffix)))
                               (dbMergeNet newNet oldNet)
                               /* rename the terminal, to stop it clashing too */
                               (when (dbGetq newNet term)
                                     (dbSetq (dbGetq newNet term) (strcat termName netSuffix) name))
                               )
                         )
                /* do the flattening */
                (setq result (dbFlattenInst inst levels pcells? preservePins?))
                /* any nets which were renamed have to be renamed back to the original name */
                (foreach netName renamedNets
                         (when (setq oldNet
                                     (dbFindNetByName cellView (strcat netName netSuffix)))
                               (setq newNet (dbMakeNet cellView netName))
                               /* get the figures which are the pins, and delete the "new"
                                  terminal */
                               (setq pinFigs (dbGetq (dbGetq (dbGetq newNet term) pins) fig))
                               (dbDeleteObject (dbGetq newNet term))
                               (dbMergeNet newNet oldNet)
                               /* rename the terminal back again */
                               (when (dbGetq newNet term)
                                     (dbSetq (dbGetq newNet term) netName name))
                               /* go through the old pin figures and reattach them to the
                                  new net */
                               (foreach fig pinFigs
                                        (dbCreatePin newNet fig))
                               ))
                result
                )
               /* otherwise, if preservation of pins is off, just flatten as normal */
               (dbFlattenInst inst levels pcells? preservePins?)
               )
           ))
    

    • 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