openFPGALoader(1)
| OPENFPGALOADER(1) | openFPGALoader: universal utility for programming FPGA | OPENFPGALOADER(1) |
NAME
openFPGALoader - Universal utility for programming FPGA (Documentation)
Welcome to the documentation of openFPGALoader!
openFPGALoader is a universal utility for programming FPGAs. Compatible with many boards, cables and FPGA from major manufacturers (Xilinx, Altera/Intel, Lattice, Gowin, Efinix, Anlogic, Cologne Chip). openFPGALoader works on Linux, Windows and macOS.
Not sure if your hardware is supported? Check the hardware compatibility lists:
- compatibility:fpgas
- compatibility:boards
- compatibility:cables
Also checkout the vendor-specific documentation:
- Anlogic
- Cologne Chip
- Efinix
- Gowin
- Intel/Altera
- Lattice
- Xilinx
FIRST STEPS WITH OPENFPGALOADER
Install
Packages are available for Linux distributions, Windows (MSYS2) and macOS:
- Arch Linux: sudo pacman -S openfpgaloader
- Fedora: sudo dnf copr enable mobicarte/openFPGALoader; sudo dnf install openFPGALoader
- MSYS2: pacman -S mingw-w64-ucrt-x86_64-openFPGALoader
- macOS: brew install openfpgaloader
More instructions for other installation scenarios are available in install.
Programming a development board
Just simply replace my_fpga_board with any FPGA board from compatibility:boards (or openFPGALoader --list-boards) in any of the two commands below, depending on if you want to program the volatile part of your FPGA (faster but not persistent) or the flash part of your FPGA (slower but persistent):
openFPGALoader -b my_fpga_board my_bitstream.bit # Program to SRAM openFPGALoader -b my_fpga_board -f my_bitstream.bit # Program to flash
NOTE:
Programming an “standalone” FPGA
If your FPGA doesn’t come with a built-in programmer or if you prefer to use an external cable, you can specify a cable to use from compatibility:cables (or openFPGALoader --list-cables):
openFPGALoader -c my_cable my_bitstream.bit # Program to SRAM openFPGALoader -c my_cable -f my_bitstream.bit # Program to flash
NOTE:
HINT:
openFPGALoader -d /dev/ttyUSBX
When the -d option is not provided, openFPGALoader will opens the first FTDI adapter it finds. Therefore it is preferable to use this flag if your computer is connected to multiple FTDI devices.
Troubleshooting
Please refer to troubleshooting.
INSTALLING OPENFPGALOADER
Linux
Arch Linux
openFPGALoader is available in the default repositories:
sudo pacman -S openfpgaloader
Alternatively, you could build from source. First: install required libraries:
sudo pacman -S git cmake make gcc pkgconf libftdi libusb zlib hidapi gzip
Build step is similar as Debian
Fedora
openFPGALoader is available as a Copr repository:
sudo dnf copr enable mobicarte/openFPGALoader sudo dnf install openFPGALoader
From source (Debian, Ubuntu)
This application uses libftdi1, so this library must be installed (and, depending on the distribution, headers too):
sudo apt install \
git \
gzip \
libftdi1-2 \
libftdi1-dev \
libhidapi-hidraw0 \
libhidapi-dev \
libudev-dev \
zlib1g-dev \
cmake \
pkg-config \
make \
g++
HINT:
By default, (e)udev support is enabled (used to open a device by his /dev/xx node). If you don’t want this option, use:
-DENABLE_UDEV=OFF
By default, cmsisdap support is enabled (used for colorlight I5, I9). If you don’t want this option, use:
-DENABLE_CMSISDAP=OFF
Alternatively you can manually specify the location of libusb and libftdi1:
-DUSE_PKGCONFIG=OFF \ -DLIBUSB_LIBRARIES=<path_to_libusb> \ -DLIBFTDI_LIBRARIES=<path_to_libftdi> \ -DLIBFTDI_VERSION=<version> \ -DCMAKE_CXX_FLAGS="-I<libusb_include_dir> -I<libftdi1_include_dir>"
You may also need to add this if you see link errors between libusb and pthread:
-DLINK_CMAKE_THREADS=ON
By default, libgpiod support is enabled If you don’t want this option, use:
-DENABLE_LIBGPIOD=OFF
Additionaly you have to install libgpiod
To build the app:
git clone https://github.com/trabucayre/openFPGALoader cd openFPGALoader mkdir build cd build cmake .. # add -DBUILD_STATIC=ON to build a static version
# add -DENABLE_UDEV=OFF to disable udev support and -d /dev/xxx
# add -DENABLE_CMSISDAP=OFF to disable CMSIS DAP support cmake --build . # or make -j$(nproc)
To install
$ sudo make install
The default install path is /usr/local, to change it, use -DCMAKE_INSTALL_PREFIX=myInstallDir in cmake invokation.
Udev rules
By default, users have no access to converters. A rule file (99-openfpgaloader.rules) for udev is provided at the root directory of this repository. These rules set access right and group (plugdev) when a converter is plugged.
sudo cp 99-openfpgaloader.rules /etc/udev/rules.d/ sudo udevadm control --reload-rules && sudo udevadm trigger # force udev to take new rule sudo usermod -a $USER -G plugdev # add user to plugdev group
After that you need to unplug and replug your device.
HINT:
macOS
openFPGALoader is available as a Homebrew formula:
brew install openfpgaloader
Alternatively, if you want to build it by hand:
brew install --only-dependencies openfpgaloader brew install cmake pkg-config zlib gzip git clone https://github.com/trabucayre/openFPGALoader cd openFPGALoader mkdir build cd build cmake .. make -j
Windows
Common
Bitstreams for XC2C (coolrunner-II) needs to be remapped using .map shipped with ISE. ISE path is set at configure time using:
-DISE_PATH=/somewhere/Xilinx/ISE_VERS/
default: /opt/Xilinx/14.7.
TROUBLESHOOTING
I installed openFPGALoader but it says command not found when I try to launch it
The correct spelling of the program is openFPGALoader with FPGA and the “L” of “Loader” in uppercase. Ensure the spelling of the program is correct.
Gowin device could not communicate since last bitstream flashed. (issue #206)
Gowin’s FPGA may fails to be detected if JTAGSEL_N (pin 08 for GW1N-4K) is used as a GPIO. To recover you have to pull down this pin (before power up) to recover JTAG interface (UG292 - JTAGSELL_N section).
JTAG init failed
Avoid using USB hubs and connect it directly to your PC USB port.
Tang Primer 20k program slow and stucked (issue #250)
Check your openFPGALoader version:
openFPGALoader -V
If it is older than release then v0.9.0, install the most recent version (from commit f5b89bff68a5e2147404a895c075773884077438 or later).
Cannot flash Tang Nano 9k (issue #251)
This is a device issue, erase its Embedded Flash using Official GoWin Programmer (preferentially in Windows) and SRAM too, then you can use openFPGALoader again.
Unable to open FTDI device: -4 (usb_open() failed) (issue #245)
Edit your /etc/udev/rules.d/99-ftdi.rules file exchanging your programming device permissions.
For more information, check the udev section from this guide
ADVANCED USAGE OF OPENFPGALOADER
Resetting an FPGA
openFPGALoader [options] -r
Using negative edge for TDO’s sampling
If transaction are unstable you can try to change read edge by using
openFPGALoader [options] --invert-read-edge
Reading the bitstream from STDIN
cat /path/to/bitstream.ext | openFPGALoader --file-type ext [options]
--file-type is required to detect file type.
NOTE:
# FPGA side nc -lp port | openFPGALoader --file-type xxx [option # Bitstream side nc -q 0 host port < /path/to/bitstream.ext
Automatic file type detection bypass
Default behavior is to use file extension to determine file parser. To avoid this mechanism --file-type type must be used.
FT231/FT232 bitbang mode and pins configuration
FT232R and ft231X may be used as JTAG programmer. JTAG communications are emulated in bitbang mode.
To use these devices user needs to provides both the cable and the pin mapping:
openFPGALoader [options] -cft23XXX --pins=TDI:TDO:TCK:TMS /path/to/bitstream.ext
where:
- ft23XXX may be ft232RL or ft231X.
- TDI:TDO:TCK:TMS may be the pin ID (0 <= id <= 7) or string value.
allowed values are:
| value | ID |
| TXD | 0 |
| RXD | 1 |
| RTS | 2 |
| CTS | 3 |
| DTR | 4 |
| DSR | 5 |
| DCD | 6 |
| RI | 7 |
Writing to an arbitrary address in flash memory
With FPGA using an external SPI flash (xilinx, lattice ECP5/nexus/ice40, anlogic, efinix) option -o allows one to write raw binary file to an arbitrary adress in FLASH.
Using an alternative directory for spiOverJtag
By setting OPENFPGALOADER_SOJ_DIR it’s possible to override default spiOverJtag bitstreams directory:
export OPENFPGALOADER_SOJ_DIR=/somewhere openFPGALoader xxxx
or
OPENFPGALOADER_SOJ_DIR=/somewhere openFPGALoader xxxx
FPGAS
| Vendor | Description | Model | Memory | Flash |
| Anlogic | EG4 | S20 | OK | AS |
| Anlogic | SALELF 2 | EF2M45 | OK | OK |
| Cologne Chip | GateMate Series | CCGM1A1, CCGM1A2, CCGM1A4, CCGM1A9, CCGM1A16, CCGM1A25 | OK | OK |
| Efinix | Trion | T8 | NA | OK |
| Efinix | Titanium | Ti60 | NA | OK |
| Gowin | GW1N | GW1N-1, GW1N-4, GW1NR-9, GW1NR-9C, GW1NS-2C, GW1NSR-4C, GW1NZ-1, GW2A-18C, GW5AST-138, GW5AT-138, GW5A-25 | OK | IF / EF |
| Intel | Cyclone III | EP3C16 | OK | OK |
| Intel | Cyclone IV CE | EP4CE22, EP4CE115 | OK | OK |
| Intel | Cyclone V E | 5CEA2, 5CEA5, 5CEBA4, 5CEBA9 | OK | OK |
| Intel | Cyclone V SE SoC | 5CSEBA6, 5CSEMA4, 5CSEMA5 | OK | NT |
| Intel | Cyclone 10 LP | 10CL025 | OK | OK |
| Intel | Max 10 | 10M08 | SVF | SVF |
| Lattice | Certus-NX | LFD2NX-40 | OK | OK |
| Lattice | CertusPro-NX | LFCPNX-100 | OK | OK |
| Lattice | CrossLink-NX | LIFCL-40 | OK | OK |
| Lattice | ECP5 | LFE5U-12, LFE5U-25, LFE5U-45, LFE5U-85, LFE5UM-25, LFE5UM-45, LFE5UM-85, LFE5UM5G-25, LFE5UM5G-45, LFE5UM5G-85 | OK | OK |
| Lattice | iCE40 | HX1K, HX4K, HX8K, UP5K | OK | AS |
| Lattice | MachXO2 | 256, 640, 640U, 1200, 1200U, 2000, 2000U, 4000, 7000 | OK | OK |
| Lattice | MachXO3D | 4300, 9400 | OK | OK |
| Lattice | MachXO3LF | 640, 1300, 2100, 4300, 6900, 9400 | OK | OK |
| Xilinx | Artix 7 | xc7a25t, xc7a35ti, xc7a50t, xc7a75t, xc7a100t, xc7a200t | OK | OK |
| Xilinx | Kintex 7 | xc7k70t, xc7k160t, xc7k325t, xc7k410t, xc7k420t | OK | OK |
| Xilinx | Virtex 7 | xc7v585t, xc7v2000t, xc7vx330t, xc7vx415t, xc7vx485t, xc7vx550t, xc7vx690t, xc7vx980t, xc7vx1140t, xc7vh580t, xc7vh870t | OK | OK |
| Xilinx | Artix UltraScale+ | xcau25p | OK | TBD |
| Xilinx | Kintex UltraScale | xcku035, xcku040, xcku060, xcku115 | OK | NA |
| Xilinx | Virtex 6 | xc6vlx130t | OK | OK |
| Xilinx | Virtex UltraScale+ | xcvu9p | OK | OK |
| Xilinx | Spartan 3 | xc3s200, xc3s500e | OK | OK |
| Xilinx | Spartan 6 | xc6slx9, xc6slx16, xc6slx25, xc6slx45, xc6slx150T | OK | OK |
| Xilinx | Spartan 7 | xc7s15, xc7s25, xc7s50 | OK | OK |
| Xilinx | XC9500XL | xc9536xl, xc9572xl, xc95144xl, xc95188xl | NA | OK |
| Xilinx | XC2C/XA2C (coolrunner II) | xc2c32a, xa2c64a | TBD | OK |
| Xilinx | XCF | xcf01s, xcf02s, xcf04s | NA | OK |
| Xilinx | Zynq7000 | xc7z010, xc7z020 | OK | NA |
| Xilinx | ZynqMPSoC | xczu2cg, xczu9eg, xczu11eg, xczu17eg | OK | NA |
- IF: Internal Flash
- AS: Active Serial flash mode
- NA: Not Available
- NT: Not Tested
BOARDS
NOTE:
openFPGALoader -b arty bitstream.bit # Loading in SRAM (volatile) openFPGALoader -b arty -f bitstream.bit # Writing in flash (non-volatile)
| Board name | Description | FPGA | Memory | Flash | Constraints |
| ac701 | Xilinx Artix-7 FPGA AC701 Evaluation Kit | Artix xc7a200t2fbg676c | OK | NT | AC701 ➚ |
| acornCle215 | Acorn CLE 215+ | Artix xc7a200tsbg484 | OK | OK | |
| litex-acorn-baseboard-mini | The LiteX-Acorn-Baseboards are baseboards developed around the SQRL’s Acorn board (or Nite/LiteFury) | Artix xc7a200tsbg484 | OK | OK | |
| alchitry_au | Alchitry Au | Artix xc7a35tftg256 | OK | OK | |
| alchitry_au_plus | Alchitry Au+ (Plus) | Artix xc7a100tftg256 | OK | OK | |
| alinx_ax516 | ALINX AX516 | Spartan6 xc6slx16csg324 | OK | OK | |
| alinx_ax7101 | ALINX AX/7101 | Artix xc7a100tfgg484 | OK | OK | |
| alinx_ax7102 | ALINX AX/7102 | Artix xc7a100tfgg484 | OK | OK | |
| analogMax | Trenz TEI0010 - AnalogMax | Max 10 10M08SAU169C8G | SVF | SVF | |
| antmicro_ddr4_tester | Antmicro Data Center DRAM Tester | Kintex7 xc7k160t | OK | OK | |
| antmicro_ddr5_tester | Antmicro DDR5 Tester | Kintex7 xc7k160t | OK | OK | |
| antmicro_lpddr4_tester | Antmicro LPDDR4 Test Board | Kintex7 xc7k70t | OK | OK | |
| arty_a7_35t | Digilent Arty A7 | Artix xc7a35ticsg324 | OK | OK | Arty-A7-35T ➚ |
| arty_a7_100t | Digilent Arty A7 | Artix xc7a100tcsg324 | OK | OK | Arty-A7-100T ➚ |
| arty_s7_25 | Digilent Arty S7 | Spartan7 xc7s25csga324 | OK | OK | Arty-S7-25 ➚ |
| arty_s7_50 | Digilent Arty S7 | Spartan7 xc7s50csga324 | OK | OK | Arty-S7-50 ➚ |
| arty_z7_10 | Digilent Arty S7 | Zynq7000 xc7z010csg400 | OK | NA | |
| arty_z7_20 | Digilent Arty S7 | Zynq7000 xc7z020csg400 | OK | NA | |
| arty | Digilent Analog Discovery 2 | Spartan6 xc6slx25 | OK | NT | |
| arty | Digilent Digital Discovery | Spartan6 xc6slx25 | OK | NT | |
| axu2cga | Alinx AXU2CGA Zynq MPSoC Dev Board | ZynqMPSoC XCZU2CG | OK | NA | |
| basys3 | Digilent Basys3 | Artix xc7a35tcpg236 | OK | OK | |
| cmod_s7 | Digilent Cmod S7 | Spartan7 xc7s25csga225 | NA | OK | |
| gatemate_evb_jtag | Cologne Chip GateMate FPGA Evaluation Board (JTAG mode) | Cologne Chip GateMate Series | OK | OK | |
| gatemate_evb_spi | Cologne Chip GateMate FPGA Evaluation Board (SPI mode) | Cologne Chip GateMate Series | OK | OK | |
| gatemate_pgm_spi | Cologne Chip GateMate FPGA Programmer (SPI mode) | Cologne Chip GateMate Series | OK | OK | |
| certusnx_versa_evn | Certus-NX Versa Evaluation Board | Certus LFD2NX-40 | OK | OK | |
| certuspronx_evn | CertusPro-NX Evaluation Board | CertusPro-NX LFCPNX-100 | OK | OK | |
| certuspronx_versa_evn | CertusPro-NX Versa | CertusPro-NX LFCPNX-100 | OK | OK | |
| cmoda7_15t | Digilent CmodA7 | Artix xc7a15tcpg236 | OK | OK | |
| cmoda7_35t | Digilent CmodA7 | Artix xc7a35tcpg236 | OK | OK | |
| colorlight | Colorlight 5A-75B (version 7) | ECP5 LFE5U-25F-6BG256C | OK | OK | |
| colorlight-i5 | Colorlight I5 | ECP5 LFE5U-25F-6BG381C | OK | OK | Colorlight-i5-v7.0 ➚ |
| colorlight-i9 | Colorlight I9 | ECP5 LFE5U-45F-6BG381C | OK | OK | Colorlight-i9-v7.2 ➚ |
| colorlight-i9+ | Colorlight I9+ | Artix xc7a50tfgg484 | OK | OK | |
| crosslinknx_evn | Lattice CrossLink-NX Evaluation Board | Nexus LIFCL-40 | OK | OK | |
| cyc1000 | Trenz cyc1000 | Cyclone 10 LP 10CL025YU256C8G | OK | OK | |
| c10lp-refkit | Trenz c10lp-refkit | Cyclone 10 LP 10CL055YU484C8G | OK | OK | |
| c5g | Terasic C5G (Cyclone V GX Starter Kit) | Cyclone V GX 5CGXFC5C6F27C7N | OK | NT | |
| de0 | Terasic DE0 | Cyclone III EP3C16F484C6 | OK | NT | |
| de0nano | Terasic de0nano | Cyclone IV E EP4CE22F17C6 | OK | OK | |
| de0nanoSoc | Terasic de0nanoSoc | Cyclone V SoC 5CSEMA4U23C6 | OK | ||
| de10lite | Terasic de10lite | MAX 10 10M50DAF484C7G | OK | ||
| de10nano | Terasic de10Nano | Cyclone V SoC 5CSEBA6U23I7 | OK | ||
| de1Soc | Terasic DE1-SoC | Cyclone V SoC 5CSEMA5F31C6 | OK | ||
| deca | Arrow/Terasic DECA | MAX 10 10M50DAF484C6GES | OK | ||
| ecp5_evn | Lattice ECP5 5G Evaluation Board | ECP5G LFE5UM5G-85F | OK | OK | ECP5-EVN ➚ |
| ecpix5 | LambdaConcept ECPIX-5 (FT2232) | ECP5 LFE5UM5G-85F | OK | OK | ECPIX-5-45F ➚ ECPIX-5-85F ➚ |
| ecpix5_r03 | LambdaConcept ECPIX-5 (FT4232) | ECP5 LFE5UM5G-85F | OK | OK | ECPIX-5-45F ➚ ECPIX-5-85F ➚ |
| fireant | Fireant Trion T8 | Trion T8F81 | NA | AS | |
| fomu | Fomu PVT | iCE40UltraPlus UP5K | NA | OK | Fomu-PVT ➚ |
| gr740-mini | GR740-MINI | CertusPro-NX LFCPNX-100 | OK | NA | |
| honeycomb | honeycomb | littleBee GW1NS-2C | OK | IF | |
| hseda-xc6slx16 | XILINX SPARTAN6 XC6SLX16 Microblaze SDRAM USB2.0 FPGA | Spartan6 xc6slx16-ftg256 | OK | OK | |
| ice40_generic | iCEBreaker | iCE40UltraPlus UP5K | NA | AS | iCEBreaker ➚ |
| icebreaker-bitsy | iCEBreaker-bitsy | iCE40UltraPlus UP5K | NA | OK | iCEBreaker-bitsy-v0 ➚ iCEBreaker-bitsy-v1 ➚ |
| ice40_generic | icestick | iCE40 HX1k | NA | AS | IceStick ➚ |
| ice40_generic | iCE40-HX8K | iCE40 HX8k | OK | AS | iCE40-HX8K ➚ |
| ice40_generic | Olimex iCE40HX1K-EVB | iCE40 HX1k | NT | AS | iCE40HX1K-EVB ➚ |
| ice40_generic | Olimex iCE40HX8K-EVB | iCE40 HX8k | NT | AS | iCE40HX8K-EVB ➚ |
| ice40_generic | iCE40 UltraPlus Breakout Board (iCE40UP5K-B-EVN) | iCE40-UP5K | NT | AS | iCE40-UP ➚ |
| ice40_generic | Icezum Alhambra II | iCE40 HX4k | NT | AS | IceZumAlhambraII ➚ |
| kc705 | Xilinx KC705 | Kintex7 xc7k325t | OK | NT | KC705 ➚ |
| kcu105 | Xilinx KCU105 | Kintex UltraScale xcku040-ffva1156 | OK | OK | |
| kcu116 | Xilinx KCU116 | Kintex UltraScale+ xcku5p-ffvb676 | OK | OK | |
| LD-KONFEKT | Lone Dynamics Corporation - Machdyne Konfekt computer | ECP5 LFE5U-12F-6BG256C | OK | OK | |
| LD-SCHOKO | Lone Dynamics Corporation - Machdyne Schoko computer | ECP5 LFE5U-45F-6CABGA256 | OK | OK | |
| licheeTang | Sipeed Lichee Tang | eagle s20 EG4S20BG256 | OK | OK | |
| machXO2EVN | Lattice MachXO2 Breakout Board Evaluation Kit | MachXO2 LCMXO2-7000HE | OK | OK | |
| machXO3EVN | Lattice MachXO3D Development Board | MachXO3D LCMXO3D-9400HC | OK | NT | |
| machXO3SK | Lattice MachXO3LF Starter Kit | MachXO3 LCMX03LF-6900C | OK | OK | |
| mini_itx | Avnet Mini-ITX Base Kit | AMD Xilinx XC7Z045/XC7Z100-2FFG900 | OK | NA | |
| nexys_a7_50 | Digilent Nexys A7(Nexys 4 DDR) | Artix xc7a50tcsg324 | OK | OK | Nexys4DDR ➚ |
| nexys_a7_100 | Digilent Nexys A7(Nexys 4 DDR) | Artix nexys_a7_100 | OK | OK | Nexys4DDR ➚ |
| nexysVideo | Digilent Nexys Video | Artix xc7a200tsbg484 | OK | OK | |
| xem8320 | Opal Kelly XEM8320 | Artix UltraScale+ xcau25p-2ffvb676e | OK | TBD | |
| olimex_gatemateevb | Olimex CCGMA1 Cologne Chip GateMate FPGA Evaluation Board | Cologne Chip GateMate Series (GM1A1) | OK | NT | |
| orbtrace_dfu | ORBTrace mini (dfu mode) | ECP5 LFE5U-25F-8BG256C | NA | OK (DFU) | |
| orangeCrab | Orange Crab | ECP5 LFE5U-25F-8MG285C | OK (JTAG) | OK (DFU) | OrangeCrab-r0.2 ➚ |
| papilio_one | Papilio One | Spartan3E xc3s500e-vq100 | OK | OK | |
| pipistrello | Saanlima Pipistrello LX45 | Spartan6 xc6slx45-csg324 | OK | OK | |
| pynq_z1 | PYNQ-Z1 | Zynq7000 xc7z020clg400 | OK | NA | |
| pynq_z2 | PYNQ-Z2 | Zynq7000 xc7z020clg400 | OK | NA | |
| qmtechCyclone10 | QMTech Cyclone 10 Starter Kit | Cyclone 10 LP 10CL016YU484C8G | OK | OK | |
| qmtechCycloneIV | QMTech CycloneIV Core Board | Cyclone IV EP4CE15F23C8N | OK | OK | |
| qmtechCycloneV | QMTech CycloneV Core Board | Cyclone V 5CEFA2F23I7 | OK | OK | |
| qmtechCycloneV_5ce523 | QMTech CycloneV Core Board | Cyclone V 5CEFA5F23I7 | OK | OK | |
| qmtechKintex7 | QMTech Kintex7 Core Board | Kintex xc7k325tffg676 | OK | OK | |
| genesys2 | Digilent Kintex7 Evaluation Board | Kintex xc7k325tffg900 | OK | OK | |
| redpitaya14 | Redpitaya/STEMlab xc7z7010 with 125MHz 14 bits ADC | Zynq7000 xc7z010clg400 | OK | NA | |
| runber | SeeedStudio Gowin RUNBER | littleBee GW1N-4 | OK | IF/EF | |
| runber | Scarab Hardware MiniSpartan6+ | Spartan6 xc6slx25-3-ftg256 | OK | NT | |
| spartanEdgeAccelBoard | SeeedStudio Spartan Edge Accelerator Board | Spartan7 xc7s15ftgb196 | OK | NA | |
| SPEC150 | CERN Simple PCIe FMC carrier SPEC | Spartan6 xc6slx150Tfgg484 | OK | OK | |
| stlv7325 | Sitlinv STLV7325 Board | Kintex xc7k325tffg676 | OK | OK | |
| tangnano | Sipeed Tang Nano | littleBee GW1N-1 | OK | ||
| tangnano1k | Sipeed Tang Nano 1K | littleBee GW1NZ-1 | OK | IF | |
| tangnano4k | Sipeed Tang Nano 4K | littleBee GW1NSR-4C | OK | IF/EF | |
| tangnano9k | Sipeed Tang Nano 9K | littleBee GW1NR-9C | OK | IF/EF | |
| tangnano20k | Sipeed Tang Nano 20k | Gowin Arora GW2A(R)-18(C) | OK | EF | |
| tangprimer20k | Sipeed Tang Primer 20k | Gowin Arora GW2A(R)-18(C) | OK | EF | |
| tangprimer25k | Sipeed Tang Primer 25k | Gowin Arora V GW5A-25A (GW5A-LV25MG121) | OK | TBD | |
| tangmega138k | Sipeed Tang Mega 138k | Gowin Arora V GW5AST-138B (GW5AST-LV138FPG676A) | OK | TBD | |
| te0712_8 | Trenz Electronic TE0712 FPGA-Module mit AMD Artix™ 7(TE0712) | XC7A200TFBG484 | OK | OK | |
| tec0117 | Trenz Gowin LittleBee (TEC0117) | littleBee GW1NR-9 | OK | IF | |
| trion_t20_bga256_jtag | Efinix Trion T20 BGA256 Dev Kit | Trion T20BGA256 | OK | NT | |
| tec0330 | PCIe FMC Carrier with Xilinx Virtex-7 FPGA (TEC0330) | XC7VX330T-2FFG1157C | OK | OK | |
| trion_t120_bga576 | Efinix Trion T120 BGA576 Dev Kit (SPI mode) | Trion T120BGA576 | NA | AS | |
| trion_t120_bga576_jtag | Efinix Trion T120 BGA576 Dev Kit (JTAG mode) | Trion T120BGA576 | OK | OK | |
| trion_ti60_f225 | Efinix Titanium F225 Dev Kit (SPI mode) | Titanium Ti60F225 | NA | AS | |
| trion_ti60_f225_jtag | Efinix Titanium F225 Dev Kit (JTAG mode) | Titanium Ti60F225 | OK | OK | |
| ulx3s | Radiona ULX3S | ECP5 LFE5U | OK | OK | ULX3S-12F ➚ ULX3S-25F ➚ ULX3S-45F ➚ ULX3S-85F ➚ |
| ulx3s_dfu | Radiona ULX3S DFU mode | ECP5 LFE5U | NA | OK | |
| vec_v6 | Xilinx VCU118 | xc6vlx130tff784 | OK | OK | |
| vcu118 | Xilinx VCU118 | Virtex UltraScale+ xcvu9p-flga2104 | OK | OK | |
| vcu128 | Xilinx VCU128 | Virtex UltraScale+ xcvu37p-fsvh2892 | OK | OK | |
| vcu1525 | AMD Virtex UltraScale+ FPGA VCU1525 Acceleration Development Kit | Virtex UltraScale+ xcvu9p-fsgd2104 | OK | NT | |
| xtrx | FairWaves XTRXPro | Artix xc7a50tcpg236 | OK | OK | |
| xyloni_spi | Efinix Xyloni | Trion T8F81 | NA | AS | |
| usrpx300 | Ettus Research USRP X300 | Kintex xc7k325tffg900 | OK | NA | |
| usrpx310 | Ettus Research USRP X300 | Kintex xc7k410tffg900 | OK | NA | |
| xmf3 | PLDkit XMF3 | Xilinx xc3s200ft256, xcf01s | OK | OK | |
| zc702 | Xilinx ZC702 | zynq7000 xc7z020clg484 | OK | NA | |
| zc706 | Xilinx ZC706 | zynq7000 xc7z045ffg900 | OK | NA | ZC706 ➚ |
| zcu102 | Xilinx ZCU102 | zynqMPSoC XCZU9EG | OK | NA | |
| zcu106 | Xilinx ZCU106 | zynqMPSoC XCZU7EV | OK | NA | |
| zedboard | Avnet ZedBoard | zynq7000 xc7z020clg484 | OK | NA | ZedBoard ➚ |
| zybo_z7_10 | Digilent Zybo Z7-10 | zynq7000 xc7z010clg400 | OK | NA | |
| zybo_z7_20 | Digilent Zybo Z7-20 | zynq7000 xc7z020clg400 | OK | NA | |
| VMM3 | CERN board with VMM3 | xc7s50csga324? | OK | OK |
- IF: Internal Flash
- EF: External Flash
- AS: Active Serial flash mode
- NA: Not Available
- NT: Not Tested
CABLES
| keyword | Name | Description |
| anlogicCable | anlogic JTAG adapter | JTAG adapter firmware for stm32 |
| arm-usb-ocd-h | Olimex ARM-USB-OCD-H adapter | High-speed 3-IN-1 fast USB ARM JTAG, USB-to-RS232 virtual port and power supply 5VDC device |
| bus_blaster | Dangerousprototypes Bus Blaster | Jtag adapter based on ft2232 |
| bus_blaster_b | Dangerousprototypes Bus Blaster | Jtag adapter based on ft2232 (interface B) |
| ch347_jtag | ch347 JTAG adapter | QinHeng Electronics USB To UART+JTAG (mode 3) |
| ch552_jtag | ch552 JTAG adapter | Tang Nano USB-JTAG interface. FT2232C clone firmware for CH552 microcontroler |
| cmsisdap | ARM CMSIS DAP protocol interface | ARM CMSIS DAP protocol interface (hid only) |
| gatemate_pgm | gatemate pgm | Cologne Chip GateMate FPGA Programmer. FT232H-based JTAG/SPI programmer cable |
| gatemate_evb_jtag | gatemate evb JTAG | Cologne Chip GateMate JTAG programmer |
| gatemate_evb_spi | gatemate evb spi | Cologne Chip GateMate SPI programmer |
| dfu | DFU interface | DFU (Device Firmware Upgrade) USB device compatible with DFU protocol |
| digilent | digilent cable | FT2232 JTAG / UART cable |
| diglent_b | digilent cable | digilent FT2232 JTAG / UART cable (interface B) |
| digilent_hs2 | digilent hs2 cable | FT232H JTAG programmer cable from digilent |
| digilent_hs3 | digilent hs3 | JTAG programmer cable from digilent |
| dirtyJtag | dirty Jtag | JTAG probe firmware for STM32F1 |
| efinix_spi_ft4232 | efinix SPI (ft4232) | efinix SPI interface (FTDI4232 interface A) |
| efinix_jtag_ft4232 | efinix JTAG (ft4232) | efinix JTAG interface (FTDI4232 interface B) |
| efinix_spi_ft2232 | efinix SPI (ft2232) | efinix SPI interface (FTDI2232 interface A) |
| efinix_jtag_ft2232 | efinix JTAG (ft2232) | efinix JTAG interface (FTDI2232 interface B) |
| ft2232 | FT2232 C/D/H | generic programmer cable based on Ftdi FT2232 (interface A) |
| ft2232 | Tang Nano (1k, 4k, 8k) USB-JTAG interface | USB-JTAG/UART debugger based on BL702 microcontroler. |
| ft2232 | Sipeed RV-Debugger-BL702 | RV-Debugger-BL702 is an opensource project that implement a JTAG+UART debugger with BL702C-A0. |
| ft2232 | honeycomb USB-JTAG interface. | FT2232C clone based on STM32F042 microcontroler |
| ft2232_b | FT2232 C/D/H | generic programmer cable based on Ftdi FT2232 (interface B) |
| ft231X | FT231X | generic USB<->UART converters in bitbang mode (with some limitations and workaround) |
| ft232 | FT232H | generic programmer cable based on Ftdi FT232Hx. One interface, MPSSE capable |
| ft232RL | FT232RL | generic USB<->UART converters in bitbang mode (with some limitations and workaround) |
| ft4232 | FT4232 | quad interface programmer cable. MPSSE capable. |
| ft4232hp | FT4232HP (interface A) | quad interface programmer cable. MPSSE capable. High Speed USB Bridge with Type-C/PD3.0 Controller |
| ft4232hp_b | FT4232HP (interface B) | quad interface programmer cable. MPSSE capable. High Speed USB Bridge with Type-C/PD3.0 Controller |
| ecpix5-debug | ecpix5-debug | LambdaConcept ECPIX5 (45k/85k) UART/JTAG interface |
| jlink | jlink | SEGGER J-Link Debug Probes |
| jlink | jlink_base | SEGGER J-Link BASE Debug Probes |
| jlink | jtrace_pro | SEGGER J-Trace PRO Debug Probes |
| jtag-smt2-nc | jtag-smt2-nc | JTAG-SMT2-NC Surface-mount Programming Module |
| lpc-link2 | lpc-link2 | LPC-Link2 (OM13054) cmsisDAP firmware |
| orbtrace | orbtrace interface | Open source FPGA-based debug and trace interface |
| papilio | papilio | Papilio FPGA Platform |
| steppenprobe | steppenprobe | Open Source Hardware JTAG/SWD/UART/SWO interface board based on FTDI FT2232H |
| remote-bitgang | OpenOCD remote bitbang | The remote_bitbang JTAG driver is used to drive JTAG from a remote (TCP) process |
| tigard | tigard | SWD/JTAG/UART/SPI programmer based on Ftdi FT2232HQ |
| usb-blaster | intel USB Blaster I interface | JTAG programmer cable from intel/altera (FT245 + EPM7064) |
| usb-blasterII | intel USB Blaster II interface | JTAG programmer cable from intel/altera (EZ-USB FX2 + EPM570) |
| xvc-client | Xilinx Virtual Cable | Xilinx Virtual Cable (XVC) is a TCP/IP-based protocol that acts like a JTAG cable. |
| xvc-server | Xilinx Virtual Cable (server side) | Xilinx Virtual Cable (XVC) is a TCP/IP-based protocol that acts like a JTAG cable. |
| libgpiod | Bitbang GPIO | Bitbang GPIO pins on Linux host. |
| jetson-nano-gpio | Bitbang GPIO | Bitbang GPIO pins on Jetson Nano Linux host. Use /dev/mem to have a faster clock. |
| ch347 | CH347 | CH347 is a USB HS bus converter with UART, I2C, SPI and JTAG interfaces |
ANLOGIC NOTES
Sipeed Lichee Tang
For this target, openFPGALoader supports svf and bit.
bit file load (memory)
openFPGALoader -m -b licheeTang /somewhere/project/prj/*.bit
Since -m is the default, this argument is optional.
bit file load (spi flash)
openFPGALoader -f -b licheeTang /somewhere/project/prj/*.bit
svf file load
It’s possible to produce this file by using TD:
- Tools->Device Chain
- Add your bit file
- Option : Create svf
or by using prjtang project:
mkdir build cd build cmake ../ make
Now a file called tangbit is present in current directory and has to be used as follows:
tangbit --input /somewhere.bit --svf bitstream.svf
openFPGALoader -b licheeTang /somewhere/*.svf
COLOGNE CHIP NOTES
Supported Boards/Cables
- GateMate Evaluation Board using board parameters -b gatemate_evb_jtag or -b gatemate_evb_spi
- GateMate Programmer using cable parameter -c gatemate_pgm
Programming Modes
Supported configuration files are bitfiles *.bit and it’s ASCII equivalents *.cfg.
JTAG Configuration
Performs an active hardware reset and writes the configuration into the FPGA latches via JTAG. The configuration mode pins CFG_MD[3:0] must be set to 0xC (JTAG).
- 1.
- Program using Evaluation Board:
openFPGALoader -b gatemate_evb_jtag <bitfile>.cfg.bit
- 2.
- Program using Programmer Cable:
openFPGALoader -c gatemate_pgm <bitfile>.cfg.bit
SPI Configuration
Performs an active hardware reset and writes the configuration into the FPGA latches via SPI. The configuration mode pins CFG_MD[3:0] must be set to 0x4 (SPI passive).
- 1.
- Program using Evaluation Board:
openFPGALoader -b gatemate_evb_spi <bitfile>.cfg.bit
- 2.
- Program using Programmer Cable:
openFPGALoader -b gatemate_pgm_spi <bitfile>.cfg.bit
JTAG Flash Access
It is possible to access external flashes via the internal JTAG-SPI-bypass. The configuration mode pins CFG_MD[3:0] must be set to 0xC (JTAG). Note that the FPGA will not start automatically.
- 1.
- Write to flash using Evaluation Board:
openFPGALoader -b gatemate_evb_jtag <bitfile>.cfg.bit
- 2.
- Write to flash using Programmer Cable:
openFPGALoader -c gatemate_pgm -f <bitfile>.cfg.bit
The offset parameter can be used to store data at any point in the flash, e.g.:
openFPGALoader -b gatemate_evb_jtag -o <offset> <bitfile>.cfg.bit
SPI Flash Access
If the programming device and FPGA share the same SPI signals, it is possible to hold the FPGA in reset and write data to the flash. The configuration mode can be set as desired. If the FPGA should start from the external memory after reset, the configuration mode pins CFG_MD[3:0] set to 0x0 (SPI active).
- 1.
- Write to flash using Evaluation Board:
openFPGALoader -b gatemate_evb_spi -f <bitfile>.cfg.bit
- 2.
- Write to flash using Programmer Cable:
openFPGALoader -b gatemate_pgm_spi -f <bitfile>.cfg.bit
The offset parameter can be used to store data at any point in the flash, e.g.:
openFPGALoader -b gatemate_evb_spi -o <offset> <bitfile>.cfg.bit
EFINIX NOTES
Firant and Xyloni boards (efinix trion T8)
.hex file is the default format generated by Efinity IDE, so nothing special must be done to generates this file.
openFPGALoader supports only active mode (SPI) (JTAG is WIP).
hex file load
openFPGALoader -b fireant /somewhere/project/outflow/*.hex
or, for xyloni board
openFPGALoader -b xyloni_spi /somewhere/project/outflow/*.hex
Since openFPGALoader access the flash directly in SPI mode the -b fireant, -b xyloni_spi is required (no autodetection possible).
Trion and Titanium JTAG usage
openFPGALoader supports loading to RAM and SPI Flash with JTAG
Tested with J-Link BASE
bin file load
openFPGALoader --cable jlink_base -m /somewhere/project/outflow/*.bin
hex file flash
Example for ti60f225. NOTE: JTAG chains with more than one device (eg –index-chain) are currently not supported for writing to SPI flash
openFPGALoader --cable jlink_base --fpga-part ti60f225 -f /somewhere/project/outflow/*.hex
GOWIN NOTES
GOWIN GW1N
NOTE:
- Trenz TEC0117
- Sipeed Tang Nano
- Sipeed Tang Nano 4K
- Honeycomb
- RUNBER
.fs file is the default format generated by Gowin IDE, so nothing special must be done to generates this file.
Since the same file is used for SRAM and Flash a CLI argument is used to specify the destination.
Flash SRAM
with -m:
openFPGALoader -m -b BOARD_NAME impl/pnr/*.fs
where BOARD_NAME is:
- tec0117
- tangnano
- tangnano1k
- tangnano4k
- tangnano9k
- tangnano20k
- tangprimer20k
- runber
Flash
ATTENTION:
with -f, file load:
openFPGALoader -f -b BOARD_NAME impl/pnr/*.fs
where BOARD_NAME is:
- tec0117
- runber
It’s possible to flash external SPI Flash (connected to MSPI) in bscan mode by using --external-flash instead of -f.
NOTE:
INTEL NOTES
Intel/Altera
NOTE:
- CYC1000
- C10LP-RefKit
- DE0
- de0nano
Loading a bitstream
SVF and RBF files are supported.
sof to svf generation:
quartus_cpf -c -q 12.0MHz -g 3.3 -n p project_name.sof project_name.svf
sof to rbf generation:
quartus_cpf --option=bitstream_compression=off -c project_name.sof project_name.rbf
WARNING:
file load:
openFPGALoader -b boardname project_name.svf # or openFPGALoader -b boardname project_name.rbf
with boardname = de0, cyc1000, c10lp-refkit, de0nano, de0nanoSoc or qmtechCycloneV.
SPI flash
RPD and RBF are supported.
sof to rpd:
# CYC1000 quartus_cpf -o auto_create_rpd=on -c -d EPCQ16A -s 10CL025YU256C8G project_name.svf project_name.jic # C10LP-RefKit quartus_cpf -o auto_create_rpd=on -c -d EPCQ16A -s 10CL055YU484C8G project_name.svf project_name.jic
file load:
openFPGALoader -b boardname -r project_name_auto.rpd # or openFPGALoader -b boardname -r project_name.rbf
with boardname = cyc1000, c10lp-refkit.
LATTICE NOTES
MachXO2/MachXO3
Flash memory
.jed file is the default format generated by Lattice Diamond, so nothing special must be done to generates this file.
File load:
openFPGALoader [-b yourboard] [--flash-sector CFG0] impl1/*.jed
where yourboard may be:
- machX02EVN
- machX03EVN
- machXO3SK
and where --flash-sector CFG0 is needed for the MachXO3D Breakout Board.
.bit may also be used for machXO2
SRAM
To generates .bit file Bitstream file must be checked under Exports Files in Lattice Diamond left panel.
File load:
openFPGALoader [-b yourboard] impl1/*.bit
where yourboard may be:
- machX02EVN
- machX03EVN
- machXO3SK
iCE40
.bin is the default format generated by nextpnr, so nothing special must be done.
Since most ice40 boards uses the same pinout between FTDI and SPI flash a generic ice40_generic board is provided.
For the specific case of the iCE40HXXK-EVB where no onboard programmer is present, please use this:
| FTDI | iCE40HXXK-EVB |
| SI (ADBUS1) | Pin 8 |
| SCK (ADBUS0) | Pin 9 |
| SO (ADBUS2) | Pin 7 |
| CS (ABDUS4) | Pin 10 |
| RST (ADBUS6 | Pin 6 |
| DONE (ADBUS7) | Pin 5 |
Bin file load:
openFPGALoader -b ice40_generic /somewhere/*.bin
Since it's a direct access to the flash (SPI) the -b option is required.
ECP5/Crosslink-NX
SRAM
openFPGALoader [-b yourBoard] [-c yourCable] -m project_name/*.bit
HINT:
SPI Flash
BIT:
openFPGALoader [-b yourBoard] [-c yourCable] -f project_name/*.bit # or *.bin
MCS:
To generate .mcs file PROM File must be checked under Exports Files in Lattice Diamond left panel.
openFPGALoader [-b yourBoard] [-c yourCable] project_name/*.mcs
XILINX NOTES
To simplify further explanations, we consider the project is generated in the current directory.
NOTE:
- 1.
- Spartan Edge Accelerator Board has only pinheader, so the cable must be provided
- 2.
- A JTAG <-> SPI bridge (used to write bitstream in FLASH) is available for some device, see spiOverJtag to check if your model is supported.
- 3.
- Board provides the device/package model, but if the targeted board is not officially supported but the FPGA yes, you can use --fpga-part to provide the model.
- 4.
- With spartan3, the flash is an independent JTAG device. User has to use --index-chain to access FPGA (RAM only) or flash (write/read only).
WARNING:
.bit file is the default format generated by vivado, so nothing special task must be done to generate this bitstream.
.bin is not, by default, produced. To have access to this file you need to configure the tool:
- GUI: Tools -> Settings -> Bitstreams -> check -bin_file.
- TCL: append your TCL file with set_property STEPS.WRITE_BITSTREAM.ARGS.BIN_FILE true [get_runs impl_1].
WARNING:
WARNING:
Loading a bitstream
.bit and .bin are allowed to be loaded in memory.
File load:
openFPGALoader [-m] -b arty *.runs/impl_1/*.bit (or *.bin)
or
openFPGALoader [-m] -b spartanEdgeAccelBoard -c digilent_hs2 *.runs/impl_1/*.bit (or *.bin)
SPI flash
NOTE:
.mcs must be generated through Vivado with a tcl script like:
WARNING:
set project [lindex $argv 0]
set bitfile "${project}.runs/impl_1/${project}.bit"
set mcsfile "${project}.runs/impl_1/${project}.mcs"
write_cfgmem -format mcs -interface spix4 -size 16 \
-loadbit "up 0x0 $bitfile" -loaddata "" \
-file $mcsfile -force
NOTE:
The tcl script is used with:
vivado -nolog -nojournal -mode batch -source script.tcl -tclargs myproject
File load:
openFPGALoader [--fpga-part xxxx] -f -b arty *.runs/impl_1/*.mcs (or .bit / .bin)
NOTE:
NOTE:
Some boards with UltraScale FPGAs, like the VCU118 and KCU16, support the SPIx8 (Dual Quad SPI) configuration. In this case, the spix8 option write_cfgmem on the above example can be used to generate two .mcs files, to fit bigger designs or for faster programming. Only .mcs files can be used to program the FPGA in this case.
In this case, to load the two .mcs files:
openFPGALoader --board vcu118 -f --target-flash both --bitstream *.runs/impl_1/*_primary.mcs --secondary-bitstream *.runs/impl_1/*_secondary.mcs
On these boards, each SPI flash can be programmed independently with the --target-flash option. The default target is the primary flash.
For example, to program only the secondary flash with arbitrary data not related to FPGA configuration:
openFPGALoader --board vcu118 -f --target-flash secondary --bitstream arbitrary_data
TO DO
Global
- improve error message (be more precise)
- catch all exception
- documentation (code + API)
Cable
- fix ch552 (Sipeed tangNano): works with SRAM, fails with Flash
- busblaster support
- anlogic cable support
Devices/boards
- improve frequency configuration. Use FPGA, cable or –freq args maximum frequency
- rework cyclone10 eeprom access to avoid using FT2232 interfaceB Spi emulation (only supported by trenz board)
- fix checksum computation with gowin GW2A
- add support for tangPrimer (anlogic EG4S20)
Misc
- •
- fix spiFlash class to be able to write everywhere (currently offset is hardcoded to 0)
AUTHOR
Gwenhael Goavec-Merou and contributors
COPYRIGHT
2019-2024, Gwenhael Goavec-Merou and contributors
| March 26, 2024 | latest |
