Skip to content

synth: improve canonicalization - #3797

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
Pinata-Consulting:yosys-canonicalization
Jan 17, 2026
Merged

maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
Pinata-Consulting:yosys-canonicalization

Conversation

@oharboe

@oharboe oharboe commented Jan 15, 2026 •

Copy link
Copy Markdown
Collaborator

Improves canonincalization

Option to prune:

  1. attribute \src statements with filename and line number.
  2. slang fixes: wires with embedded filenames and line numbers
attribute \src "bazel-out/k8-opt/bin/foo.sv:149872.1-149904.10"
attribute \top 1
[deleted]
  wire width 55 $ternary$bazel-out/k8-opt/bin/hardware/tile/foo.sv:149903$4199_Y

@oharboe oharboe changed the title synth: improve canonicalization [FOR DISCUSSION] synth: improve canonicalization Jan 15, 2026
@oharboe
oharboe marked this pull request as draft January 15, 2026 12:40
@oharboe

oharboe commented Jan 15, 2026

Copy link
Copy Markdown
Collaborator Author

@maliberty @povik I believe this is a dead end, .rtlil is not designed for canonicalization w.r.t. hashes.

@oharboe oharboe closed this Jan 15, 2026
@povik

povik commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

@oharboe I think once you switch to slang (I know issues are pending there) it will solve "wires with embedded filenames and line numbers".

"attribute \src statements with filename and line number." should be solvable with setattr -unset src * or similar. I don't think we should strip the source information unconditionally as it will be useful to some users.

@oharboe

oharboe commented Jan 15, 2026

Copy link
Copy Markdown
Collaborator Author

Great! Eagerly awaiting to switch to slang then. As you say there's a couple of things to fix for slang...

@oharboe oharboe reopened this Jan 15, 2026
@oharboe oharboe changed the title [FOR DISCUSSION] synth: improve canonicalization synth: improve canonicalization Jan 16, 2026
@oharboe
oharboe marked this pull request as ready for review January 16, 2026 06:23
@oharboe
oharboe force-pushed the yosys-canonicalization branch from 332e781 to 63f8fd7 Compare January 16, 2026 06:23
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe
oharboe force-pushed the yosys-canonicalization branch from 63f8fd7 to 77848ae Compare January 16, 2026 06:29
@oharboe
oharboe requested review from maliberty and povik January 16, 2026 06:29

@maliberty maliberty left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please advise when you switch and we can remove this

@maliberty
maliberty enabled auto-merge January 16, 2026 23:33
@oharboe

oharboe commented Jan 17, 2026

Copy link
Copy Markdown
Collaborator Author

@maliberty @vvbandeira Can someone restart the builds, CI outages...

@maliberty
maliberty merged commit e3465b1 into The-OpenROAD-Project:master Jan 17, 2026
5 checks passed
@oharboe
oharboe deleted the yosys-canonicalization branch January 18, 2026 05:46
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.

3 participants