pragma HLS top

Description

Attaches a name to a function, which can then be used with theset_topcommand 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 directive in an active solution, and then use theset_topcommand with the new name.

Syntax

Place the pragma in the C source within the boundaries of the required location.

#pragma HLS top name=

Where:

  • name=: Specifies the name to be used by theset_topcommand.

Examples

Functionfoo_long_nameis designated the top-level function, and renamed toDESIGN_TOP. After the pragma is placed in the code, theset_topcommand 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)