• 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. Having trouble creating a group and flattening within i...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 145
  • Views 16451
  • 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

Having trouble creating a group and flattening within it

LongTimeNovice
LongTimeNovice over 10 years ago

Hi, everyone.

I want to select some mosaics in a layout  (manually before running the script), and then run the script which will create a group in the layout, pull the selected mosaics into that group, and flatten the mosaics in the group.  This is my code:

let((cv group1 instList)
     cv=geGetWindowCellView()

     instList=selectedSet()

     group1=dbCreateFigGroup(cv "myGroup" t 0:0 "R0")

     foreach(inst instList

          dbAddFigToFigGroup(group1 inst)

           )

     figGroupId=dbGetFigGroupByName(cv "myGroup")

     figList = figGroupId~>figs

     foreach( fig figList

          dbFlattenInst( fig 1)

           )
     )

I've found that it will create the group if I remove the flatten command, and it will flatten everything if I remove the AddFigToFigGroup command, but it won't do both.  Does anybody see what I'm doing wrong?

Thanks.

Steven

  • Cancel
  • theopaone
    theopaone over 10 years ago
    Do you expect the resulting instances to be in the group after the flatten? They are not added back to the group so the group may be deleted if it is empty after all the flatten. As to it not flattening if the mosaics are in the group, I don't know what is happening there.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • LongTimeNovice
    LongTimeNovice over 10 years ago
    Thank you, theopaone! Yes, I was hoping to have them still be in the group after the mosaic was flattened. But you already answered my other related question about getting database IDs after you flatten a mosaic http://community.cadence.com/cadence_technology_forums/f/48/t/33858 , and that is good enough because now I can flatten it first and then add all its instances to a group afterward. Actually, I've decided to make a cell out of the instances instead of a group, and I've asked a question about that. Anyway, that's another topic. Thank you for supporting us amateurs!
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • psill000
    psill000 over 10 years ago

    Not sure if you still want to create a group. It is kinda crude scripting, but get the idea of what is being done.
    you need to add a line to delete the instances

    procedure(booyaa()
    let(    (group1 master trans
        (instList selectedSet())
        (cv geGetWindowCellView()))

         group1 = dbCreateFigGroup(cv "myGroup" t 0:0 "R0")

         foreach(inst instList
        when(inst~>isShape || inst~>viaHeader
              dbAddFigToFigGroup(group1 inst))
               )

         foreach( fig instList
        when(fig~>isAnyInst
            trans    = fig~>transform
            master    = fig~>master
            
            foreach(shp append(master~>instances append(master~>shapes master~>vias))
                dbAddFigToFigGroup(group1 dbCopyFig(shp cv trans)))
            )
              )
    )
    )

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

    I was going to make a similar suggestion - use a figGroup rather than a group (they are different things).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • LongTimeNovice
    LongTimeNovice over 10 years ago
    Thank you, psill000! You really put together a well thought-out solution for me! I appreciate it so much!
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • LongTimeNovice
    LongTimeNovice over 10 years ago
    Thank you, Andrew! It's always nice when you weigh-in on these topics. We all trust your experience and knowledge so much. Thanks again!
    • 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