You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
Motivation
There is now support for
assignSubset
of aLogicArray
, which was a natural convenience automation. The idea of partial assignment for aLogic
has been long-requested, but conceptually did not work with the modelling for signals in ROHD. However, withLogicArray
support, there's a new opportunity to cleanly support it with a little automation.Desired solution
Add a function
assignSubset
toLogic
which creates a new bit-blastedLogicArray
to drive that originalLogic
, then callsassignSubset
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 orLogicArray
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.
The text was updated successfully, but these errors were encountered: