3.6.3.28 SHLS-68, SHLS-69, SHLS-71 & SHLS-74
(Ask a Question)Message
Warning: (SHLS-68) The global variable '{variable}' uses an unsupported standard library '{class}' on {location}.
...
Warning: (SHLS-69) The return type of function '{function}' uses an unsupported standard library '{class}' on {location}.
...
Warning: (SHLS-71) The local variable '{variable}' in function '{function}' uses an unsupported standard library '{class}' on {location}.
...
Error: (SHLS-74) SmartHLS does not support C++ Standard Library usage in hardware functions.
SmartHLS does not support the use of the C++ Standard Library in hardware design code. If the C++ Standard Library is used, SmartHLS will generate a warning message for each instance: SHLS-68 for global variables, SHLS-69 for function return types, and SHLS-71 for local variables. After reporting all occurrences with these warning messages, SmartHLS will generate an SHLS-74 error message to abort the compilation process.
/***************************************************************** * This example is expected to result in * - Code : SHLS-68, SHLS-69, SHLS-71 & SHLS-78 * - Type : Error * - Cause : C++ standard library classes, which are not supported * by SmartHLS, are used. *****************************************************************/ #include <array> #include <queue> std::array<int, 3> arr = {1, 2, 3}; std::vector<int> DUT() { #pragma HLS function top std::queue<int> lv_queue; std::vector<int> result; for (int i = 0; i < arr.size(); i++) { lv_queue.push(i); result.push_back(i); arr[i] += i; } return result; }
Output
Warning: (SHLS-68) The global variable 'arr' uses an unsupported standard library 'struct.std::array' on line 11 of test.cpp.
Warning: (SHLS-69) The return type of function 'DUT' uses an unsupported standard library 'class.std::vector' on line 13 of test.cpp.
Warning: (SHLS-71) The local variable 'lv_queue' in function 'DUT' uses an unsupported standard library 'class.std::queue' on line 16 of test.cpp.
Error: (SHLS-74) SmartHLS does not support C++ Standard Library usage in hardware functions.
