UIUC-ChenLab / scalehls

A scalable High-Level Synthesis framework on MLIR
Other
217 stars 45 forks source link

Support for Arbitrary Fixed-Point Numbers #37

Open chhzh123 opened 2 years ago

chhzh123 commented 2 years ago

Hi, thanks for your excellent work to improve the scalability and performance of HLS, which is very helpful for hardware accelerator development.

After looking through your paper and code, I am wondering if there are any supports for arbitrary fixed-point numbers in ScaleHLS. I only found one test case involving a fixed integer in your repo (https://github.com/hanchenye/scalehls/blob/master/test/EmitHLSCpp/test_signature.mlir#L36). Though you have included the <ap_fixed> library in the generated C++ HLS code, it seems the fixed-point arithmetics have not been implemented in MLIR. Then how can users do quantization in ScaleHLS?

hanchenye commented 2 years ago

Hi @chhzh123, thanks for your interest! Unfortunately, currently ScaleHLS only supports the built-in types implemented in MLIR and cannot model the ap_fixed types of Xilinx. A related discussion happened here which you can refer to a bit.

chhzh123 commented 2 years ago

Thanks for your quick reply! The attached discussion is very helpful. I will stay tuned for the updates.