grt: add updateNet for topology refresh in CUGR incremental routing#9671
Conversation
Add addDirtyNet(), startIncremental(), and endIncremental() methods to support incremental global routing in the CUGR engine, along with dirty_net_indices_ and incremental_mode_ state tracking. Signed-off-by: TheUnnamedOne-design <aditya07.11.04.12@gmail.com> Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
Signed-off-by: TheUnnamedOne-design <aditya07.11.04.12@gmail.com> Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
…rtion When repair_timing inserts a buffer, a net is split into two. The previous incremental flow rerouted the stale GRNet objects from init() — pin list, access points, and bounding box all predated the insertion. Implement Design::updateNet() and CUGR::updateNet() to refresh per-net CUGRNet/GRNet state from the database before rerouting. Wire into endIncremental() and expose as grt::update_net Tcl command. Also add null guard in GridGraph::commitTree() for freshly rebuilt nets and a regression test exercising the full incremental update path. Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request introduces support for topology refresh in the incremental CUGR router, which is crucial for handling netlist changes from buffer insertion. The changes include new APIs to update net information from the database, integration into the incremental routing flow, and a new regression test. My review focuses on potential performance improvements and code maintainability. I've identified a few areas with redundant operations and code duplication that could be refactored for better efficiency and clarity.
Note: Security Review did not run due to the size of the PR.
Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
… detours Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
hey @eder-matheus i will look in the jenkins issues but could you help me out in why build on macos is failing |
Remove redundant routing tree existence checks before commitTree() calls in patternRoute, patternRouteWithDetours, and mazeRoute, since nets processed in these functions are always routed in a prior stage and guaranteed to have a valid routing tree. Retain the null check only in updateCUGRNet and rerouteNets where nets may not yet have been routed in the incremental routing context. Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
f98be21 to
f68d05a
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
eder-matheus
left a comment
There was a problem hiding this comment.
Just some minor requests before approving.
|
@sparsh-karna About the jenkins and macOS build failures, they are probably related to the changes in the |
Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
|
hey @eder-matheus i have fixed the swig formatting issues in GlobalRouter.i file, could you approve the workflow |
…_idx_ to db_net_to_id_ in Design.cpp Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
e5df3f2 to
62a3303
Compare
Update incremental_update_net.tcl to call grt::update_cugr_net instead of the old grt::update_net after the function rename. Signed-off-by: Sparsh Karna <sparsh2005karna@gmail.com>
62a3303 to
1d70cca
Compare
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
Summary
Extends the incremental CUGR routing API (introduced in #9645) with
topology refresh support. When buffer insertion changes a net's pin
list or adds new nets, the existing GRNet objects are stale. This PR
re-reads net topology from ODB before rerouting so the incremental
path operates on correct data.
Depends On
#9645 — must be reviewed/merged first.
Changes
Design::updateNet(dbNet*)— re-reads pins, BTerms, ITerms, andlayer range from ODB in-place; handles brand-new nets created by
buffer insertion (net splits)
CUGR::updateNet(dbNet*)— rips up old routing tree, rebuildsCUGRNet/GRNet from scratch, registers new nets in gr_nets_,
net_indices_, and db_net_map_
GridGraph::commitTree()to prevent crash on freshlyallocated nets with no existing routing tree
endIncremental()so topology refresh happens beforererouteNets() runs
grt::update_netTcl command exposed via GlobalRouter.i SWIG bindingsrc/grt/test/incremental_update_net.tclTesting
asserts guides exist for the new net