• 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. Flatten layout and preserve instance name

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 17133
  • 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

Flatten layout and preserve instance name

Kaggarwa
Kaggarwa over 16 years ago

Hello All,

I have generated a hierarchical layout in VXL and  have to Flatten it at the top level, but I want to preserve the hierarchical names of all the instances in the Design. I tried using dbFlattenInst() command, but it gives random names to instances after Flattening the Design.

Is there an existing SKILL command that does this or If someone can guide me how to proceed, I would be grateful.

In case of a SKILL code , I thought about a code where I can get the absolute coordinate of all the instances in my design, store that hierarchy tranversed in a map table and after flattening, rename all the instances based on the mapping table. I was wondering if there is an easier way to do this ?

Regards,

Kamala

  • Cancel
  • dmay
    dmay over 16 years ago

    I am not aware of any existing skill code from Cadence, but it is not difficult to write. Your idea would work. We did it a different way and maybe you'll find it simpler. When you flatten an instance one level, the lower level instance names are preserved if the name is unique at the current level. Given this, here is how we implemented it:

    1. Only apply this functionality when flattening one level (although you could handle multiple levels of flattening, this simplfies your code and will still work if you flatten one level again).

    2. Only apply this code if instances in the lower level are named for VXL (the leading pipe on the instance name indicates that it was probably named for VXL). You don't gain anything if your lower level instance names are random. While looking at the instances names in the instance you wish to flatten, create the hierarchical instance name for each named instance and store it in a table. The key to the table is the current instance name of the lower level instance. The value is the hierarchical instance name that is made by pre-pending the current instance's name (the instance to be flattened) to the lower level instance name. myTable["|inst1"] = "|topInst|inst1"

    3. Rename all the instances at the top level with a suffix that shouldn't be found on any lower level instance names. This will ensure that lower level instance names will be preserved when the instance is flattened. |topInst becomes |topInst_preflatten

    4. Flatten the instance one level.

    5. Find all the instances now at the top level whose name exists in the myTable created in step 2. Rename these instances with the hierarchical name. when(myTable[inst~>name] inst~>name = myTable[inst~>name])

    6. Rename all instances with the suffix (added in step 3) to not have the suffix anymore.

    This is just a few simple foreach loops and works well for us.

     -Derek

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Kaggarwa
    Kaggarwa over 16 years ago

    Hello Derek,

    Thanks a lot for your reply. This is indeed much simpler. I wrote the code and it works well and as you suggested, just putting one more for loop gets it to work for any number of hierarchies. Further, I added options of Stop library and Skip library (synonymous to netlister) and thus I can flatten hierarchaically from top cell without worrying about different hierarchy levels for different cells.

    Regards,

    Kamala

    • 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