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

pysim: Run mask on Mux selection operand. #544

Merged
merged 2 commits into from Nov 14, 2020

Conversation

mwkmwkmwk
Copy link
Contributor

Otherwise it behaves funny when it's eg. the result of operator ~.

@codecov
Copy link

codecov bot commented Nov 14, 2020

Codecov Report

Merging #544 (79a55fc) into master (adef3b2) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #544   +/-   ##
=======================================
  Coverage   81.43%   81.43%           
=======================================
  Files          49       49           
  Lines        6464     6464           
  Branches     1290     1290           
=======================================
  Hits         5264     5264           
  Misses       1010     1010           
  Partials      190      190           
Impacted Files Coverage Δ
nmigen/sim/_pyrtl.py 95.80% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update adef3b2...79a55fc. Read the comment docs.

Copy link
Member

@whitequark whitequark left a comment

Choose a reason for hiding this comment

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

The change is correct (good catch!)

Could you add a test?

Otherwise it behaves funny when it's eg. the result of operator ~.
@mwkmwkmwk
Copy link
Contributor Author

Added a test; It seems we should have all operators go through similar treatment though, to avoid similar problems.

@whitequark
Copy link
Member

whitequark commented Nov 14, 2020

It seems we should have all operators go through similar treatment though, to avoid similar problems.

The original idea was to use self(x) rather than mask(x) where it's safe to do so as an optimization. But it keeps backfiring...

@whitequark whitequark merged commit 4431814 into amaranth-lang:master Nov 14, 2020
@mwkmwkmwk mwkmwkmwk deleted the mwk/mux-fix branch November 14, 2020 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants