grt: ensure CUGR/FastRoute paths will not call functions from the wrong engine#10756
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>
|
@codex review |
There was a problem hiding this comment.
Code Review
This pull request refactors the global router to make grid mirroring, net degree calculation, and macro/blockage reporting engine-agnostic, enabling consistent behavior and reporting across both FastRoute and CUGR engines. It introduces helper methods such as mirrorGridToFastRoute, computeNetDegree, reportNetDegree, and reportMacrosAndBlockages to clean up and unify these tasks, and updates partial routing and congestion adjustments to correctly handle CUGR-specific flows. The review feedback points out a potential issue in reportNetDegree where min_degree could remain set to std::numeric_limits::max() if no nets satisfy the routing criteria, leading to incorrect log outputs, and suggests a fix to reset both min and max degrees to 0 in this scenario.
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 428c29eed3
ℹ️ 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>
Summary
Isolate the CUGR global-routing engine from the FastRoute engine so that running one never invokes the other's initialization or routing functions. Previously the
use_cugrpath still fell through FastRoute-only setup (grid mirroring, FastRoute netlist build, edge/regularity setup, resistance-aware/suggest-adjustment calls) that CUGR neither needs nor reads.Key changes:
mirrorGridToFastRoute(), called only frominitFastRoute/initGridAndNets;initCoreGrid/initGridare now engine-agnostic.initNetlist()out of the sharedinitNets()into the FastRoute path.setResistanceAwareinto the FastRoute branch ofupdateDirtyRoutes, guardsuggestAdjustment, and skipfastroute_->clear()on the CUGR path.getPartialRoutes()now sources incremental partial routes from CUGR instead offastroute_->getPlanarRoute(), so incremental CUGR parasitics estimation sees real routes rather than empty FastRoute trees.computeUserGlobalAdjustmentson the CUGR path (it is engine-agnostic: it propagates the global adjustment into the per-layer tech-layer values CUGR reads); the FastRoute-only obstruction pass stays out of the CUGR path.After these changes, neither the full-route nor the incremental flow of one engine executes any init/routing function of the other; the only shared presence is that both engine objects are still constructed.
Type of Change
Impact
Verification
./etc/Build.sh).