Vitis Model Composer Hub Block for AI Engine Code Generation - 2024.1 English

Vitis Model Composer User Guide (UG1483)

Document ID
Release Date
2024.1 English

An AI Engine model in Model Composer requires the addition of the Vitis Model Composer Hub block to configure compilation and generation of AI Engine output. For more details about adding the Model Composer Hub block into the design and associated features, refer to Vitis Model Composer Hub.

This section discusses only exporting an AI Engine design from Model Composer. For running and analyzing the generated AI Engine's code, refer to Verification of AI Engine Code.

The Model Composer Hub block settings specific to AI Engine compilation targets are shown in the following figures.

Figure 1. Model Composer Hub AI Engine Settings

Figure 2. Model Composer Hub AI Engine Export

Select the subsystem for which to generate code from the list on the left.

On the Settings tab, you can specify a cell array of AI Engine compiler options using the AIE Compiler Options edit button. This provides a method to control the compiler debug options, execution target options, file options and so on. Examples as follows:

  • To control the debug option log-levels, you can specify the string {'--log-level=5'} in the AIE Compiler Options field.
  • For issues related to the stack size or heap size in the downstream AI Engine flows, you can increase the size by adding --stacksize=<int> and --heapsize=<int> in the AIE Compiler options field.
On the Export tab, specify the desired Export Type and click Export.
Important: You can enable the Create testbench option to log the test data at input and output.

Model Composer displays the progress of code generation in the Progress window.

When Vitis Model Composer has completed exporting the design, it displays the status message Completed in the Progress window as shown in the following figure.

Figure 3. Done Code Generation