Vitis Model Composer Hub - 2022.1 English - UG1483

Vitis Model Composer User Guide (UG1483)

Document ID
UG1483
Release Date
2022-05-26
Version
2022.1 English

Control implementation of the model.

Description

The Vitis Model Composer Hub block controls the behavior of the Vitis Model Composer tool.

You can specify the targeted design flow for the generated output, the directory path for the output, and the desired device and design clock frequency using the following tabs.

  • The Target pane helps with device or board selection.
  • The AI Engine pane specifies options that control the AI Engine code generation flow.
  • The HDL pane specifies options that control the HDL code generation flow. (These options are same as the legacy System Generator Token.)
  • The HLS pane specifies options that control the HLS code generation flow.
  • The Hardware Flow pane specifies options required for validating the design on the hardware.
  • The Generate pane provides options to select the output flow by selecting subsystems and specifying Code directory.

Library

AI Engine/Tools; HLS/Tools; Utilities/Code Generation.


Generated by Your Tool

Data Type Support

Data type support is not applicable to the Vitis Model Composer Hub block.

Parameters

Figure 1. Vitis Model Composer Hub Block Parameters

The following section describes the configurable options available in each pane of the Vitis Model Composer Hub block.

Target
Select Hardware:
  • Clicking the browse button () displays the Device Chooser dialog box. This allows you to select a part, board, or platform to which your design is targeted. Vitis Model Composer obtains board and device data from the Vivado database.
AI Engine
Target Subsystem:
  • Select the subsystem name from the drop-down menu that needs to be targeted for AI Engine code generation.
AI Engine/Settings
Compiler options:
  • When enabled, this option provides control over compiler debug options, execution target options etc.
Create testbench:
  • When enabled, Vitis Model Composer generates the test vectors while generating the code.
Run AIE Simulation:
  • This option is only available if Create testbench is selected. When enabled, it runs the AIE simulation after code generation.
Simulation timeout (cycles):
  • When enabled, it specifies the number of cycles for which AIE simulation is run. The default value is 50000.
Plot AIE Simulation output and estimate throughput:
  • When enabled, this option logs simulation data and allows visualization of the output of an AI Engine subsystem.
Collect profiling statistics and enable 'printf' for debugging:
  • When enabled, this option allows profiling data to be collected for analysis.
Collect data for Vitis Analyzer:
  • When enabled, this option provides a summary of the simulation results which can be viewed in the Vitis Analyzer. Open Vitis Analyzer: Click to invoke the Vitis Analyzer tool. This option is only enabled after AIE Simulation has been ran at least once after enabling
HDL
Target Subsystem:
  • Select the subsystem name from the drop-down menu that needs to be targeted for HDL code generation.
HDL/Settings
Compilation Type::
  • Specifies the type of compilation result that should be produced when the code generator is invoked. The default compilation type is IP Catalog.
    The Settings button is activated when one of these compilation types is selected:
    • IP Catalog compilation: The Settings button brings up a dialog box that allows you toadd a description of the IP that will be placed in the IP catalog.
    • Hardware Co-Simulation (JTAG) compilation: The Settings button brings up a dialog box that allows you to use burst data transfers to speed up JTAG hardware co-simulation.
Hardware Description:
  • Specifies the HDL language to be used for compilation of the design. The possibilities are VHDL and Verilog.
VHDL library:
  • Specifies the name of VHDL work library for code generation. The default name is xil_defaultlib.
Use STD_LOGIC type for Boolean or 1 bit wide gateways:
  • If your design's Hardware Description Language (HDL) is VHDL, selecting this option will declare a Boolean or 1-bit port (Gateway In or Gateway Out) as a STD-LOGIC type. If this option is not selected, Vitis Model Composer will interpret Boolean or 1-bit ports as vectors.
    Note: When you enable this option and try to run Generate code and Run behavioral simulation in Vivado, you may see a failure during the elaboration phase.
