google / google/xls

Programmatic sweeps of parameterized DSLX tops

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

Description

Currently, ir conversion requires the top to be unparameterized. This can make doing parametric sweeps painfully manual or require the use of external template-style hacks.

Ideally, IR conversion would have a mechanism to pre-populate the parametric environment for the top proc. This would require some way to represent DSLX values that a commandline tool can handle (it seems like a proto format for DSLX parametric values would be needed in the general case, e.g. parameters that have aggregate types). Proc state init already has a format, perhaps that would be sufficient (however, I think this is IR level rather than DSLX).

In addition to sweeps, sometimes it's convenient to codegen a library function/proc directly, e.g. `Ram1RW<32, 1024>`, without making a new file or adding to a library. The SRAM flow #861 may need to do something like this as part of lowering passes.

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.