Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add yosys optimizer pass #191

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Conversation

asraa
Copy link
Collaborator

@asraa asraa commented Oct 6, 2023

Part of #111

This adds a global yosys optimization on a program - it booleanizes the arithmetic circuit, and then converts it into LUTs from the comb dialect.

@asraa asraa force-pushed the yosys-optimizer branch 2 times, most recently from 36ca7d2 to e26b491 Compare October 13, 2023 17:38
@asraa asraa force-pushed the yosys-optimizer branch 2 times, most recently from 015cfe6 to fba4802 Compare October 16, 2023 21:08
@asraa asraa marked this pull request as ready for review October 16, 2023 21:09
@asraa asraa force-pushed the yosys-optimizer branch 2 times, most recently from 4d0b6b3 to e5a5383 Compare October 18, 2023 17:18
Copy link
Collaborator Author

@asraa asraa left a comment

Choose a reason for hiding this comment

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

Ready for review now!

I'm not 10000% sold on the env vars, only because it makes running as a bazel-bin binary one step harder, but that's not super high priority.

tools/heir-opt.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@j2kun j2kun left a comment

Choose a reason for hiding this comment

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

I know I left a bunch of comments, but I think this PR is very straightforward and easy to understand. Very well done!

include/Transforms/YosysOptimizer/YosysOptimizer.h Outdated Show resolved Hide resolved
lib/Transforms/YosysOptimizer/RTLILImporter.cpp Outdated Show resolved Hide resolved
tests/BUILD Outdated Show resolved Hide resolved
tests/lit.cfg.py Outdated Show resolved Hide resolved
tests/yosys_optimizer/micro_speech_for.mlir Show resolved Hide resolved
lib/Transforms/YosysOptimizer/YosysOptimizer.cpp Outdated Show resolved Hide resolved
lib/Transforms/YosysOptimizer/YosysOptimizer.cpp Outdated Show resolved Hide resolved
lib/Transforms/YosysOptimizer/YosysOptimizer.cpp Outdated Show resolved Hide resolved
lib/Transforms/YosysOptimizer/YosysOptimizer.cpp Outdated Show resolved Hide resolved
lib/Transforms/YosysOptimizer/YosysOptimizer.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@j2kun j2kun left a comment

Choose a reason for hiding this comment

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

LGTM!

@j2kun j2kun added the pull_ready Indicates whether a PR is ready to pull. The copybara worker will import for internal testing label Oct 20, 2023
@asraa asraa force-pushed the yosys-optimizer branch 5 times, most recently from 7fd6185 to 99ccfd1 Compare October 26, 2023 20:31
Signed-off-by: Asra Ali <[email protected]>
@copybara-service copybara-service bot merged commit aa8d5df into google:main Oct 31, 2023
3 of 4 checks passed
@j2kun
Copy link
Collaborator

j2kun commented Oct 31, 2023 via email

@asraa
Copy link
Collaborator Author

asraa commented Oct 31, 2023

I know! one step closer :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull_ready Indicates whether a PR is ready to pull. The copybara worker will import for internal testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants