[enhancement] [DSLX] priority_sel
builtin should support a specified default value
#1493
Labels
dslx:syntax
Syntax changes to DSLX
dslx
DSLX (domain specific language) implementation / front-end
enhancement
New feature or request
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.The text was updated successfully, but these errors were encountered: