Skip to content

Typed operations - #704

Open
desmonddak wants to merge 7 commits into
intel:mainfrom
desmonddak:typed_operations
Open

Typed operations#704
desmonddak wants to merge 7 commits into
intel:mainfrom
desmonddak:typed_operations

Conversation

@desmonddak

@desmonddak desmonddak commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description & Motivation

Our ROHD operations flatten attached structured signals, LogicArray and LogicStructure to Logic, and we lose abstraction. This is especially noticeable when composing modules that share these structured types, and it shows up when we netlist or produce other outputs that could retain this structure.

Really, a Mux can be interpreted as a Mux<T> where the baseline case is Mux<Logic>. We know the data input is the actual type, and so we can even infer the output type. Tricky cases exist when we pass in Const, so those need careful handling.

Note that this also needs to handle the new LogicArrayOf type, so this PR is based on PR #686.

This PR also has support for Const LogicStructure to support fixing ROHD-HCL Issue#200.

Related Issue(s)

Testing

All existing tests pass. Several new tests, including some changes to the netlister, help validate this approach.

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. Changes were added to mentions of the operators and in the LogicStructure and LogicArray areas.

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.

1 participant