Step 3: Code Generation and Running AI Engine SystemC Simulation - 2021.1 English

Vitis Model Composer Tutorial: (UG1498)

Document ID
Release Date
2021.1 English
Model Composer can generate graph code from your design. It also generates a make file and collects data from the input and output port of your system. In this step you will see how this is done.
  1. Create a subsystem from all three blocks in your design. You can do this by selecting the blocks and clicking the Create Subsystem button as shown in the following figure.

  2. Assign a name to the subsystem, for example aie_system.
  3. Drag the Model Composer Hub from the library browser or simply click on the canvas and start typing Model Composer Hub.

  4. Double-click the Model Composer Hub and make changes as follows.

    When you check Create testbench, the tool generates a testbench, including input and output test vectors from Model Composer. You can use AI Engine SystemC Simulator to verify the correctness of the design by comparing the results with the test vectors from Model Composer.
    Note: The AIE simulation may take some time to complete.
  5. Click Apply and then Generate and Run. Within a few seconds the code directory gets created. Because you also checked Create testbench, the aiecompiler will get invoked under the hood and compile the code using the generated graph code and the kernel source codes. It subsequently runs the AIE Simulation.

    This operation will take a couple of minutes. Observe the simulation completion message along with the comparison of the output to the Simulink output (data/reference_output/Out1.txt). It prints any diff, in the wait dialog.

  6. Click OK to exit the Progress window.
  7. Navigate to code/src_aie to inspect the generated graph code and Makefile. The tool automates the generation of all these files.

  8. Navigate to the data folder and observe the reference_output/ directory where the data logged from Simulink gets stored. The aiesimulator_output/ folder logs the data from AI Engine SystemC simulator and Model Composer compares the results at the end of simulation.