diff --git a/src/finn/custom_op/fpgadataflow/hls/requant_hls.py b/src/finn/custom_op/fpgadataflow/hls/requant_hls.py index 61e7a277ee..7d5ce571c0 100644 --- a/src/finn/custom_op/fpgadataflow/hls/requant_hls.py +++ b/src/finn/custom_op/fpgadataflow/hls/requant_hls.py @@ -181,7 +181,7 @@ def docompute(self): float scaled = {compute_expr}; // Round to nearest integer and clip - int rounded = clip((int)hls::round(scaled), MIN_VAL, MAX_VAL); + int rounded = clip((int)hls::lrint(scaled), MIN_VAL, MAX_VAL); // Store output out_buf[p] = TO(rounded);