Synthesis strategy:
  • Choose a Synthesis strategy from the pre-defined strategies in the drop-down list.
Implementation strategy:
  • Choose an Implementation strategy from the pre-defined strategies in the drop-down list.
Create testbench:
  • This instructs Vitis Model Composer to create an HDL test bench. Simulating the test bench in an HDL simulator compares Simulink simulation results with ones obtained from the compiled version of the design. To construct test vectors, Vitis Model Composer simulates the design in Simulink, and saves the values seen at gateways. The top HDL file for the test bench is named <name>_testbench.vhd/.v, where <name> is a name derived from the portion of the design being tested.
    Note: Testbench generation is not supported for designs that have gateways (Gateway In or Gateway Out) configured as an AXI4-Lite Interface
HDL Clocking
FPGA clock period (ns):
  • Defines the period in nanoseconds of the system clock. The value need not be an integer. The period is passed to the Xilinx implementation tools through a constraints file, where it is used as the global PERIOD constraint. Multicycle paths are constrained to integer multiples of this value.
Simulink system period (sec):
  • Defines the Simulink System Period, in units of seconds. The Simulink system period is the greatest common divisor of the sample periods that appear in the model. These sample periods are set explicitly in the block dialog boxes, inherited according to Simulink propagation rules, or implied by a hardware oversampling rate in blocks with this option. In the latter case, the implied sample time is in fact faster than the observable simulation sample time for the block in Simulink. In hardware, a block having an oversampling rate greater than one processes its inputs at a faster rate than the data. For example, a sequential multiplier block with an over-sampling rate of eight implies a (Simulink) sample period that is one eighth of the multiplier block’s actual sample time in Simulink. This parameter can be modified only in a master block.
Clock pin location:
  • Defines the pin location for the hardware clock. This information is passed to the Xilinx implementation tools through a constraints file. This option should not be specified if the Vitis Model Composer design is to be included as part of a larger HDL design.
Provide clock enable clear pin:
  • This instructs Vitis Model Composer to provide a ce_clr port on the top-level clock wrapper. The ce_clr signal is used to reset the clock enable generation logic. Capability to reset clock enable generation logic allows designs to have dynamic control for specifying the beginning of data path sampling.
Enable multiple clocks:
  • Must be enabled in the top-level System Generator token of a multiple clock design. This indicates to the Code Generation engine that the clock information for the various Subsystems must be obtained from the System Generator tokens contained in those Subsystems. If not enabled, then the design will be treated as a single clock design where all the clock information is inherited from the top-level System Generator token.
HDL/Analysis
Block icon display:
  • Specifies the type of information to be displayed on each block icon in the model after compilation is complete. The various display options are described below.
    • Default:
      • Displays the default block icon information on each block in the model. A block’s default icon is derived from the xbsIndex library.
      Figure 2. Default Block Icon
    • Normalized Sample Periods:
      • Displays the normalized sample periods for all the input and output ports on each block. For example, if the Simulink System Period is set to 4 and the sample period propagated to a block port is 4 then the normalized period that is displayed for the block port is 1 and if the period propagated to the block port is 8 then the sample period displayed would be 2 for example, a larger number indicates a slower rate.
      Figure 3. Normalized Sample Periods Icon

    • Sample frequencies (MHz):
      • Displays sample frequencies for each block.
    • Pipeline stages:
      • Displays the latency information from the input ports of each block. The displayed pipeline stage might not be accurate for certain high-level blocks such as the FFT, RS Encoder/Decoder, Viterbi Decoder, etc. In this case the displayed pipeline information can be used to determine whether a block has a combinational path from the input to the output. For example, the Up Sample block in the figure below shows that it has a combinational path from the input to the output port.
      Figure 4. Sample Frequencies

    • HDL port names:
      • Displays the HDL port name of each port on each block in the model.
    • Input data types:
      • Displays the data type of each input port on each block in the model.
    • Output data types:
      • Displays the data type of each output port on each block in the model.
