Skip to content

Commit 9768f0f

Browse files
authored
Merge pull request #4397 from AcKoucher/write-rc-hier-nets
iterate dbNets rather than sta nets when fetching parasitics
2 parents b187e12 + 531334d commit 9768f0f

1 file changed

Lines changed: 11 additions & 14 deletions

File tree

‎flow/util/write_rc_helper.tcl‎

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
proc fetch_nets_rc { var_name } {
55
upvar 1 $var_name var
66

7-
foreach net [get_nets -hierarchical *] {
8-
set net_name [get_full_name $net]
9-
set wire_res [net_wire_res $net]
10-
set wire_cap [net_wire_cap $net]
11-
set var($net_name) [list $wire_res $wire_cap]
7+
foreach db_net [[ord::get_db_block] getNets] {
8+
set sta_net [sta::db_net_to_sta $db_net]
9+
set wire_res [net_wire_res $sta_net]
10+
set wire_cap [net_wire_cap $sta_net]
11+
set var([$db_net getName]) [list $wire_res $wire_cap]
1212
}
1313
}
1414

@@ -47,15 +47,14 @@ proc write_nets_rc_csv { filename grt_var rcx_var } {
4747
puts $stream ""
4848

4949
# Then, write the parasitics data of each net.
50-
foreach net [get_nets -hierarchical *] {
51-
set db_net [sta::sta_to_db_net $net]
50+
foreach db_net [[ord::get_db_block] getNets] {
5251
set type [$db_net getSigType]
5352

5453
if { !([string equal $type "CLOCK"] || [string equal $type "SIGNAL"]) } {
5554
continue
5655
}
5756

58-
set net_name [get_full_name $net]
57+
set net_name [$db_net getName]
5958
set net_type [expr { $type eq "CLOCK" ? "clock" : "signal" }]
6059

6160
lassign $grt_net_name_to_rc($net_name) grt_net_res grt_net_cap
@@ -76,8 +75,7 @@ proc write_nets_rc_csv { filename grt_var rcx_var } {
7675
proc fetch_segments_rc { net_to_segments_var } {
7776
upvar 1 $net_to_segments_var net_to_segments
7877

79-
foreach sta_net [get_nets -hierarchical *] {
80-
set db_net [sta::sta_to_db_net $sta_net]
78+
foreach db_net [[ord::get_db_block] getNets] {
8179
set type [$db_net getSigType]
8280

8381
if { !([string equal $type "CLOCK"] || [string equal $type "SIGNAL"]) } {
@@ -122,7 +120,7 @@ proc fetch_segments_rc { net_to_segments_var } {
122120
lappend seen_shape_ids $shape_id
123121
}
124122

125-
set net_to_segments([get_full_name $sta_net]) $segments
123+
set net_to_segments([$db_net getName]) $segments
126124
}
127125
}
128126

@@ -143,14 +141,13 @@ proc write_segments_rc_csv { filename net_to_segments_var } {
143141
puts $stream ""
144142

145143
# Then, write the parasitics data of each wire segment.
146-
foreach sta_net [get_nets -hierarchical *] {
147-
set net_name [get_full_name $sta_net]
144+
foreach db_net [[ord::get_db_block] getNets] {
145+
set net_name [$db_net getName]
148146

149147
if { ![info exists net_to_segments($net_name)] } {
150148
continue
151149
}
152150

153-
set db_net [sta::sta_to_db_net $sta_net]
154151
set type [$db_net getSigType]
155152
set net_type [expr { $type eq "CLOCK" ? "clock" : "signal" }]
156153

0 commit comments

Comments
 (0)