[Backend] Support different quantization and overflow mode for fixed point
Opened this issue · 0 comments
chhzh123 commented
Currently we are using "wrap overflow mode + round zero quantization mode" for fixed point simulation (See the code snippet below).
https://github.com/cornell-zhang/heterocl/blob/95f3509a3df50c4e621f82a96ef10c0af388de48/python/heterocl/tensor.py#L321-L329
But we may need different quantization and overflow mode for different scenario, so we need to expose this API for users to select, and also generate correct code for both LLVM and HLS backend.
Based on the HLS manual, we have the following modes.