xls icon indicating copy to clipboard operation
xls copied to clipboard

Compiler bug when generating SRAM blocks using a `for` statement

Open joonho3020 opened this issue 1 year ago • 3 comments

Describe the bug A clear and concise description of what the bug is.

Compiler errors out when trying to run functional simulation for a fairly complex block.

To Reproduce Steps to reproduce the behavior:

  • Follow the XLS setup instructions for Ubuntu 2024
  • Git clone my XLS fork
  • Run bazel run -- //xls/modules/snappy:snappy_decomp_test --alsologtostderr --compare=none

Expected behavior A clear and concise description of what you expected to happen.

Simulation runs. However I get a compile error here : error source

If I hand unroll the above loop, I can run simulations without errors, so I'm assuming that this is a frontend compiler bug.

Screenshots If applicable, add screenshots to help explain your problem.

https://github.com/joonho3020/xls/blob/1ab579996fabd05a39b35818ce71ad2e56b21f8f/xls/modules/snappy/command_executer.x#L103

Environment (this can be helpful for troubleshooting):

  • OS: [e.g. Ubuntu]
  • Versions [e.g. 22.04]

Additional context Add any other context about the problem here.

joonho3020 avatar Jun 11 '24 19:06 joonho3020

Same comment like https://github.com/google/xls/issues/1469#issuecomment-2161463089 applies here.

Can you provide a reproducible example that runs against the head of the main repository not your personal fork ?

hzeller avatar Jun 11 '24 19:06 hzeller

Same as #1469 : would it make is easier if I PR the module in the XLS repo?

joonho3020 avatar Jun 11 '24 23:06 joonho3020

@joonho3020 can you try to use https://bit.ly/xls-playground to reproduce the error?

proppy avatar Jun 13 '24 09:06 proppy