• 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. Logic Design
  3. ungrouping certain hierarchies (RTLC loop issue)

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 63
  • Views 15325
  • 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

ungrouping certain hierarchies (RTLC loop issue)

Kamal Kundu
Kamal Kundu over 15 years ago

 I am ungrouping certain hierarchies in my design. I have written a small tcl in RTLC to do so:



Suppose I have a design $Top, having hierarchy as follow:

$Top

- A (Inst name: i_A_inst)

- B (Inst name: i_B_inst)

- C (Inst name: i_C_inst)

- D (Inst name: i_D_inst)

- E (Inst name: i_E_inst)

- F (Inst name: i_F_inst)

- G (Inst name: i_G_inst)



### List of subdesigns to be preserved from ungrouping

set keep_hier_list [list A B C D]



### Preserve all the subdesigns to be prevented from ungrouping

foreach ele $keep_hier_list {

set_attr preserve true [find –subdesign $ele]

}



### Ungroup all instances except for those preserved as above

Ungroup –flatten /designs/$Top/instances_hier/*

Warning : Cannot ungroup preserved instance. [UTUI-100]

: /designs/$Top/instances_hier/i_A_inst

Warning : Cannot ungroup preserved instance. [UTUI-100]

: /designs/$Top/instances_hier/i_C_inst

Warning : Cannot ungroup preserved instance. [UTUI-100]

: /designs/$Top/instances_hier/i_E_inst



### Ungroup all the instances inside preserved modules except for some preserved ones as in loop 1

foreach ele $keep_hier_list {

set_attr preserve false [find –subdesign $ele]

set inst_name [get_attr instance $ele]

ungroup –flatten $inst_name/instances_hier/*

set_attr preserve true [find –subdesign $ele]

}





### Removing preserve from these subdesigns to proceed with further optimizations

foreach ele $keep_hier_list {

set_attr preserve false

}





Now, when loop 2 is executed all the instances inside A except B will be ungrouped and for B it will give the following warning and come out of loop:

Warning : Cannot ungroup preserved instance. [UTUI-100]

: /designs/$Top/instances_hier/i_A_inst/instances_hier/i_B_inst



But this is intentional because I want to preserve subdesign B (or instance i_B_inst), and I want to go to second iteration for this loop for next element.

How can I do this?

Thanks

  • Cancel
Parents
  • grasshopper
    grasshopper over 15 years ago

     Hi Kamal,

     seems to me like you could do

     ungroup -flatten $designName -exclude$keep_hier_list

     

    Following is the full usage information for ungroup.

    Usage: ungroup [-all] [-flatten] [-simple] [-only_user_hierarchy] [-threshold <integer>] [-exclude <instance>+] [<instance>+]

        [-all]:
            ungroups all instances under the current hierarchical instance
        [-flatten]:
            ungroups recursively
        [-simple]:
            no prefix
        [-only_user_hierarchy]:
            ungroups only user defined hierarchies
        [-threshold <integer>]:
            recursively ungroups hierarchies with cell-count less then the threshold under the current hierarchical instance
        [-exclude <instance>+]:
            the list of instances to exclude from ungrouping
        [<instance>+]:        the list of instances to ungroup
     

    later,

    gh-

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • grasshopper
    grasshopper over 15 years ago

     Hi Kamal,

     seems to me like you could do

     ungroup -flatten $designName -exclude$keep_hier_list

     

    Following is the full usage information for ungroup.

    Usage: ungroup [-all] [-flatten] [-simple] [-only_user_hierarchy] [-threshold <integer>] [-exclude <instance>+] [<instance>+]

        [-all]:
            ungroups all instances under the current hierarchical instance
        [-flatten]:
            ungroups recursively
        [-simple]:
            no prefix
        [-only_user_hierarchy]:
            ungroups only user defined hierarchies
        [-threshold <integer>]:
            recursively ungroups hierarchies with cell-count less then the threshold under the current hierarchical instance
        [-exclude <instance>+]:
            the list of instances to exclude from ungrouping
        [<instance>+]:        the list of instances to ungroup
     

    later,

    gh-

    • 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