Steps for programming the Bitstream/PDI using fpgautil

Linux Drivers

Release Date
2023-07-22
root@xilinx:~# fpgautil -h fpgautil: FPGA Utility for Loading/reading PL Configuration in zynqMP Usage: fpgautil -b <bin file path> -o <dtbo file path> Options: -b <binfile> (Bin file path) -o <dtbofile> (DTBO file path) -f <flags> Optional: <Bitstream type flags> f := <Full | Partial > Default: <Full> Examples: (Load Full Bitstream using Overlay) fpgautil -b top.bit.bin -o can.dtbo (Load Partial Bitstream through the sysfs interface) fpgautil -b top.bit.bin -f Partial

Fpgautil usage for DFX (aka PR/RP)use cases

Typical topology: FPGA has the base FPGA Region(static) with two PR/DFX regions (each PR region has two RMs).  The relevant files can be seen as below.

-- xilinx `-- static |-- static.dtbo |-- static.bin |---PR0 | `-- PR0-RM0 | |-- pr0-rm0.dtsi | |-- pr0-rm0.dtbo | |-- pr0-rm0.bin | `-- PR0-RM1 | |-- pr0-rm1.dtsi | |-- pr0-rm1.dtbo | |-- pr0-rm1.bin |---PR1 | `-- PR1-RM0 | |-- pr1-rm0.dtsi | |-- pr1-rm0.dtbo | |-- pr1-rm0.bin | `-- PR0-RM1 | |-- pr1-rm1.dtsi | |-- pr1-rm1.dtbo | |-- pr1-rm1.bin
  • Configure/Reconfigure Static region using fpgautil: fpgautil -b <full/static bitstream image> -o <Full/static dtbo file> -f Full -n <Fpga region info>

    • Usage example: fpgautil -b static.bin -o static.dtbo -f Full -n Full

  • PR0 region configuration/Reconfigure using fpgautil:

    • Command to configure the PR0-RM0 Image: fpgautil -b <PR0-RM0 Bitstream image> -o <PR0-RM0 dtbo file> -f Partial -n <Fpga region info>

      • Usage example: fpgautil PR0-RM0.bin -o PR0-RM0.dtbo -f Partial -n PR0

    • Command to Remove Images(PR0-RM0) from the PR0 region: fpgautil -R -n  -n <Fpga region info> ( Note: Before Reconfiguring the same region with a different Bitstream user needs to remove the existing dtbo relevant to it )

      • Usage example: fpgautil -R -n PR0

    • Command to configure the PR0-RM1 Image: : fpgautil -b <PR0-RM1 Bitstream image> -o <PR0-RM1 dtbo file> -f Partial -n <Fpga region info>

      • Usage example: fpgautil PR0-RM1.bin -o PR0-RM1.dtbo -f Partial -n PR0

    • Command to Remove Images(PR0-RM1) from the PR0 region: fpgautil -R -n <Fpga region info>

      • Usage example: fpgautil -R -n PR0

  • PR1 region configuration/reconfiguration using fpgautil:

    • Command to configure the PR0-RM0 Image: fpgautil -b <PR1-RM0 Bitstream image> -o <PR1-RM0 dtbo file> -f Partial -n <Fpga region info>

      • Usage example: fpgautil PR1-RM0.bin -o PR1-RM0.dtbo -f Partial -n PR1

    • Command to Remove Images(PR1-RM0) from the PR1 region: fpgautil -R -n <Fpga region info> ( Note: Before Reconfiguring the same region with a different Bitstream user needs to remove the existing dtbo relevant to it )

      • Usage example: fpgautil -R -n PR1

    • Command to configure the PR1-RM1 Image: : fpgautil -b <PR1-RM1 Bitstream image> -o <PR1-RM1 dtbo file> -f Partial -n <Fpga region info>

      • Usage example: fpgautil PR1-RM1.bin -o PR1-RM1.dtbo -f Partial -n PR0

    • Command to Remove Images(PR0-RM1) from the PR0 region: fpgautil -R -n <Fpga region info>

      • Usage example: fpgautil -R -n PR1

  • Command to remove the images from the static region: fpgautil -R -n <Fpga region info>

    • Usage example: fpgautil -R -n Full

Notes:

  • Before reconfiguring the same region (whether it is a static/ partial region) with a different Bitstream the user needs to remove the existing dtbo relevant to it.

  • Fpgautil -R is responsible for only removing the dtbo file from the livetree. it will not remove the PL logic from the FPGA region. If the user wants to remove the complete configuration logic from the FPGA region he/she should reconfigure the target configuration region with a greybox reconfigurable module.