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. As described in Vitis HLS Process Overview, the solution targets either the Vivado IP flow, or the Vitis Kernel flow. The default flow is the Vivado IP flow if no flow target is specified.
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
- Open another solution with the
delete_solution command to
remove a solution from the project and delete the corresponding sub-directory.
open_solution [OPTIONS] <name>
<name>specifies the solution name.Tip: You can specify both the project name and the solution name in order to use open_solution to open the project and solution in a single command:
-flow_target [vitis | 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.
This is the default flow when
-flow_targetis not specified.
- 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).
- 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.
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