pragma HLS top
Description
Attaches a name to a function, which can then be used with the set_top
command to synthesize the function and any functions called from the specified top-level.
This is typically used to synthesize member functions of a class in C/C++.
Specify the pragma in an active solution, and then use the set_top
command with the new name.
Syntax
Place the pragma in the C source within the boundaries of the required location.
#pragma HLS top name=<string>
Where:
name=<string>
: Specifies the name to be used by theset_top
command.
Examples
Function foo_long_name
is designated the top-level function, and renamed to
DESIGN_TOP
. After the pragma is placed in the code, the
set_top
command must still be issued from the Tcl command line, or from
the top-level specified in the GUI project settings.
void foo_long_name () {
#pragma HLS top name=DESIGN_TOP
...
}
set_top DESIGN_TOP
See Also
- Vivado Design Suite User Guide: High-Level Synthesis (UG902)