UCLA-VAST / tapa

TAPA is a dataflow HLS framework that features fast compilation, expressive programming model and generates high-frequency FPGA accelerators.
https://tapa.rtfd.io
MIT License
144 stars 27 forks source link

Error: Illegal to use all zero replications in concat #132

Closed mvanbeirendonck closed 1 year ago

mvanbeirendonck commented 1 year ago

Using Vitis tools 2022.2 on Ubuntu 20.04, TAPA cosim is giving an error "illegal to use all zero replications in concat". The error is due to the following line:

https://github.com/UCLA-VAST/tapa/blob/68adeef65523394c1a057f4e35f5e1f68c6edd6c/backend/python/tapa/assets/verilog/fifo_srl.v#L67

I fixed this locally by changing this to:

if (out_ptr == REAL_DEPTH - {(REAL_ADDR_WIDTH-1){1'b0}, 2'd2})

And rebuilding from source.

On another note, is the Install from Source still up to date?

I encountered a few issues:

  1. when installing python3 -m pip install tapa/backend/python: FileNotFoundError: [Errno 2] No such file or directory: 'README.md'

  2. when istalling curl -L https://git.io/JuAxz | bash: E: Repository 'http://ppa.launchpad.net/lutris-team/lutris/ubuntu focal InRelease' changed its 'Label' value from 'Lutris stable' to 'lutris'

  3. Finally sudo ln -sf "${PWD}"/libtapa.{a,so} /usr/local/lib/: for me /usr/local/lib/ is not automatically in the linker path. It could be useful to add a warning about that?

mvanbeirendonck commented 1 year ago

Apologies, I am not sure what went wrong, but

 if (out_ptr == REAL_DEPTH - {{(REAL_ADDR_WIDTH-1){1'b0}}, 2'd2}) 

should be the correct syntax.

I am not sure what trigged the "illegal to use all zero replications in concat" previously, I can no longer reproduce it on my end.

Blaok commented 1 year ago

On another note, is the Install from Source still up to date?

I encountered a few issues:

  1. when installing python3 -m pip install tapa/backend/python: FileNotFoundError: [Errno 2] No such file or directory: 'README.md'

See https://github.com/UCLA-VAST/tapa/issues/23, could you try to update pip (python3 -m pip install pip --upgrade)?

I added a note in the doc.

  1. when istalling curl -L https://git.io/JuAxz | bash: E: Repository 'http://ppa.launchpad.net/lutris-team/lutris/ubuntu focal InRelease' changed its 'Label' value from 'Lutris stable' to 'lutris'

See https://github.com/lutris/agora/issues/7, I don't think this issue is caused by the FRT installation script. Can you try sudo apt update and see if that works?

  1. Finally sudo ln -sf "${PWD}"/libtapa.{a,so} /usr/local/lib/: for me /usr/local/lib/ is not automatically in the linker path. It could be useful to add a warning about that?

That's a good point, thanks! I personally never actually used this setup so never noticed this issue. Added a note in the doc.