Skip to content

drt: allow auto-taper to be disabled per net (#9995)#10721

Open
saurav-fermions wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
Fermions-ASI:fix/9995
Open

drt: allow auto-taper to be disabled per net (#9995)#10721
saurav-fermions wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
Fermions-ASI:fix/9995

Conversation

@saurav-fermions

Copy link
Copy Markdown
Contributor

Summary

Adds a per-net control to disable detailed-router auto-taper of NDR (wide) nets, instead of only the global AUTO_TAPER_NDR_NETS switch. The default behavior is unchanged.

Type of Change

  • New feature

Impact

Users can keep wide/analog NDR nets un-tapered per net; default unchanged.

Verification

  • Local build succeeds.
  • Relevant tests pass (rebuilt from source): ctest -R '^drt\.' 20/20 (default unchanged).
  • Code follows the repository's formatting guidelines.
  • I have signed my commits (DCO).

Related Issues

Fixes #9995


Developed with SAIGE, Fermions' autonomous RTL/EDA debugging agent; root-caused, tested, and signed off by the submitter (@saurav-fermions).

The detailed router auto-tapers NDR (wide) nets down to minimum width
near pin connections, gated globally by AUTO_TAPER_NDR_NETS. Previously
the only way to keep an NDR net (e.g. a wide analog trace) at full width
to the pin was to disable tapering globally by editing
src/drt/src/global.h and recompiling.

Add per-net control:

- odb: new dbNet flag disable_auto_taper (reuses a spare flag bit),
  exposed via dbNet::disableAutoTaper()/setDisableAutoTaper(), gated by
  new schema revision kSchemaNetDisableAutoTaper. Mirrors hasJumpers().
- Tcl: set_routing_disable_auto_taper (-net name | -all_clocks)
  [-disable] [-enable], modeled on assign_ndr.
- drt: frNet carries the flag (read in io::Parser::addNet); new
  drNet::autoTaperEnabled() helper gates the in-scope taper decisions in
  FlexDR_maze, FlexPA_acc_point and FlexPA_unique. The pin taper boxes
  are not created for disabled nets, so downstream tapering is skipped.

The global default (auto-taper on) is unchanged; existing ndr_vias
goldens are unaffected. Adds drt/test/ndr_no_auto_taper showing a
disabled net keeps full NDR width while other NDR nets still taper.

Signed-off-by: Saurav Singh <saurav.singh@fermions.co>
@saurav-fermions saurav-fermions requested review from a team as code owners June 21, 2026 05:16

@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 introduces per-net control over the detailed router's auto-taper behavior for NDR (wide) nets, adding the set_routing_disable_auto_taper Tcl command and updating the database schema to support the disable_auto_taper flag. The review feedback highlights three critical issues: a compilation error in drNet.cpp caused by two #include directives on a single line, a Tcl runtime error in OpenRoad.tcl due to calling setDisableAutoTaper directly on OpenSTA net objects instead of converting them to dbNet objects, and a potential error when chaining database block retrieval if no design is loaded.

#include "db/obj/frBTerm.h"
#include "db/obj/frBlockObject.h"
#include "db/obj/frInstTerm.h"
#include "db/obj/frNet.h" #include "db/obj/frInstTerm.h"

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.

critical

The two #include directives are on the same line, which will cause a compilation error. They should be placed on separate lines.

Suggested change
#include "db/obj/frNet.h" #include "db/obj/frInstTerm.h"
#include "db/obj/frNet.h"
#include "db/obj/frInstTerm.h"

Comment thread src/OpenRoad.tcl
Comment on lines +326 to +328
foreach net [sta::find_all_clk_nets] {
$net setDisableAutoTaper $disable
}

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.

high

sta::find_all_clk_nets returns a list of OpenSTA net objects (sta::Net*), not odb::dbNet* objects. Calling setDisableAutoTaper directly on them will result in a Tcl runtime error. You should convert the OpenSTA net to a dbNet using ord::sta_to_db_net first. Note that this path was not covered by the new integration test ndr_no_auto_taper.tcl, which is why the test passed locally.

    foreach sta_net [sta::find_all_clk_nets] {
      set db_net [ord::sta_to_db_net $sta_net]
      if { $db_net != "NULL" } {
        $db_net setDisableAutoTaper $disable
      }
    }

Comment thread src/OpenRoad.tcl
}
# Default action is to disable auto-taper.
set disable [expr { ![info exists flags(-enable)] }]
set block [[[ord::get_db] getChip] getBlock]

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

Chaining [[[ord::get_db] getChip] getBlock] can throw a Tcl error if no design or chip is loaded. It is safer to use the standard ord::get_db_block helper and check if the returned block is valid.

  set block [ord::get_db_block]
  if { $block == "NULL" } {
    utl::error ORD 1019 "No design block found."
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow auto taper to be disabled per net

1 participant