drt: allow auto-taper to be disabled per net (#9995)#10721
drt: allow auto-taper to be disabled per net (#9995)#10721saurav-fermions wants to merge 1 commit into
Conversation
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>
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
| foreach net [sta::find_all_clk_nets] { | ||
| $net setDisableAutoTaper $disable | ||
| } |
There was a problem hiding this comment.
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
}
}
| } | ||
| # Default action is to disable auto-taper. | ||
| set disable [expr { ![info exists flags(-enable)] }] | ||
| set block [[[ord::get_db] getChip] getBlock] |
There was a problem hiding this comment.
Summary
Adds a per-net control to disable detailed-router auto-taper of NDR (wide) nets, instead of only the global
AUTO_TAPER_NDR_NETSswitch. The default behavior is unchanged.Type of Change
Impact
Users can keep wide/analog NDR nets un-tapered per net; default unchanged.
Verification
ctest -R '^drt\.'20/20 (default unchanged).Related Issues
Fixes #9995
Developed with SAIGE, Fermions' autonomous RTL/EDA debugging agent; root-caused, tested, and signed off by the submitter (@saurav-fermions).