Running the Helper Function - 2025.2 English - UG1483

Vitis Model Composer User Guide (UG1483)

Document ID
UG1483
Release Date
2025-11-20
Version
2025.2 English

Create a new custom compilation target by running the following helper function.

xilinx.environment.addCompilationTarget(target_name, directory_name)

For example, consider the following command:

xilinx.environment.addCompilationTarget('Impl', 'U:\demo')
Figure 1. Helper Function

When you enter this command in the MATLAB Command Window as shown above, the following happens:

  1. MATLAB creates a folder named Impl/@Impl in U:\demo.
  2. Inside the folder, a template class file Impl is created (Impl.m). This derives from the base class xilinx_compilation. At this point, if you leave the file unchanged, the newly created Impl compilation target acts the same as the HDL Netlist compilation target. The following figure shows the content of the Impl.m file.

  3. The helper function then adds U:\demo\Impl to the MATLAB path, so that the new class Impl can be discovered by MATLAB.
Note: Be aware that the target_name cannot contain spaces. After creating the class, you can add spaces to the target_name property of the class.