google / google/xls

[enhancement] priority_sel should support any cases type

Open
#1,729 3 comments 0 reactions 0 assignees View on GitHub
dslx enhancement 🧦 sox
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

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

currently `priority_sel` can only be used w/ scalar type (`uN`), see:
https://google.github.io/xls/dslx_std/#priority_sel

### Current best alternative workaround (limit 100 words)

using `one_hot` in combination w/ a `match` expression decoding the one_hot result and cases w/ arbitrary expression allow support for compound type like `struct`, `tuple` and `array`.

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

making `priority_sel` support arbitrary types in the case array.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.