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

rtlil: Fix addShiftx for signed shifts #4467

Merged
merged 1 commit into from
Jun 26, 2024
Merged

Conversation

povik
Copy link
Member

@povik povik commented Jun 21, 2024

What are the reasons/motivation for this change?

This fixes the helper creating invalid RTLIL when called with is_signed set to true.

See here from the commit message:

Only the B input (the shift amount) can be marked as signed on a $shiftx cell. Adapt the helper accordingly and prevent it from creating invalid RTLIL when called with is_signed set. Previously it would mark both A and B as signed.

If applicable, please suggest to reviewers how they can test the change.

There's no way to test this without writing external code, I think.

Only the `B` input (the shift amount) can be marked as signed on a
`$shiftx` cell. Adapt the helper accordingly and prevent it from
creating invalid RTLIL when called with `is_signed` set. Previously
it would mark both `A` and `B` as signed.
@povik povik marked this pull request as ready for review June 21, 2024 13:16
Copy link
Collaborator

@widlarizer widlarizer left a comment

Choose a reason for hiding this comment

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

This matches the constraint set by the internal cell checker

@povik povik merged commit 07daf61 into YosysHQ:main Jun 26, 2024
21 checks passed
@povik povik deleted the fix-add-shiftx branch June 26, 2024 16:17
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.

2 participants