grt: enable post-DRT antenna repair when using CUGR - #11053
grt: enable post-DRT antenna repair when using CUGR#11053eder-matheus wants to merge 21 commits into
Conversation
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
…ate/OpenROAD into grt_cugr_repair_antennas_jumper
|
@codex review |
There was a problem hiding this comment.
Code Review
This pull request implements rebuilding the engine state from detailed routes for CUGR during antenna repair, aligning its behavior with FastRoute. It introduces makeRouteFromWires to convert detailed wires into a gcell-granularity route, and updates the antenna repair and route update flows to handle CUGR state restoration and wire destruction. Additionally, a new integration test is added to verify post-detailed-route antenna repair with CUGR. Feedback was provided regarding a potential null pointer dereference in makeRouteFromWires when retrieving a via shape, which could lead to a segmentation fault.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a74885061
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 112a4e8461
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ate/OpenROAD into grt_cugr_repair_antennas_jumper Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
112a4e8 to
6a306b5
Compare
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
…ate/OpenROAD into grt_cugr_repair_antennas_jumper
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
…ate/OpenROAD into grt_cugr_repair_antennas_jumper
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d740399103
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fastroute_->getNetId(db_net, net_id, exists); | ||
| ndr_nets.emplace_back(db_net, net_id); | ||
| if (use_cugr_) { | ||
| initCUGR(min_layer, max_layer); |
There was a problem hiding this comment.
Reset CUGR state before reinitializing
When repair_antennas is invoked after an earlier global_route -use_cugr/detailed_route, this re-enters initCUGR() on the existing CUGR instance. CUGR::init() appends to gr_nets_, net_indices_, and db_net_map_ without clearing the previous contents, so after this new path the object contains duplicate GRNet entries; a subsequent full CUGR route scans gr_nets_, routes the same indices repeatedly, and can commit stale demand multiple times. Clear or recreate the CUGR state before this re-init.
Useful? React with 👍 / 👎.
| for (int level = via_min_layer; | ||
| level < std::min(via_max_layer, max_layer); | ||
| level++) { |
There was a problem hiding this comment.
Project above-range pins when clamping adopted vias
When a detailed route reaches a top-level pin on max_layer + 1, this loop now clamps the via stack to stop at max_layer, but GRNet still creates that pin's access point on the actual above-range pin layer and restoreNetRoute() requires one of those AP cells to be present in the restored tree. Fresh evidence beyond the earlier via-bound issue is that the new coverage validation rejects the clamped tree even though buildTreeFromRoute() no longer rejects the via segment, so the net falls into the failed-adoption path and its detailed-route demand is not modeled during antenna repair; project the coverage AP to the routing ceiling as well.
AGENTS.md reference: AGENTS.md:L20-L20
Useful? React with 👍 / 👎.
Summary
When using CUGR, we just skipped post-DRT repair antennas. Now, we repair the antenna violations similar to how FastRoute does:
New test
repair_antennas_post_drt_cugrcovers the flow end to end with real detailed routing: CUGR route →detailed_route→ 4 violations on the wires → 4 diodes → seconddetailed_route→ 0 violations on the final wires (~20 s, deterministic; the first post-DRT repair test for either engine).Type of Change
Impact
CUGR sessions can repair antennas after detailed routing instead of skipping;
antenna_diodes_countis reported and repaired nets hand fresh guides to the DRT ECO. Diode-net reroutes account for existing wire demand. FastRoute behavior is unchanged — existing goldens byte-identical, includingrepair_antennas_from_odb.Verification
./etc/Build.sh).Related Issues
None.