Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is one version of a DPL improver which only kicks in meaningfully under high core utilization values.
For validation, it is recommended to tune the hyperparameters (detailed here) on any circuit of choice that struggles with high core utilization at or near the highest core utilization value it completes the flow at.
The expected outcome will be a small but meaningful DRWL reduction of 2-3% in the above scenario. Outliers of up to 8% were observed.
Note : For the purpose of CI, the default PR leaves the alternate flow as "on". It should be merged as an alternate setting which is default "off". This is done for testing CI-level regressions.
We are also aware that the hyperparameters should all, in general, solely reside in TCL and not be hardcoded. Please also use a reasonable variation (2-4 choices each) of hyperparameters.
See also : #8874
--AI Generated content follows--
Feature: Two-Pass Congestion-Aware Global Swap (DPL)
Motivation
In high-density designs (utilization > 85%), standard detailed placement optimizations often degrade local routability while pursuing global wirelength reductions. The legacy
GlobalSwapalgorithm optimized strictly for HPWL (Half-Perimeter Wirelength), frequently moving cells into already congested regions to minimize net length. This "clumping" behavior creates local density hotspots that standard routers cannot resolve, leading to DRC violations and timing degradation due to detour routing.This PR introduces a Guarded Two-Pass Global Swap strategy. Instead of blind HPWL optimization, it employs a "Profile-Then-Optimize" approach: it first identifies the theoretical minimum wirelength (Pass 1), then re-optimizes the design (Pass 2) using a congestion-aware cost function constrained by a wirelength budget derived from the first pass. This ensures that congestion relief does not come at the cost of uncontrolled wirelength regression.
Technical Implementation
1. Utilization Map Infrastructure
A new
UtilizationMapmechanism has been added to theGridclass to quantify local congestion costs.Where
2. Two-Pass Optimization Algorithm
The
DetailedGlobalSwapsolver has been refactored into a state-preserving two-pass workflow:Pass 1: HPWL Profiling
Journalto atomically undo all moves, restoring the exact initial placement state while retaining thePass 2: Guarded Congestion Optimization
Usage & Configuration
This feature is enabled by default within the
improve_placementTCL command.Enabling / Disabling
There is currently no explicit disable flag exposed to TCL, as the two-pass logic is now the standard behavior for
GlobalSwap. To revert to legacy behavior, one would need to modify the C++ source to bypass the profiling pass, though this is not recommended for high-density designs.Hyperparameter Configuration
User-Configurable (TCL)
These flags control the core search heuristics of the swap engine:
-x <float>(Tradeoff): Controls the ratio of "Random Exploration" vs. "Smart" (Wirelength-Optimal) moves.0.2(20% random / 80% smart).0.4or0.5for difficult designs to escape local minima.-t <float>(Tolerance): Convergence threshold for the HPWL optimization loop.0.01(1%).-p <int>(Passes): Number of inner-loop optimization passes per stage.Example:
# High-effort mode for difficult designs improve_placement -x 0.4 -t 0.005Internal Compilation Parameters (
detailed_global.cxx)Advanced tuning requires modifying hardcoded constants:
budget_multipliers:{1.50, 1.25, 1.10, 1.04}. Controls the annealing-like schedule of the wirelength budget.area_weight/pin_weight:0.4/0.6. Weights for the utilization map cost function.user_knob:35.0. Scaling factor that determines how much wirelength we are willing to trade for a unit of congestion relief.Expected Impact
This optimization is specifically targeted at high-density / high-utilization designs (e.g., >85% placement density).