Creating an HLS Component - 2023.1 English

Vitis Unified IDE and Common Command-Line Reference Manual (UG1553)

Document ID
UG1553
Release Date
2023-07-17
Version
2023.1 English

There are a number of ways to create an HLS component in the new Vitis IDE. The following steps describe a recommended approach. For a description of the views and pages mentioned in the steps below refer to Working with the Vitis Unified IDE.

  1. With the Vitis IDE opened, from the main menu select File > New Component > HLS.

    Tip: You can also select the New Component command from the Welcome page, or from the right-click menu in the Explorer view.
  2. This opens the Choose Name and Location page of the Create HLS Component wizard as shown below.

    Figure 1. Create HLS Component - Name and Location

    Enter a Component name and Component location and select Next.

  3. This opens the Configuration File page of the wizard as shown below.

    Figure 2. Create HLS Component - Configuration File

    The Configuration File page of the Create HLS Component wizard provides three ways to add a configuration file to your component:

    • Empty File: Specifies the creation of a new empty configuration file to be populated after component creation as described in Defining the HLS Config File. Selecting this option lets you specify a name in the New configuration file name field.
    • Existing File: Specifies the use of an existing configuration file. Selecting this option lets you enter the path and name in the File field, or select Browse to locate the file.
    • Generate from Vitis HLS Project: This option generates a new config file from an existing Vitis HLS project hls.app file. The tool lets you identify the hls.app file and enter a New configuration file name for the config file generated from the hls.app file.

    Choose the method of adding the config file to your HLS component, and specify a name or files as needed. Select Next to proceed to the Source Files.

  4. The Source Files page of the wizard opens as shown below.

    Figure 3. Create HLS Component - Source Files

    Under Design Files you can you can select Add files to select the primary source file for the design, or add multiple files as needed. After adding one or more source files, you can identify the Top Function which is the function to be synthesized as the top-level function for the HLS component. Any functions called by the top-function will also be synthesized into RTL.

    Under Test Bench Files you can select Add files or select Add folders to add files containing test bench and associated files for the HLS component.

    For both design files and test bench files you can add CFLAGS and CSIMFLAGS to specify directives to be used during compilation and simulation. You can specify directives to be applied to all files or to specific files from each category. After adding files and folders and directives, select Next to proceed.

  5. The Select Part page of the wizard is opened as shown below.

    Figure 4. Create HLS Component - Part

    Select the Part or select the Platform for the HLS component and select Next to proceed.

  6. This displays the Settings page of the wizard as shown below.

    Figure 5. Create HLS Component - Settings

    The Settings page lets you specify the target output of the HLS component build process as being either a Vivado IP or a Vitis kernel as described in Flow Overview. The interface requirements of the Vivado IP or a Vitis kernel are different, as explained in Interfaces of the HLS Design.

    Below the Target Flow radio button there is a check box labeled Run Additional Packaging Step to Create Output. This check box lets you enable the output.format of the HLS component to produce the required output for the target flow. By default the output.format is set to RTL to let you do design exploration without having to produce the output IP or XO files needed for downstream processes. Having the default as RTL can save some time on each design iteration, but can result in some confusion in later steps when the output IP or XO is required. Enabling the output.format from the start consumes a little more time in the iterations, but can avoid later confusion. The choice is yours.

    The Settings page also lets you define Clock Period and Uncertainty to change the default values. The default clock period of 10ns, and the default clock uncertainty is 27% of the period.

    Select Next to proceed to the Summary page.

  7. The Summary page reflects the choices you have made on the prior pages. Review the summary and select Finish to create the HLS component, or select Back to return to earlier pages and change your selections.

When the HLS component is created the vitis-comp.json file for the component is opened in the central editor window, and the HLS component becomes active in the Flow Navigator as shown below.

Tip: When multiple HLS components are opened, the component name appears in the tab alongside the vitis-comp.json file name to help you identify the different components.
Figure 6. HLS Component - vitis-comp.json

After creation, the HLS component becomes the active component in the Flow Navigator, or you can select the Component to make it the active component in the tool. When the HLS component is the active component, the Flow Navigator enables running C Simulation, C Synthesis, C/RTL Co-simulation, and Implementation as shown in the following image.

Figure 7. HLS Component - Flow Navigator

To manage the actions of these steps however, you will need to edit the HLS config file to achieve your design objectives as described below.