Skip to content

message for placement density calculation - #4526

Closed
gudeh wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:secure-utl-density-calc-messages
Closed

gudeh wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:secure-utl-density-calc-messages

Conversation

@gudeh

@gudeh gudeh commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

make placement density with lower bound calculation error more informative and more actionable.

Example:

[INFO GPL-0022] Initialize gpl and calculate uniform density.
[ERROR FLW-0024] PLACE_DENSITY 1.0073 exceeds the maximum of 1.0.
        PLACE_DENSITY = lower_bound + (1.0 - lower_bound) * PLACE_DENSITY_LB_ADDON + 0.01
        1.0073 = 0.7300 + (1.0 - 0.7300) * 0.99 + 0.01
        lower_bound 0.7300 is the uniform density calculated by gpl with CELL_PAD_IN_SITES_GLOBAL_PLACEMENT = 0
        Set PLACE_DENSITY_LB_ADDON <= 0.96, or reduce CELL_PAD_IN_SITES_GLOBAL_PLACEMENT, or increase the core area.
INFO GPL-0022] Initialize gpl and calculate uniform density.
[ERROR FLW-0024] PLACE_DENSITY 1.0730 exceeds the maximum of 1.0.
        PLACE_DENSITY = lower_bound + (1.0 - lower_bound) * PLACE_DENSITY_LB_ADDON + 0.01
        1.0730 = 1.0700 + (1.0 - 1.0700) * 0.10 + 0.01
        lower_bound 1.0700 is the uniform density calculated by gpl with CELL_PAD_IN_SITES_GLOBAL_PLACEMENT = 2
        lower_bound exceeds 1.0 on its own: the padded cells need more area than the core provides.
        Reduce CELL_PAD_IN_SITES_GLOBAL_PLACEMENT or increase the core area.

…re actionable

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
@gudeh gudeh self-assigned this Sep 9, 2026

@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 improves the error reporting in flow/scripts/util.tcl when the placement density exceeds 1.0 by providing a detailed breakdown of the calculation and suggesting actionable remedies. The review feedback points out a boundary condition bug where a place_density_lb of exactly 0.99 incorrectly triggers an empty max_addon_str, and suggests changing the condition from >= 0.99 to > 0.99.

Comment thread flow/scripts/util.tcl
"Place density exceeds 1.0 (current PLACE_DENSITY_LB_ADDON = \
$::env(PLACE_DENSITY_LB_ADDON)). Please check if the value of \
PLACE_DENSITY_LB_ADDON is between 0 and 0.99."
if { $place_density_lb >= 0.99 } {

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.

medium

When place_density_lb is exactly 0.99, a PLACE_DENSITY_LB_ADDON value of 0 actually works (resulting in place_density = 1.0, which does not exceed the limit of 1.0). However, using >= 0.99 here causes max_addon_str to be empty, leading to an incorrect error message stating that no value works. Changing the condition to > 0.99 correctly allows max_addon_str to be calculated as 0.00 when place_density_lb is exactly 0.99.

      if { $place_density_lb > 0.99 } {

@openroad-ci

openroad-ci commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics reflect the PR merge build — i.e. what will land on the target branch.

Commit 0edacbf · Jenkins build #17 · Baseline: build · View build on dashboard

62 design(s) checked — 0 with regression(s), 0 without a comparable baseline.

@gudeh

gudeh commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@AcKoucher @oharboe

@oharboe

oharboe commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Is this a linting step that runs before the flow?

@gudeh

gudeh commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Is this a linting step that runs before the flow?

It is not. It runs at stage 3-1 (gpl without IOs), and at macro_place_util.tcl (stage 2-4 I believe).

This PR relates to the discussion: #4500

I was also trying to think of a way to modify the input values automatically, although the parameters seem a little restricted to the user. For example, I am not sure we should change padding size or core dimensions because of a failed placement density calculation.

@AcKoucher

Copy link
Copy Markdown
Contributor

@gudeh The changes here are similar to the ones in #4486, which originated the discussion on #4500.

@gudeh

gudeh commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

@gudeh The changes here are similar to the ones in #4486, which originated the discussion on #4500.

Yes, I am not yet sure how to turn this into a lint check like @oharboe suggested.

@gudeh
gudeh requested a review from eder-matheus September 10, 2026 14:31
@gudeh
gudeh marked this pull request as draft September 17, 2026 15:43
@gudeh gudeh closed this Oct 9, 2026
@openroad-ci
openroad-ci deleted the secure-utl-density-calc-messages branch October 22, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants