The L1 Library Wizard Flow provides a tool-assisted approach to access a subset of the Vitis Accelerated Libraries HLS functions. You can select library functions and generate examples and parametrized template functions that can be incorporated into your design. In this way, you can quickly add IP-based functionality to the design from pre-built HLS-based IP.
The Vitis Libraries contain an extensive set of open-source, performance-optimized libraries with out-of-the-box acceleration and minimal to zero-code changes. The common Vitis accelerated libraries for Math, Statistics, Linear Algebra, and digital signal processing (DSP) offer core functionality for a wide range of applications. The domain-specific Vitis accelerated libraries offer out-of-the-box acceleration for workloads such as Vision and Image Processing, Quantitative Finance, Database and Data Analytics, and Data Compression.
Vitis libraries contain L1 primitives, L2 kernels and L3 software APIs.
- FPGA hrdware developers can leverage the L1 primitive implementations.
- The L2 kernel implementations provide usage examples for Vitis host code developers.
- The L3 software API implementations provide C, C++, and Python function interfaces to allow pure software developers to offload operations to pre-built FPGA images. These images are called overlays. The Vitis vision library provides a software interface for computer vision functions that FPGA accelerates, as well as AI Engine devices.
You can use the Vitis L1 Library Flow feature to incorporate L1 Library HLS functions into your design for Vitis Solver and Vision Library subfolders. The Solver Library provides a collection of matrix decomposition operations, linear solvers, and eigenvalue solvers.
The Vitis vision library works with the Vitis development environment. The library provides a software interface for computer vision functions that Vitis HLS accelerates on the FPGA. Vitis vision library functions are mostly similar in functionality to their OpenCV equivalent.
There are three tool-assisted flows to access the L1 HLS functions.
- Examples view
- Create component from Library from the Welcome Page
- Auto-completion from xf:: namespace in Vitis Unified IDE editor
Flow 1 - Examples - Create L1 HLS function examples
The Examples VIEW flow allows you to select and generate an L1 Library example. The result is a specified L1 Library HLS component project with both test bench and source code files.
To generate an L1 Library Example:
- Click the Examples icon in the Vitis Unified IDE.
- In the Examples panel, go to the .
- Click the desired example, for example, AMD 3D LUT L1 Test.
- Click on the Create HLS Component Template button.
- Set the component name and location. Click Next.
- Click Finish to generate the example HLS component.
Flow 2 - Create component from Library
The Create component from Library flow allows you to select an HLS template function and parametrize it. Vitis creates an HLS component project with the instantiated template function in a C++ wrapper for the synthesizable file. There is no test bench file. To perform this flow, follow the steps below.
- Click Create Component from Library from the Welcome page.
- Enter the component name and location in the "Create Component from Library" pop-up panel and select Next.
- Click the desired L1 HLS function and select Next.
- In the parametrization panel, configure the parameters.
- Grey text fields are required. In some cases, you need to specify the legal integer ranges. For example, "int(16~2160)" means the field value can be an integer in the range 16 to 2160 inclusive.
- After defining the parameters, click Next.
- Click the Part then click Next. You can use the default part by selecting Next immediately.
- Edit the Settings. You can use default settings by clicking Next immediately.
- Review the new HLS component settings and click Finish.
Flow 3 - Auto-completion from the xf:: namespace in IDE Editor
The auto-completion from the xf:: namespace flow provides a way to insert a parametrized HLS template function into source code that is being actively edited.
- In the Vitis Unified IDE editor, open a C++ source code file.
- Type
xf::in an empty line in the file editor panel. - A list of available HLS functions is available for auto-completion. Select a
function, for example,
xf::cv::absdiff. - Fill in the Parameters and
Ports sections of the parallelization panel.
- In the Parameters section, fill in
the grey text fields. In some cases, you need to fill in legal integer
ranges. For example,
int(16~2160)means the field value can be an integer in the range 16 to 2160 inclusive. - In the Ports section, you can rename the arguments to match the source code context.
- In the Parameters section, fill in
the grey text fields. In some cases, you need to fill in legal integer
ranges. For example,