Building the System Project - 2023.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2023-12-13
Version
2023.2 English

After creating the System project you can select it in the Component Explorer, or choose it from Component drop-down in the Flow Navigator to make it the active component in the tool. Then select Build All under the Software Emulation, Hardware Emulation, or Hardware headings as shown in the following image.

Figure 1. Building the System Project

The Build All option combines the Build Binary Container command to run the v++ --link command as described in Linking the System, and the Build Package command to run the v++ --package command as described in Packaging the System, into a single process step. Alternatively, you can run these as separate process steps. You can expand the Link section and select Build Binary Container to build only the .xclbin or the .xsa. Then also expand the Package section and select Build Package command to complete the build process.

Tip: Both the Link and Package commands have their own configuration files that can be managed from the System project vitis-sys.json file as previously described.

The System project supports three build targets.

  1. Software Emulation is a build for simulation of the C/C++ code of the application and components in the system.
  2. Hardware Emulation is a build for simulation of the hardware design in the Vivado logic simulator
  3. Hardware is a build that is intended to be run on the physical device.

The builds take progressively longer to complete as you move from 1 to 3. The compilation of a C/C++ model is much quicker than the RTL code implemented into hardware through place and route. So you can use the software emulation to quickly iterate on the logic of your design, then move to hardware emulation to get a cycle accurate simulation of the hardware, finally build and run your hardware for the real performance test.

A transcript of the build process is displayed in the Output console, titled with the System project name and the build target, for example System1::sw_emu. When the build is complete you can review the transcript, or the hw_linker.log file written to the <system>/build/<target>/log folder. You should see Build Finished successfully in the transcript, or you could see errors reported instead. The Flow Navigator displays a green circle with a check mark in it, or a red circle with an x depending on the results of the build. If the build completes with errors, review the transcript or the log file to determine the cause and rerun the build as needed.

You can select and expand the folders of the build directories. You can see the output files of the Vitis compiler package process (v++ --package) in the output hierarchy. The build process generates the emulation data and boot files needed for the system, and writes them to the sd_card folder.

Note: Two folders are created under the Hardware folder, package and package_no_aie_debug. The sd_card.img file within the package folder is for hardware debug purposes whereas the sd_card.img file in the package_no_aie_debug folder is for regular application execution.

After a successful build the Flow Navigator will display a series of reports generated during the compilation process. You can access the reports by expanding Reports under the Link and Package sections. The available reports will vary depending on the build target. You can select any of the available reports to view, or switch to the Analysis view to complete a review of the reports. Refer to Working with the Analysis View (Vitis Analyzer) for details.

After the build completes successfully you can choose to Run or Debug the System project as described in the next sections.