3.6.3.37 SHLS-85

Message

Error:   (SHLS-85) No top-level function specified. Please specify '#pragma HLS function top' to the top-level function that you want SmartHLS to synthesize.
/*****************************************************************
 *  This example is expected to result in
 *  - Code  : SHLS-85
 *  - Type  : Error
 *  - Cause : No top-level function is detected from input design.
 *****************************************************************/
int DUT(int a, int b) {
    return a + b;
}

int main() {
    int r = DUT(1, 2);
    return r != 3;
}

Assume DUT() is the designated top-level function, users are advised to place #pragma HLS function top as the first line within the function body.

Related to: Set Top-Level Function