Skip to content

New LogicArrayOf datatype - #686

Open
desmonddak wants to merge 6 commits into
intel:mainfrom
desmonddak:feature/logic-array-of
Open

New LogicArrayOf datatype#686
desmonddak wants to merge 6 commits into
intel:mainfrom
desmonddak:feature/logic-array-of

Conversation

@desmonddak

@desmonddak desmonddak commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description & Motivation

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.

@mkorbel1

mkorbel1 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Note: we should consider how this interacts with Enums (#599)

@desmonddak

Copy link
Copy Markdown
Contributor Author

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

@mkorbel1

mkorbel1 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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

@desmonddak

desmonddak commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

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.

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