Visible to Intel only — GUID: uwh1573055229974
Ixiasoft
Visible to Intel only — GUID: uwh1573055229974
Ixiasoft
3. Creating a High-Level Synthesis Component and Testbench
While the compiler supports C++98, you can often achieve better component performance by using the supported subset of C99 whenever possible. The compiler is capable of synthesizing some C++ constructs, which might be easier for you to use to create cleaner code.
For more information about the supported subset of C99 and its restrictions, see "Supported C and C++ Subset for Component Synthesis" in Intel® High Level Synthesis Compiler Standard Edition Reference Manual.
You can identify a function in your C++ application that you want to synthesize into an IP core in one of the following ways:
- Insert the component keyword in the source code before the top-level C++ function to be synthesized.
- Specify the function on the command line by using the --component <component_list> option of the i++ command.
To use this option, your component must be configured with C-linkage using the extern "C" specification. For example:
extern "C" int myComponent(int a, int b)
Components are synthesized for all functions labeled with the component keyword and all for all components listed in the --component <component_list> option of the i++ command. Avoid combining these methods because you might unexpectedly synthesize unwanted components.
If you do not want components synthesized for a function, ensure that you do not have the component attribute specified in the function and ensure that the function is not specified in the --component <component_list> option of the i++ command.
You can see which components were synthesized in the Area Analysis by Source section of the high-level design report ( <name>.prj/reports/report.html). For more information about the high-level design report, see The Intel HLS Compiler High-Level Design Reports (report.html).
The HLS compiler creates an executable to run on the CPU. The compiler then sends any calls to functions that you declared as components to simulation of the synthesized IP core, and the simulation results are returned.