Skip to content

grt: persist routing engine choice for cross-session repair_antennas - #11186

Merged
eder-matheus merged 4 commits into
The-OpenROAD-Project:masterfrom
eder-matheus:grt_save_engine_choice
Aug 21, 2026
Merged

grt: persist routing engine choice for cross-session repair_antennas#11186
eder-matheus merged 4 commits into
The-OpenROAD-Project:masterfrom
eder-matheus:grt_save_engine_choice

Conversation

@eder-matheus

Copy link
Copy Markdown
Member

Summary

global_route -use_cugr only sets a session-local flag, so in fresh-process flows (e.g. ORFS) a post-detailed-route repair_antennas runs FastRoute on a CUGR-routed design.

This PR saves the engine choice as a block property (grt_use_cugr) in saveGuides and restores it in fresh sessions (loadGuidesFromDB, repairAntennas, startIncremental). An explicit global_route choice always wins, and an absent property keeps today's FastRoute default.

Type of Change

  • Bug fix
  • New feature

Impact

Fresh-session repair_antennas on CUGR-routed designs now adopts demand and reroutes diode nets with CUGR instead of FastRoute. FastRoute flows are unchanged (repair_antennas_from_odb passes byte-identical; full grt, est, and ant suites pass).

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have included tests to prevent regressions.
  • I have signed my commits (DCO).

New test: repair_antennas_from_odb_cugr reads a checked-in CUGR-routed db
in a fresh session and asserts the restore (registered in CMake and Bazel).

Related Issues

N/A

Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
@eder-matheus
eder-matheus requested review from a team as code owners August 19, 2026 21:21
@eder-matheus
eder-matheus marked this pull request as draft August 19, 2026 21:22
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>

@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 a mechanism to persist and restore the global routing engine choice (CUGR vs FastRoute) using a database block property. While this is a valuable addition, the current implementation of ensureEngineSelected uses a session-wide engine_selected_ flag that can cause stale state leaks in multi-design sessions. The feedback recommends tracking the last checked block and introducing a user_selected_engine_ flag to safely support multi-design environments and preserve explicit user overrides.

Comment thread src/grt/include/grt/GlobalRouter.h
Comment thread src/grt/include/grt/GlobalRouter.h
Comment thread src/grt/src/GlobalRouter.cpp
@eder-matheus
eder-matheus force-pushed the grt_save_engine_choice branch from c3542c9 to 18a7677 Compare August 19, 2026 21:24
@eder-matheus
eder-matheus marked this pull request as ready for review August 19, 2026 21:31
@eder-matheus

Copy link
Copy Markdown
Member Author

@maliberty Could you comment on the idea of using a dbProperty to store the GRT engine choice? This was based on RSZ's set_opt_config.

…ROAD into grt_save_engine_choice

Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
@eder-matheus
eder-matheus merged commit 1ad4535 into The-OpenROAD-Project:master Aug 21, 2026
16 checks passed
@eder-matheus
eder-matheus deleted the grt_save_engine_choice branch August 21, 2026 16:11
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.

2 participants