google / google/xls

[enhancement] Add runtime-constant values & channels

Open
#1,653 1 comment 0 reactions 0 assignees View on GitHub
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)

Accept values from "configuration registers" and reference them in your circuit. These are values that can be assumed not to change between resets.

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

In DSLX: Nothing great. The values can be sent through a normal channel, with the other end wired to always be ready and expose the value inside the configuration register on the data line. However, this makes the DSLX block unnecessarily complex.

In XLS IR: We can use single-value channels, but their behavior is underspecified & often implies aspects of state that we don't want.

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

Add a new type of channel that passes along values that do not change between resets ("param" channels? "const" channels?). This would need to be exposed in DSLX via some way to express that the value is runtime-constant, but not known at compile time.

It should also be possible to forward these values - or to send derived values - along this same type of runtime-constant channel between XLS procs.

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.