Intel: Using the sqrt_fixed function provided for the ac_fixed data type in the Intel HLS Compiler will result in an error when the HLS Compiler runs for inputs greater than 32 bits.

HLS

Category: HLS
Tools: Intel® HLS Compiler
device:-

 

in the <Quartus® Prime installation>\hls\include\HLS/ac_fixed_math.h file

////////////////////////////////
* Function Name Input Limit
* sqrt_fixed W <= 32, undefined behavior for input value < 0
///////////////////////////////

It can be seen that W (input) is a specification that can only be used up to 32bit.

Therefore, when dealing with bit numbers larger than 32 bits, it is necessary to implement square root calculation processing by yourself instead of sqrt_fixed.

 

 

Experienced FAE
Free consultation is available.

From specific product specifications to parts selection, the Company FAE will answer your technical concerns free of charge. Please feel free to contact us.