google / google/xls

[enhancement] allow constexpr for fifo attribute parameters

Open
#4,360 0 comments 0 reactions 0 assignees View on GitHub
dslx enhancement
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 DSLX supports channel attributes like:
```dslx
#[channel(depth=2, fifo_wrapper=my_custom_fifo)]
let (tx, rx) = chan("my_channel");
```
but requires those parameter to be literals.

This make it hard to reuse / expose those constant to other part of the design or the testing infrastructure w/o creating duplication.

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

Duplicate the value as DSLX constant and rely on careful maintainance to keep them in sync.

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

It would be nice to have full support for constexpr for specifying those parameter, this would also allow for more complex calculation when those are derived from other micro-architecture parameters.

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.