Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement] [DSLX] priority_sel builtin should support a specified default value #1493

Open
ericastor opened this issue Jun 18, 2024 · 0 comments
Assignees
Labels
dslx:syntax Syntax changes to DSLX dslx DSLX (domain specific language) implementation / front-end enhancement New feature or request

Comments

@ericastor
Copy link
Collaborator

What's hard to do? (limit 100 words)

Currently, priority-select always uses a zero default value, restricting its use to Bits-typed inputs.

Current best alternative workaround (limit 100 words)

Even for Bits-typed inputs, using a nonzero default value requires adding another bit to the selector & manually setting it to the NOR of all the other bits, and adding a final case - and the result still puts a zero default-value in the circuit emitted unless codegen happens to prove that the selector is never zero.

For non-Bits-typed inputs, the only option is to use a select and map your selector to integer values.

Your view of the "best case XLS enhancement" (limit 100 words)

priority_sel should allow the user to specify a default value, or a version that does should be added.

@ericastor ericastor added enhancement New feature or request dslx DSLX (domain specific language) implementation / front-end dslx:syntax Syntax changes to DSLX labels Jun 18, 2024
@ericastor ericastor self-assigned this Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dslx:syntax Syntax changes to DSLX dslx DSLX (domain specific language) implementation / front-end enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant