Skip to content

remove unused functions in net RC script and renaming for concision#4378

Merged
eder-matheus merged 1 commit into
The-OpenROAD-Project:masterfrom
AcKoucher:write-rc-clean-up
Jul 24, 2026
Merged

remove unused functions in net RC script and renaming for concision#4378
eder-matheus merged 1 commit into
The-OpenROAD-Project:masterfrom
AcKoucher:write-rc-clean-up

Conversation

@AcKoucher

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Arthur Koucher <arthurkoucher@precisioninno.com>
@AcKoucher
AcKoucher requested a review from eder-matheus July 24, 2026 21:18

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors flow/util/write_net_rc.tcl and its calling script by removing several unused procedures and renaming write_rc_csv to write_nets_rc_csv and record_wire_rc to fetch_nets_rc. The review feedback suggests optimizing fetch_nets_rc to only process CLOCK and SIGNAL nets, which would avoid unnecessary and expensive parasitic computations on power and ground nets in large designs.

}

proc record_wire_rc { var_name } {
proc fetch_nets_rc { var_name } {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In the current implementation, fetch_nets_rc iterates over all nets in the design using get_nets * and computes their wire resistance and capacitance. However, write_nets_rc_csv only processes and writes out nets of type CLOCK or SIGNAL.

For large designs, power and ground (supply) nets can have extremely large and complex parasitic networks. Computing parasitics for these nets is highly inefficient and unnecessary since they are filtered out later.

Consider filtering the nets in fetch_nets_rc to only include CLOCK and SIGNAL types to significantly improve performance:

proc fetch_nets_rc { var_name } {
  upvar 1 $var_name var

  foreach net [get_nets *] {
    set db_net [sta::sta_to_db_net $net]
    set type [$db_net getSigType]
    if {[string equal $type "CLOCK"] || [string equal $type "SIGNAL"]} {
      set net_name [get_full_name $net]
      set wire_res [net_wire_res $net]
      set wire_cap [net_wire_cap $net]
      set var($net_name) [list $wire_res $wire_cap]
    }
  }
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is relevant enough to be addressed in this PR. I can tackle it subsequently when bundling write_net_rc_script.tcl and write_segment_rc_script.tcl.

@eder-matheus
eder-matheus enabled auto-merge July 24, 2026 21:26
@eder-matheus
eder-matheus merged commit 10d4ff7 into The-OpenROAD-Project:master Jul 24, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants