Compiling and Simulating Using the Makefile - 2023.1 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.1 English

A Makefile is included with each library element. It is located in the L2/tests/aie/<library_element> directory. Each Makefile holds default values for each of the library element parameters. These values can be edited as required to configure the library element for your needs. Alternatively, these defaults may be overridden by arguments to the make command as described below.

In addition, example design(s) located in: L2/examples/<example_design> contain a Makefile that offers similar functionality. Example design(s) are not parametrizable.

Prerequisites:

source <your-Vitis-install-path>/lin64/Vitis/HEAD/settings64.csh
setenv PLATFORM_REPO_PATHS <your-platform-repo-install-path>
source <your-XRT-install-path>/xbb/xrt/packages/xrt-2.1.0-centos/opt/xilinx/xrt/setup.csh
setenv DSPLIB_ROOT <your-Vitis-libraries-install-path/dsp>

Use the following steps to compile and simulate the reference model with the x86sim target, then to compile and simulate the library element graph using the AIE emulation platform. The output of the reference model ( logs/ref_output.txt ) is verified against the output of the AIE graphs ( logs/uut_output.txt ).

make run

To overwrite the default parameters, add desired parameters as arguments to the make command, for example:

make run DATA_TYPE=cint16 SHIFT=16

For list of all the configurable parameters, see the L2 Library Element Configuration Parameters.

List of all Makefile targets:

make all TARGET=<x86sim/aiesim/> PLATFORM=<FPGA platform>
    Command to generate the design for specified Target and Shell.


make sd_card TARGET=<x86sim/aiesim/> PLATFORM=<FPGA platform>
    Command to prepare sd_card files.


make run TARGET=<x86sim/aiesim/> PLATFORM=<FPGA platform>
    Command to run application in emulation.


make xclbin TARGET=<x86sim/aiesim/> PLATFORM=<FPGA platform>
    Command to build xclbin application.


make host
    Command to build host application.


make clean
    Command to remove the generated non-hardware files.

make cleanall
    Command to remove all the generated files.

Note

For embedded devices like vck190, env variable SYSROOT, EDGE_COMMON_SW and PERL need to be set first. For example,

export SYSROOT=< path-to-platform-sysroot >
export EDGE_COMMON_SW=< path-to-rootfs-and-Image-files >
export PERL=<path-to-perl-installation-location >

On completion of the make, the file L2/tests/aie/<library_element>/logs/status.txt will contain the result of compilation, simulation and an indication of whether the reference model and AIE model outputs match.

To perform a x86 compilation/simulation, run:

make run TARGET=x86sim.

It is also possible to randomly generate coefficient and input data, or to generate specific stimulus patterns like ALL_ONES, IMPULSE, etc. by running:

make run STIM_TYPE=4.