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.cpp
as 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
), selectshortest
as the top function - When being prompted for testbench, choose
BFS/Unpartitined/bfs_test.cpp
andedge_list.txt
- Use the default clock period (10), or you customize the clock period.
- For the target FPGA board, click to
board
interface and chooseZCU106
- Click
Finish
- Now, you will see the
source
folder, thetestbench
folder, and thesolution
folder on the panel on the left. - You can run
C Simulation
which will compile your source code (C++) and run with the test bench - You can run
C Synthesis
that will generate estimation of the hardware acceleration report, such as latency. - Now, right click the
solution
folder 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 Project
on 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 Project
and check the box under it that saysDo not specify sources at this time
and 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 Manager
pane and aFlow Mavigator
pane. - Click on
Create Block Design
underIP Integrator
in the Flow Navigator pane and clickok
. - Add
Zynq UltraScale+ MPSoCs
IP 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 clickApply
and 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_start
to 1. To do this, right click in the "Diagram" window, clickAdd IP
, and add theConstant
IP. 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.