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

Disallow assignment to op results, including bit slices #698

Merged
merged 1 commit into from
Sep 27, 2017

Conversation

ducky64
Copy link
Contributor

@ducky64 ducky64 commented Sep 27, 2017

Assigning to the result of a bit slice now errors out in Chisel instead of propagating to FIRRTL.
A similar check is also performed for bulk-connect, but won't catch all cases as it is performed before sinks and sources are resolved.

Fix for #399. The error text isn't perfect (just says "Cannot reassign to read-only $this"), but at least you get a line number which should narrow down the issue. With a richer set of bindings (like a BitExtractBinding) it may be possible to generate a more specific error message (like "Cannot reassign to $this, bit extract results are read-only")

Copy link
Contributor

@edwardcwang edwardcwang left a comment

Choose a reason for hiding this comment

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

Looks good to me, maybe Jack has other comments

Copy link
Contributor

@jackkoenig jackkoenig left a comment

Choose a reason for hiding this comment

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

LGTM. Nice work!

@ducky64 ducky64 merged commit e2c5c12 into master Sep 27, 2017
@edwardcwang edwardcwang deleted the bitslicenoassign branch March 15, 2019 20:01
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