FPGA AI Suite: Getting Started Guide

ID 768970
Date 11/25/2024
Public
Document Table of Contents

6.6. Programming the FPGA Device

If you do not have an FPGA board installed, you can still run inference on the software emulation model. For instruction, skip ahead to Performing Inference Without an FPGA Board.

To complete this section of the tutorial, you must have installed the following supported design example:

  • PCIe-based design example for Agilex™ 7 devices

    This design example requires the Terasic* DE10-Agilex Development Board.

For installation instructions, see FPGA AI Suite Installation Overview.

Important: The instructions here assume that your machine has only a single board installed.

The PCIe-based design examples requires a runtime layer that must be compiled before the design is usable. The runtime for the design examples typically needs to be compiled only once. However, a new FPGA bitstream must be generated whenever any of the following parameters change:

  • Number of IP instances built in the design example.
    • PCIe-based design example for Agilex™ 7 devices supports up to 4 instances.
  • Configuration of the IP architecture (as specified by a .arch file)
  • Quartus fitter seed (or any other "try-harder" compilation options)

Depending on your design example, follow the instructions in the following section:

Programming the Agilex™ 7 Device ( Terasic* DE10-Agilex Development Board)

To program the DE10-Agilex-B2E2 board required by the PCIe-based design example for Agilex™ 7 devices:

  1. Build the runtime with the following commands:
    cd $COREDLA_WORK/runtime
    rm -rf build_Release
    ./build_runtime.sh -target_de10_agilex
  2. Program the bitstream onto the FPGA device with the following commands:
    jtagdir=$COREDLA_WORK/runtime/build_Release/fpga_jtag_reprogram
    bitsdir=$COREDLA_WORK/demo/bitstreams
    $jtagdir/fpga_jtag_reprogram $bitsdir/AGX7_Performance.sof
    curarch=$COREDLA_ROOT/example_architectures/AGX7_Performance.arch

The bitstream completely reprograms the board, which causes it to disconnect from the PCIe bus. The board is kept accessible with the $COREDLA_WORK/runtime/fpga_jtag_reprogram tool.

Precompiled bitstreams are provided in the $COREDLA_WORK/demo/bitstreams/ directory. Some bitstreams instantiate a large IP, while others instantiate a small IP. There are also differences in which bitstreams support which neural networks. For details, refer to the FPGA AI Suite IP Reference Manual .