xls icon indicating copy to clipboard operation
xls copied to clipboard

xls::dslx::ConvertOneFunction() fails to convert parametric functions

Open rw1nkler opened this issue 1 year ago • 2 comments

The xls::dslx::ConvertOneFunction docstring states that the parametric_env parameter can be used to provide bindings to use during conversion if the function is parametric. However, the function fails to convert parametric functions even when the correct parametric_env is passed to the conversion function.

Here is the branch showing this problem. One can run the example using:

$ bazel run  //xls/examples:convert_one_function
INFO: Analyzed target //xls/examples:convert_one_function (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //xls/examples:convert_one_function up-to-date:
  bazel-bin/xls/examples/convert_one_function
INFO: Elapsed time: 0.124s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/xls/examples/convert_one_function
Unable to convert one function: INTERNAL: Not enough symbolic bindings to convert function: foo; need {WIDTH} got {}

rw1nkler avatar Jan 09 '24 16:01 rw1nkler