Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ungrouping certain hierarchies (RTLC loop issue)

Status
Not open for further replies.

kamalkundu

Junior Member level 2
Joined
Sep 11, 2007
Messages
20
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,406
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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top