Update the model:
  • Generates a Status Report that helps you identify and upgrade blocks that are not the latest available.
Perform Analysis:
  • Specifies whether an analysis (timing or resource) will or will not be performed on the Vitis Model Composer design when it is compiled. If None is selected, no timing analysis or resource analysis will be performed. If Post Synthesis is selected, the analysis will be performed after the design has been synthesized in the Vivado® toolset. If Post Implementation is selected, the analysis will be performed after the design is implemented in the Vivado toolset.
  • Analysis Type:
    • Two selections are provided: Timing or Resource. After generation is completed, a Timing Analyzer table or Resource Analyzer table is launched.
Launch:
  • Launches the Timing Analyzer or Resource Analyzer table, depending on the selection of Analyzer type. This will only work if you already ran analysis on the Simulink model and haven't changed the Simulink model since the last run.
Remote IP cache:
  • If selected, your design will access an IP cache whenever a Vitis Model Composer compilation performs Vivado synthesis as part of the compilation. If the compilation generates an IP instance for synthesis, and the Vivado synthesis tool generates synthesis output products, the tools create an entry in the cache area. If a new customization of the IP is created which has the exact same properties, the tools will copy the synthesis outputs from the cache to the design’s output directory instead of synthesizing the IP instance again. Accessing the disk cache speeds up the iterative design process.

    IP caching is described in HDL Library.

Create interface document:
  • When this box is checked and the Generate button is activated for netlisting, Vitis Model Composer creates an HTM document that describes the design being netlisted. This document is placed in a “documentation” subfolder under the netlist folder.
Clear cache:
  • Clicking this button clears the remote IP cache. Clearing the cache saves disk space, because the IP Cache can grow large, especially if your design uses many IP modules.
HLS
Target Subsystem:
  • Select the subsystem name from the drop-down menu that needs to be targeted for HLS code generation.
HLS/Settings
Target:

Target settings are shown in the following table.

Table 1. HLS Target Settings
Setting Description
IP Catalog Select IP Catalog to export the design to the Vivado IP Catalog. After C/C++ code generation, Vitis High-Level Synthesis (HLS) is invoked to synthesize the C code and create a project that can be exported as an IP to the Vivado IP Catalog.
System Generator Select System Generator to export the design to HDL blockset. After C/C++ code generation, Vitis High-Level Synthesis (HLS) is invoked to synthesize the C code and create an RTL solution that can be used as a Vitis HLS block in a HDL model.
HLS C++ Code Select HLS C++ code to compile the design model into C++ code.
FPGA clock frequency:
  • Specifies the clock frequency in MHz for the targeted device. This frequency is passed to the downstream tool flow.
Throughput factor:
  • Specifies the number of samples processed per clock to increase the throughput. A larger factor increases hardware resource usage. The throughput factor must be between 1 and 16.
Create testbench and run C simulation:
  • If selected, Vitis Model Composer runs simulation and generates test vectors while generating code.
Testbench stack size (MBytes):
  • This parameter prompts you to enter a larger stack size. When Create and run testbench is enabled, the Testbench stack size option specifies the size of the testbench stack frame during C simulation (CSIM). Occasionally, the default stack frame size of 10 MB allocated for execution of the testbench may be insufficient to run the test, due to large arrays allocated on the stack and/or deep nesting of sub-systems. Typically when this happens, the test would fail with a segmentation fault and an associated error message. In such a case you may opt to increase the size of the stack frame and rerun the test.
Hardware Flow
To generate the hardware image, specify the platform in the Target pane and select the Create Testbench option in the AI Engine/Settings pane.
  • HW System Type: Choose between Baremetal or Linux hardware validation flow.
  • Target: Specify the target for hardware validation flow.
Generate
Select a Subsystem containing blocks from the AI Engine, HDL, or HLS blocksets and specify the corresponding Code Directory. The Code Directory can be specified by entering the complete directory path or using the Browse button to provide a path.