Editor’s Note: This content is republished from the adiuvoengineering.com, with permission from the author.
In the last Alveo blog, we installed the Alveo U200 accelerator card and ensured the card could be correctly validated. In this blog, we are going to look at what remains to be done to run the first executable program on the Alveo card itself.
First, let us do a little recap. In the previous blog, we installed the XRT and the deployment target platform. Once installed, these are available under the /opt/Xilinx/XRT and /opt/Xilinx/DSA directories in the file system. We used some of the available commands to update and validate the Alveo card.
To get started creating our own application on the Alveo card, we need to also install the development target platform. This will also be in the /opt directory once installed and will provide the acceleration platform.
With the packages installed for Vitis and the data center platform, we are ready to create our first Hello World application.
Ensure you have sourced the Xilinx Run Time and start Vitis. Select the workspace you wish to work in.
To get started, we need to create a new application project. When selecting this, you will be asked to define the platform you wish to use. Initially there will be no platforms available. Select Add Platform and point them to the /opt/Xilinx/platforms directory.
This will make the installed platforms available, one of which should be the U200 platform.
With the platform selected, we are able to create a new project and system project.
To create our simple Hello World application which will demonstrate we have everything set up as expected, we are going use the Vector Addition example.
Clicking Finish will result in the project being created. The project will be configured for a software emulation build by default.
To test out the card, however, we need to have a hardware build. Building the hardware is easy from the drop-down menu on the application project settings tab. Select Hardware from the active build configuration option.
This will accelerate the VAdd kernel into the programmable logic and implement all of the necessary communication networks.
Once this is completed, click on the build icon (hammer) located on the menu bar and the application will be built. It took about one hour to generate the necessary output files on my machine.
All we need to do now is open a terminal window in the build directory and execute the program. The program is called Hello World and the accelerated kernel is called binary_container_1.xlcbin.
As such, we can issue the following command:
By running this on my system, I was able to see the application loading and the test results.
Now that we know the basic flow and that the card is working as intended, we can get started creating more interesting applications.