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

Fix subdivideIn(..., n bit) for corner cases #1051

Merged
merged 2 commits into from
Mar 18, 2023

Conversation

andreasWallner
Copy link
Collaborator

When splitting 8 into 5 the old algorithm would generate an inconsistent result with other cases as it would generate two slices of 4 bit. In most other cases subdivideIn would generate the expected width as long as possible, and have a smaller last element.

If this is actually expected behavior I'd update the documentation to mention it.

Closes #1049

Impact on code generation

None

Checklist

  • Unit tests were added

When splitting 8 into 5 the old algorithm would generate an inconsistent result
with other cases as it would generate two slices of 4 bit.
In most other cases subdivideIn would generate the expected width as long as
possible, and have a smaller last element.
@Dolu1990
Copy link
Member

Thanks :)

@Dolu1990 Dolu1990 marked this pull request as ready for review March 18, 2023 13:30
@Dolu1990 Dolu1990 merged commit f0f5e87 into SpinalHDL:dev Mar 18, 2023
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.

subdivideIn function gets wrong width of the slices
2 participants