google / google/xls

[enhancement] IR/Verilog generation from parameterizable procs with Bazel rules

Open
#1,367 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)

Generating IR/Verilog out of a parameterizable proc is not possible when using Bazel rules

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

Currently, it is necessary to create a Proc that spawns a parameterizable proc with specific parameters. This Proc must then be passed to code generation (see https://github.com/google/xls/issues/998#issue-1732305331)

However, since the wrapping Proc typically does not utilize channels (which are instead directly passed to the parameterized proc), the proc is usually removed during optimization. This results in either an almost empty Verilog module or issues with code generation. To address this problem, another workaround is required: marking the spawned proc as a `top` for the IR optimization step. This has been described in detail in https://github.com/google/xls/issues/869#issuecomment-1867575576

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

Expose attributes to specify parameters of the parameterizable procs in Bazel rules, and enable their usage by IR/Verilog generation tools. This can reduce the need for additional workarounds mentioned earlier without the need for proc-scoped channels that are under development. Even after introducing them, the proposed enhancement could be a valuable addition.

Related issues:
* https://github.com/google/xls/issues/890
* https://github.com/google/xls/issues/998

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.