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
It would be nice to not lose abstraction when we pack typed Logics (like LogicStructures) into a LogicArray. This helper class gives us a new datatype that retains the type and still supports array operations.
Related Issue(s)
None.
Testing
Basic testing of the class.
Backwards-compatibility
Is this a breaking change that will not be backwards-compatible? If yes, how so?
No
Documentation
Does the change require any updates to documentation? If so, where? Are they included?
Yes, the ROHD API for LogicArray is extended to cover this class.
I'm wondering if we should convert LogicArray to derive from LogicArrayOf<Logic> and make sure that we really have only one base type and all methods and tests for LogicArray work to reduce the chance of duplicate code / bugs
I'm wondering if we should convert LogicArray to derive from LogicArrayOf and make sure that we really have only one base type and all methods and tests for LogicArray work to reduce the chance of duplicate code / bugs
That is a cool idea, I haven't looked deeply into your implementation yet but conceptually that sounds good
I tested this with PR #599, and it is compatible; we can create LogicArrayOf<LogicEnum>.
Now LogicArray is an extension of LogicArrayOf<Logic>, and we have flattening routines if we want to remove nesting that we may have created (added an outer flatten for LogicStructure as well). This gives us flexibility in composing more complex shapes and not having gaps in managing them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description & Motivation
It would be nice to not lose abstraction when we pack typed
Logics (likeLogicStructures) into aLogicArray. This helper class gives us a new datatype that retains the type and still supports array operations.Related Issue(s)
None.
Testing
Basic testing of the class.
Backwards-compatibility
No
Documentation
Yes, the ROHD API for
LogicArrayis extended to cover this class.