Skip to content

fix: DRC violation type parsing#4054

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
ashnaaseth2325-oss:fix-drc-violation-type-parsing
Mar 25, 2026
Merged

fix: DRC violation type parsing#4054
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
ashnaaseth2325-oss:fix-drc-violation-type-parsing

Conversation

@ashnaaseth2325-oss

Copy link
Copy Markdown
Contributor

SUMMARY

This PR fixes incorrect parsing of DRC violation types in flow/util/genReport.py. The current code mangles names due to misuse of str.strip(), leading to wrong DRC summaries.


FIX

Before

type_ = line_.strip("violation type:").strip()

After

type_ = line_.split("violation type:", 1)[1].strip()

VERIFICATION

  • Run a flow to generate a DRC report and execute genReport.py
  • Before fix: types are corrupted (e.g. _enclosure, ff_grid)
  • After fix: types are correct (via_enclosure, off_grid)
  • DRC summary matches the actual report

str.strip(chars) strips a character set, not a literal prefix.
Use split() to correctly extract the violation type name.

Signed-off-by: Ashnaa Seth <ashnaaseth2325@gmail.com>
Signed-off-by: ashnaaseth2325-oss <ashnaaseth2325@gmail.com>
@ashnaaseth2325-oss ashnaaseth2325-oss force-pushed the fix-drc-violation-type-parsing branch from 019cf95 to 7039d21 Compare March 25, 2026 20:17
@ashnaaseth2325-oss

Copy link
Copy Markdown
Contributor Author

Hi @eder-matheus @maliberty,
Please review this PR whenever you get time.
Thanks!

@maliberty maliberty enabled auto-merge March 25, 2026 21:43
@maliberty maliberty merged commit 7fd4e25 into The-OpenROAD-Project:master Mar 25, 2026
8 of 9 checks passed
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