vmcAnalyze - 2024.1 English

Vitis Model Composer User Guide (UG1483)

Document ID
Release Date
2024.1 English

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


status = vmcAnalyze('modelName')
status = vmcAnalyze('MyModel', 'MyModel_hubInfo.json')
status = vmcAnalyze('MyModel', 'closeProgressWindow', 1)
[status, designInfo] = vmcAnalyze('MyModel', ...)


vmcAnalyze 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 Analyze button.

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


To programmatically select the subsystem on which to operate, 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 vmcAnalyze.:

vmcAnalyze('MyModel') uses the settings of the Model Composer Hub block present in 'MyModel'.

[status, designInfo] = vmcAnalyze('MyModel') additionally gives an information struct for HDL designs. In the case of AIE and HLS this struct will be empty.

status = vmcAnalyze('MyModel', 'MyModel_hubInfo.json') uses the settings from the JSON file to generate code.

status = vmcAnalyze('MyModel', 'closeProgressWindow', 1) will close the progress window after the code generation is done.

See Also

vmchub_get_param, vmchub_set_param, vmcGenerate, vmcValidate, vmcExport, Vitis Model Composer Hub block.