3.6.3.39 SHLS-89
(Ask a Question)Message
Error: (SHLS-89) SW/HW co-simulation could not determine the number of function calls for top-level function '{function}'.
Please ensure the top-level function is called by the software testbench.
The example below can have RTL successfully generated by SmartHLS. However, for SW/HW co-simulation support in SmartHLS, all top-level functions must be invoked by the software testbench code.
/***************************************************************** * This example is expected to result in * - Code : SHLS-89 * - Type : Error * - Command : SW/HW Co-Simulation (shls cosim) * - Cause : Top-level function that is not invoked by software * code is detected during co-simulation preparation. *****************************************************************/ int DUT_1(int a, int b) { #pragma HLS function top return a + b; } // DUT_2 is top-level function but not used by software code int DUT_2(int a, int b) { #pragma HLS function top return a * b; } int main() { int r = DUT_1(1, 2); return r != 3; }
