3.6.3.30 SHLS-76

Message

Warning: (SHLS-76) Use of C numerics library function '{function}' on {location} may lead to an inefficient hardware implementation.

Although supported, C math library functions that are not optimized for hardware implementation may result in inefficient hardware output. An SHLS-76 message is generated for each occurrence to notify users of this issue.

/*****************************************************************
 *  This example is expected to result in
 *  - Code  : SHLS-76
 *  - Type  : Warning
 *  - Cause : C math library is used in hardware design code.
 *            This is to warn users about the potential for
 *            inefficient hardware output.
 *****************************************************************/
#include <math.h>

double DUT(double x) {
    #pragma HLS function top
    return exp(x);
}

Users are advised to check for SmartHLS Math Library that is optimized for hardware implementation with customizable arbitrary precisions.

Related to: Supported Operations in ap_[u]int, ap_[u]fixpt, and floating-point, FPGA HLS Math Library