Skip to content
Julian Kemmerer edited this page Feb 16, 2023 · 31 revisions

This page describes the current state of PipelineC+Xilinx Vitis integration. It primarily consists of a demo showing a PipelineC pipeline in a Vitis streaming kernel based design running on Alveo hardware.

Beginning in PR 127, the primary person behind this fantastic work is @bartokon. If you have any Vitis-related questions or comments they are likely the best person to contact. The flow is very flexible and could be easily modified to work for another platform, ex. Zynq ARM based designs.

The files discussed here are in the PipelineC repo at examples/vitis_import.

Files

  • axis.c: PipelineC main file
    • Pipeline the_pipeline()
      • Function is autopipelined to meet MAIN_MHZ specified
      • Has input and output wires connected to the IO and Control logic
    • IO and Control io_and_ctrl()
  • build.sh: script to run pipelinec tool and produce VHDL + Vivado .XO packaging .tcl script.
    • The .tcl script is used by Vivado to package VHDL files with an AXIS interface into an IP .XO file
  • vitis_scripts: All Vitis files

Build

Tested with Vivado/Vitis tools version 2022.2

Streaming interfaces are used as communication channel.

Scripts, ex. build_all.sh, are used to generate Vitis HLS IP from PipelineC generated VHDL. That IP can be used to simulate or drive real hardware that transfers streaming data to+from PipelineC hardware modules.

PipelineC IP is packaged as an .XO and connected with Vitis at linking stage.

  • From in the vitis_import directory use build.sh run the PipelineC tool and produce Vivado .XO packaging .tcl script
  • Source Xilinx env
    • for example: source /tools/Xilinx/Vitis/2022.2/settings64.sh
  • From in the vitis_scripts directory use build_all.sh to build and run the example Vitis project.
    • If you wish to build for hw change TARGET in build_all.sh script.

Hardware Emulation (Simulation)

Setting TARGET=hw_emu in the build_all.sh will cause test.sh to run main.cpp configured to do the following:

  • Reads xrt.ini file that specifies that hw_emu should be run with xsim and gui
  • Data received from simulation is stored and checked against expected results.

Hardware Test

Tested on Alveo hardware.

Setting TARGET=hw in the build_all.sh will cause test.sh to run main.cpp configured to do the following:

  • Programs the programmable logic
  • Creates IO buffers in the HBM memory.
  • Runs the hardware kernel that sends and receives streams to-from the FPGA.
  • Data received from hardware is checked against expected results.