B. Limitations of the Intel® HLS Compiler Standard Edition
Compiler support
- Linux compiler support
-
The HLS compiler does not support GCC 4.7.0 or newer. The compiler requires GCC compiler and C++ Libraries version 4.4.7.
- Windows compiler support
- The HLS compiler for Windows is compatible with Microsoft Visual Studio 2010 only.
C++ Language Restrictions
The Intel® HLS Compiler accepts C++ code.
For the best results when you synthesize your component, code your component function with C99.
- A component cannot include virtual functions, function pointers, or bit fields.
- Function-scoped static variables that are a part of the component cannot use function arguments for initialization.
- C++ restrictions
-
- The HLS compiler does not support certain C++ features such as initializer lists and lambda functions.
- Class membership
-
- HLS component functions cannot be a C++ class member. However, you can declare your component function as a wrapper function. This wrapper function can call a member function of a class or a part of a namespace.
- Exception handling
-
- A component cannot contain exception handling.
- Library calls
-
- The HLS compiler does not currently support calls to C++ runtime libraries on Windows, including calls from the testbench code.
- Library functions
-
- A component cannot contain standard C or C++ library functions, unless they are explicitly supported by header files provided with the Intel® HLS Compiler.
A component that contains printf() or cout calls works in its x86 implementation. However, the generated RTL does not include the printf() or cout function calls if you include the HLS/stdio.h library or the HLS/iostream standard C library functions provided with the Intel® HLS Compiler. If you try to generate RTL with the regular stdio.h or iostream headers you will likely experience compiler errors.
- A component cannot contain standard C or C++ library functions, unless they are explicitly supported by header files provided with the Intel® HLS Compiler.
- Multiple inheritance
-
- The HLS compiler does not support classes with multiple inheritance used as parameters. You may use classes as parameters provided that each class inherits from, at most, one class directly.
- Namespaces
-
- HLS component functions cannot be a part of a declared namespace. However, you can declare your component function as a global wrapper function. This wrapper function can call a member function of a class or a part of a namespace
- Overloading/Templates
-
- Templated functions or overloaded functions cannot be components. If you need a templated or overloaded function in your component, create a wrapper component and call the templated or overloaded function from the wrapper component.
- Parameters
-
- The HLS compiler does not support classes with multiple inheritance used as parameters. You may use classes as parameters as long as each class inherits from, at most, one class directly.
- Recursion
-
- The HLS compiler does not support the synthesis of components that use recursion; however, tail recursion is supported.
If a component has an algorithm that uses recursion, and it is identified for FPGA acceleration, modify the algorithm to use tail recursion, if possible.
- The HLS compiler does not support the synthesis of components that use recursion; however, tail recursion is supported.