Skip to content

Ensure 2 bits for scale in po2 quantizers

Javier Duarte requested to merge github/fork/vloncar/po2_fix into master

Created by: vloncar

In a corner-case of using alpha=auto_po2 the computed number of bits for scale can be 1. This results in a creation of a 1-bit signed type (e.g., ap_int<1>). While Vivado compiler will still work with this type, on Quartus side the ac_int<1> will fail compilation. This change ensures that at least 2 bits are reserved for scale, avoiding the problem.

Merge request reports

Loading