The vmcGenerate function provides a
programmatic way to invoke the Vitis Model
Composer code generator.
Syntax
status = vmcGenerate('modelName')
status = vmcGenerate('MyModel', 'MyModel_hubInfo.json')
status = vmcGenerate('MyModel', 'closeProgressWindow', 1)
[status, designInfo] = vmcGenerate('MyModel', ...)
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 Analyze, Validate, or Export buttons.
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 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 vmcGenerate.:
vmcGenerate('MyModel') generates
code using the settings of the Model Composer Hub block present in 'MyModel'.
[status, designInfo] = vmcGenerate('MyModel')
also gives an information struct for HDL designs. In the case of AIE and HLS this
struct is empty.
status = vmcGenerate('MyModel',
hubParams='MyModel_hubInfo.json') uses the settings from the JSON file
to generate code.
status = vmcGenerate('MyModel',
hubParams='MyModel_hubInfo.json',
targetSubsystem='MyModel/MySubsystem') selects the subsystem for which
to generate code.
status = vmcGenerate('MyModel',
closeProgressWindow=1) closes the progress window after the code
generation is done.
See Also
vmchub_get_param,vmchub_set_param, vmcGetHubParams,vmcAnalyze, vmcValidate, vmcExport, Vitis Model Composer Hub block.