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

Support partial assignment of Logic #500

Closed
mkorbel1 opened this issue Aug 2, 2024 · 0 comments · Fixed by #502
Closed

Support partial assignment of Logic #500

mkorbel1 opened this issue Aug 2, 2024 · 0 comments · Fixed by #502
Labels
enhancement New feature or request

Comments

@mkorbel1
Copy link
Contributor

mkorbel1 commented Aug 2, 2024

Motivation

There is now support for assignSubset of a LogicArray, which was a natural convenience automation. The idea of partial assignment for a Logic has been long-requested, but conceptually did not work with the modelling for signals in ROHD. However, with LogicArray support, there's a new opportunity to cleanly support it with a little automation.

Desired solution

Add a function assignSubset to Logic which creates a new bit-blasted LogicArray to drive that original Logic, then calls assignSubset on that new driver array. This gives a clean API and hides the dirty management of blasted drivers from the user.

Alternatives considered

Let users figure out their own automation via swizzle and or LogicArray as necessary.

Additional details

Related to #378, but separate

This approach is less efficient for multi-bit drivers since it blasts the whole intermediate into bits. A swizzle approach is more efficient in terms of simulation and will create nicer generated outputs. However, an API definition for varying width subset drivers, as well as a robust implementation, would be substantially more complicated. It would also require a "resolution" time for when to finally compress the signals into one swizzle, which doesn't play well with the rest of the connectivity APIs. Perhaps this could be revisited if #97 is ever supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant