-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example of DSLX design parameterization based on proto files #1183
Add example of DSLX design parameterization based on proto files #1183
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding this, left some preliminary comments.
@hongted, I don't think we have an equivalent of this yet? (afaik we mainly rely on genrules
for this internally)
1f40868
to
63dad6f
Compare
63dad6f
to
36ed4d4
Compare
Removed |
36ed4d4
to
172cfe9
Compare
172cfe9
to
330c2e0
Compare
330c2e0
to
9e27804
Compare
24b2da6
to
3dec337
Compare
Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
This example showcases the usage of proto_to_dslx tool in DSLX design parameterization. It defines a protobuf message containing design parameters: * input width, * output width A textproto file with a variant of the design is provided. Textproto file can be converted to DSLX file which is then imported by top-level design in order to use the parameters. The design itself has 2 inputs and one output. The widths of those are controlled by parameters. Verilog file for the variant can be generated with: ``` bazel build //xls/examples/parameterized:design_verilog ``` Signed-off-by: Pawel Czarnecki <pczarnecki@antmicro.com>
This example showcases the usage of proto_to_dslx tool in DSLX design parameterization. It defines a protobuf message containing design parameters:
Two textproto files with different variants of the design are provided. Each textproto file can be converted to DSLX file which is then imported by top-level design in order to use the parameters.
The design itself has 2 inputs and one output. The widths of those are controlled by parameters.
In order to provide single import path in top DSLX file custom configuration setting 'design_variant' was provided. It is used to select the design variant from bazel command line.
Verilog files for the variants can be generated with:
and:
@proppy In this example I wanted to explore your suggestion from #1160 (comment), please take a look.