Specifying Constraints - 2024.1 English

Vitis Model Composer User Guide (UG1483)

Document ID
Release Date
2024.1 English

Constraints are user-defined properties for graph nodes which provide additional information to the compiler. Vitis Model Composer provides a mechanism to specify these constraints from within the kernel import or graph import blocks in the AI Engine library. During graph code generation, all these constraints automatically appear inside the graph code. The following figure shows the Constraints tab of the AIE Kernel block, highlighting the Open Constraints Editor button.

Figure 1. Constraints Tab

Clicking Open Constraints Editor opens the Vitis Model Composer Constraints dialog box. Here you can specify various constraints such as core utilization factor, kernel location, buffer location, stack/heap location, and size as shown in the following figure.

Figure 2. Model Composer Constraints Dialog Box

A similar constraints tab is available for all blocks in the AMD Toolbox/AI Engine/User-Defined Functions library and the constraint editor reflects the constraints available for that particular block. Adding these constraints will not affect Simulink simulation as they are only used for generating the graph code and AIE simulation.

When you open the constraints editor from any particular kernel/graph import block, the Model Composer Constraints dialog box allows you to specify the constraints for that particular kernel. However, you can switch between all the kernels/graphs available in your design from the navigation panel on the left side and specify the constraints accordingly as shown in the following figure. In this way, you can avoid opening each kernel/graph block separately to specify constraints.

Figure 3. Navigation Panel in Constraints Editor

The remainder of this section discusses the types of constraints that Vitis Model Composer supports.