Skip to content

Widen the columns for the metric width tables#4202

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:metric-col-width
Apr 29, 2026
Merged

Widen the columns for the metric width tables#4202
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:metric-col-width

Conversation

@openroad-ci

@openroad-ci openroad-ci commented Apr 29, 2026

Copy link
Copy Markdown
Member

Accomodate bigger values like:

| Metric                                        | Old        | New        | Type     |
| ------                                        | ---        | ---        | ----     |
| cts__timing__setup__tns                       |  -341000.0 |  -331000.0 | Tighten  |

Accomodate bigger values like:
| Metric                                        | Old        | New        | Type     |
| ------                                        | ---        | ---        | ----     |
| cts__timing__setup__tns                       |  -341000.0 |  -331000.0 | Tighten  |

Signed-off-by: Matt Liberty <mliberty@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 updates the table formatting string in genRuleFile.py to increase column widths. The review feedback suggests using explicit alignment and a larger width of 12 characters to ensure consistent alignment between headers and numeric values, especially for large metrics like Total Negative Slack.

Comment thread flow/util/genRuleFile.py
)

format_str = "| {:45} | {:8} | {:8} | {:8} |\n"
format_str = "| {:45} | {:10} | {:10} | {:8} |\n"

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

The current format string uses default alignment, which differs between strings (left-aligned) and numbers (right-aligned). This causes the headers ("Old", "New") to be misaligned with the numeric values in the table. Adding explicit right-alignment ({:>12}) ensures that both headers and numeric data are consistently aligned.

Additionally, while 10 characters accommodate the example value, Total Negative Slack (TNS) values in larger designs can easily exceed this width (e.g., -10000000.0 is 11 characters). Using a width of 12 provides better coverage for such cases.

Suggested change
format_str = "| {:45} | {:10} | {:10} | {:8} |\n"
format_str = "| {:<45} | {:>12} | {:>12} | {:<8} |\n"

@maliberty maliberty merged commit db63518 into The-OpenROAD-Project:master Apr 29, 2026
9 checks passed
@maliberty maliberty deleted the metric-col-width branch April 29, 2026 19:58
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.

2 participants