Last July, in the article titled Versal ACAP AI Engines for Dummies I introduced the AI Engine (AIE) array which is present in some Versal™ ACAP devices. In this new series of articles, the AI Engine Series, we will provide some examples of how to use the AI Engine tools integrated into the Vitis™ 2020.2 unified software platform.
This tutorial requires that you have the following:
I like to view a Versal System as having 3 main domains. The AI Engine (AIE) domain, the Processing System (PS) domain and the Programmable Logic (PL) domain. To run an AIE application on Versal, it is most likely that you will need to use the 3 domains, all working together.
This article is focused on the programming of AIE domain using the Vitis™ unified software platform.
We can see that the VCK190 base platform has 2 domains defined:
Important: you will see a note in the description window that states "This templates works only for AIE simulation and SW(x86)". The reason for this is that the template does not include any I/O to feed the AIE application or any PS application which will be required for a full system running in hardware.
The include headers (Line 3 > Line 5) add the adf dataflow library (adf.h), the top-level graph declaration file (project.h) and the kernel functions prototypes (kernels.h).
On Line 9, a graph from the class simpleGraph is instantiated along with an instance called mygraph.
On Line 10, the simulation platform is declared with 1 input port and 1 output port using a predefined class constructor - adf::simulation::platform<1,1>. It also specifies the input data file (data/input.txt) which contains values that are input to the dataflow graph, and the output file (data/output.txt) where the output will be stored after execution (in simulation only).
On Lines 11 and 12, the graph input and output are connected to the simulation platform.
Finally, on line 14 to 19, there is the main function in which the graph is initialized, run for 4 iterations, and then terminated.
Based on what we have seen we can draw the graph as a black box with its input and its output connected to the platform:
In the next entry in this series, we will have a closer look in the graph and the kernels.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.