vmcGenerate - vmcGenerate - 2023.2 English - UG1483

Vitis Model Composer User Guide (UG1483)

Document ID
UG1483
Release Date
2023-11-15
Version
2023.2 English

The vmcGenerate function provides a programmatic way to invoke the Vitis Model Composer code generator.

Syntax

status = vmcGenerate('modelName')

Description

vmcGenerate invokes the Vitis Model Composer code generator and returns a status code.

It is functionally equivalent to opening the Model Composer Hub block and clicking the Generate button.

vmcGenerate is a blocking function that returns 0 when code generation completes successfully. A non-zero return code indicates an error during code generation.

Example

To programmatically select the subsystem for which to generate code, you can use the vmchub_set_param function to set the SelectSubsystem property. For example:

vmchub_set_param('modelName/Vitis Model Composer Hub', 'modelName/DUT_ss',  'SelectSubsystem', 1);

Then call vmcGenerate:

status = vmcGenerate('modelName')