Repo directory structure:
BFS/Unpartitioned: simple implementation of BFS using Vitis_HLS to generate RTL and Vivado Design Suite to generate bitstreamGraFlex-U280-sw-vitis-hls: Our attempt to generate RTL usingcpsc520-final-project/GraFlex/applications/bfs_bf/PE_2/src/sw/bfs_host.cppas the source file. You can refer to the original GraFLex paper here: https://dl.acm.org/doi/10.1145/3626202.3637573. Right now, we are stuck due to the different characteristics of ZCU106 and U280. This is a potential research direction and we would like to pursue further.
Make sure to source the settings64.sh into your path. You can launch Vitis_HLS using vitis_hls &
Input to Vitis HLS:
- We have the kernel code written in C++ (
BFS/Unpartitioned/bfs_kernel.cpp), selectshortestas the top function - When being prompted for testbench, choose
BFS/Unpartitined/bfs_test.cppandedge_list.txt - Use the default clock period (10), or you customize the clock period.
- For the target FPGA board, click to
boardinterface and chooseZCU106 - Click
Finish - Now, you will see the
sourcefolder, thetestbenchfolder, and thesolutionfolder on the panel on the left. - You can run
C Simulationwhich will compile your source code (C++) and run with the test bench - You can run
C Synthesisthat will generate estimation of the hardware acceleration report, such as latency. - Now, right click the
solutionfolder and export IP.
Just now, we exported the IP package from the Vitis HLS with RTL implementation of our C++ algorithm. Now we need to integrate the exported IP and generate bitstream for validating the design on the hardware.
- Open Vivado Design Suite and click on
Create Projecton the homepage. You will see a dialog box that will guide you through the process. - Name your project and set its directory.
- Next, in the
Project Type, chooseRTL Projectand check the box under it that saysDo not specify sources at this timeand clickNext - In
Default Part, select the Board/Part that you created your HLS design for and clickNext, thenFinish. - You will now see your project created and opens with a
Project Managerpane and aFlow Mavigatorpane. - Click on
Create Block DesignunderIP Integratorin the Flow Navigator pane and clickok. - Add
Zynq UltraScale+ MPSoCsIP to in the "Diagram" window. Click on "Run Block Automation" and click on "OK" in the dialog box that appears. - Go to settings and navigate to
IP Repository. Add the exported IP you just created and clickApplyand clickok. - Add the exported IP to the Block Design and click on
Run Connection Automation. Set the clock source to bezynq_ultra_ps_e_0. - For now, we hardcode the
shortest/sp_startto 1. To do this, right click in the "Diagram" window, clickAdd IP, and add theConstantIP. By default, this is set to 1. Connect this to theshortest/sp_start. - Navigate to the Sources and right click on the design file. Click on "Create HDL Wrapper" and select auto-update then click "OK"
- Click "Generate bitsteam" under "Program and Debug" in Flow Navigator pane. Click "yes" then "ok"
- The bitsteam is now succesfully generated.