open_solution

Description

Opens an existing solution or creates a new one in the currently active project. There can only be one active solution at any given time in a Vitis HLS session.

IMPORTANT: Attempting to open or create a solution when there is no open project results in an error.

Each solution is managed in a sub-directory of the current project. A new solution is created if the specified solution does not exist in the open project.

To close a solution:

  • Run the close_solution command, or
  • Open another solution with the open_solution command.

Use the delete_solution command to remove a solution from the project and delete the corresponding sub-directory.

Syntax

open_solution [OPTIONS] <name>
  • <name> specifies the solution name.

Options

-flow_target [vitis | vivado]
  • vitis

    Configures the solution for use in the Vitis application acceleration development flow. This configures the Vitis HLS tool to properly infer interfaces for the function arguments without the need to specify the INTERFACE pragma or directive, and to output the synthesized RTL code as a Vitis kernel object file (.xo).

  • vivado

    Configures the solution to run in support of the Vivado IP generation flow, requiring strict use of pragmas and directives, and exporting the results as Vivado IP.

-reset
  • Resets the solution data if the solution already exists. Any previous solution information on libraries, constraints, and directives is removed.
  • Also removes synthesis, verification, and implementation results.

Examples

Opens an existing solution named Solution_1 in the open project, or creates a new solution if one with the specified name does not exist. The solution is configured for creating kernel objects (.xo) for use in the Vitis tool flow.

open_solution -flow_target vitis Solution_1

Opens and resets the specified solution in the open project. Removes any existing data from the solution.

open_solution -reset Solution_2