The DSP Library for AI Engine provides a set of DSP library elements. Each library element consists of a main graph class and a corresponding kernel class, but also includes a reference model graph class.


The following figure shows the DSPLib organization.


Figure 1: DSPLib Organization

The directories L1, L2, and L3 correspond to AI Engine kernels, AI Engine graphs, and drivers for each function, respectively. Inclusion of an L2 graph rather than an L1 element is recommended in your design.


The L3 directory is not yet available.

Graph class declarations and constants that allow you to include the library element in your design are located in the L2/include/aie/. Kernel class definitions, the .cpp files and corresponding .hpp files are located in the L1/src/aie and L1/include/aie subdirectories respectively.

The L2/tests/aie/<library_element> subdirectory contains a test bench for the library element. Additional testbench files, like stimulus, monitor, and other utility modules are located in the L1/tests/aie/inc/ folder.

Reference models graph class for each library element are contained in L2/tests/aie/common/inc. Reference models kernel class for each library element are contained in L1/tests/aie/inc/ and L1/tests/aie/src.

The L2/examples subdirectory holds example wrapper designs to demonstrate the use of the library elements.

Using Library Elements within User Defined Graphs

It is recommended that the library element to include in your graph is from the L2 directory, that is, a subgraph. For instance, to include a single rate asymmetrical FIR filter, include fir_sr_asym_graph.hpp from the L2/include/aie/ folder. The test harness for each library unit can be used as a reference example of how to instantiate a parameterized graph. For example, see L2/tests/aie/<library_element>/test.hpp and test.cpp.

An example test.h and test.cpp which instantiates a parameterized graph and exposes a configured (point solution) interface is provided in the L2/examples/fir_129t_sym folder.

Set the environment variable to DSPLIB_ROOT.

setenv DSPLIB_ROOT <your-vitis-libraries-install-path/dsp>


Use setenv for csh and export DSPLIB_ROOT=<path> for bash.

Use the following option in the aiecompiler command to provide the path:


Known Issues

See Xilinx® Answer Record 75802 for the list of known issues.

Vitis Tutorials

Xilinx® provides an extensive library of purpose build tutorials. It is recommended to visit Vitis Tutorials to get familiar with Vitis™ in-Depth tutorials.

To learn how to use the Vitis core tools to develop for Versal™, the first Adaptive Compute Acceleration Platform (ACAP) device from Xilinx please visit AI Engine Development Tutorials. There is a variety of design, methodology, and feature tutorials, where you may also find a highly recommended DSP Library Tutorial which demonstrates how to use kernels provided by the DSP library for a filtering application, how to analyze the design results, and how to use filter parameters to optimize the design’s performance using simulation.

Finally, Simulink users could be interested in AI Engine DSP Library and Model Composer Tutorial which shows how to design AI Engine applications using Model Composer