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

[When] Split when blocks with cycles #1309

Merged
merged 23 commits into from
Sep 22, 2023
Merged

[When] Split when blocks with cycles #1309

merged 23 commits into from
Sep 22, 2023

Conversation

leonardt
Copy link
Collaborator

Fixes #1269

Adds a pass that splits when blocks with a cyclic dependency.

Note the generated verilog can have empty blocks since some of the assignments are being emitted in a split block, but this seems to be okay for verilator. Since this is likely to be an uncommon case, I don't think we should worry too much about trying to cleanup the generated verilog.

@leonardt leonardt marked this pull request as ready for review August 17, 2023 23:08
@codecov-commenter
Copy link

codecov-commenter commented Aug 17, 2023

Codecov Report

Patch coverage: 97.19% and project coverage change: +0.17% 🎉

Comparison is base (382edd3) 85.90% compared to head (00f0a7f) 86.08%.
Report is 81 commits behind head on fix-1253.

❗ Current head 00f0a7f differs from pull request most recent head c1b119d. Consider uploading reports for the commit c1b119d to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##           fix-1253    #1309      +/-   ##
============================================
+ Coverage     85.90%   86.08%   +0.17%     
============================================
  Files           164      170       +6     
  Lines         17637    17818     +181     
============================================
+ Hits          15151    15338     +187     
+ Misses         2486     2480       -6     
Files Changed Coverage Δ
magma/backend/mlir/build_magma_graph.py 93.00% <ø> (+0.19%) ⬆️
magma/backend/mlir/common.py 95.83% <ø> (+2.08%) ⬆️
magma/backend/mlir/hw.py 98.56% <50.00%> (ø)
magma/backend/mlir/translation_unit.py 91.60% <50.00%> (-0.65%) ⬇️
magma/array.py 89.29% <75.00%> (-0.22%) ⬇️
magma/tuple.py 89.87% <87.50%> (+0.39%) ⬆️
magma/primitives/when.py 96.04% <90.32%> (-1.95%) ⬇️
magma/mantle/counter.py 96.66% <96.66%> (ø)
magma/__init__.py 93.05% <100.00%> (+0.09%) ⬆️
magma/backend/mlir/compile_to_mlir_opts.py 100.00% <100.00%> (ø)
... and 16 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leonardt leonardt changed the base branch from master to fix-1253 August 21, 2023 22:17
tests/test_when.py Outdated Show resolved Hide resolved
tests/test_when.py Outdated Show resolved Hide resolved
tests/test_when.py Outdated Show resolved Hide resolved
tests/test_when.py Outdated Show resolved Hide resolved
tests/test_when.py Outdated Show resolved Hide resolved
magma/when.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@rsetaluri rsetaluri left a comment

Choose a reason for hiding this comment

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

Final minor comment

magma/passes/split_when_utils.py Outdated Show resolved Hide resolved
@rsetaluri rsetaluri merged commit 512c7e1 into fix-1253 Sep 22, 2023
2 of 4 checks passed
@rsetaluri rsetaluri deleted the fix-alwcomb-order branch September 22, 2023 22:42
rsetaluri added a commit that referenced this pull request Sep 22, 2023
@rsetaluri rsetaluri restored the fix-alwcomb-order branch September 22, 2023 22:44
rsetaluri added a commit that referenced this pull request Sep 23, 2023
@rsetaluri rsetaluri deleted the fix-alwcomb-order branch September 23, 2023 03:04
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.

[MLIR] Bug in always comb ordering
3 participants