Skip to content

Type-preserving Mux and SwitchValue - #203

Merged
tilk merged 8 commits into
kuznia-rdzeni:masterfrom
tilk:type-preserving-mux
Jul 27, 2026
Merged

Type-preserving Mux and SwitchValue#203
tilk merged 8 commits into
kuznia-rdzeni:masterfrom
tilk:type-preserving-mux

Conversation

@tilk

@tilk tilk commented Jul 22, 2026

Copy link
Copy Markdown
Member

SwitchValue and Mux in Amaranth always return Values, which isn't good when working with higher level representations. But they are convenient! This PR adds switch_value and mux, which preserve data, enums and other ShapeCastables.

TODO:

  • Look into better stubs for enums, again

@tilk tilk added the enhancement New feature or request label Jul 22, 2026
@tilk
tilk force-pushed the type-preserving-mux branch from 9fb2f85 to f5963c3 Compare July 22, 2026 12:16
@tilk
tilk marked this pull request as ready for review July 24, 2026 12:58
Comment thread transactron/utils/amaranth_ext/functions.py Outdated
@tilk
tilk merged commit c2a6261 into kuznia-rdzeni:master Jul 27, 2026
3 checks passed
github-actions Bot pushed a commit that referenced this pull request Jul 27, 2026
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 this pull request may close these issues.

2 participants