Because of its ubiquity, USB provides a good mechanism for JTAG-programming Field-Programmable Gate Arrays, but it also provides a good conduit for the host to exchange data with the FPGA, once programmed. FPGA development kits incorporating some kind of USB-capable microcontroller are common, and cheap. Unfortunately there is a confusing variety of different devkits, with different FPGAs and different USB microcontrollers, and a general lack of good software and firmware for interacting with them, and the software that is provided is often released under a restrictive license, or only available for one platform.
The FPGALink library is my attempt to provide an end-to end solution capable of JTAG-programming the FPGA on a variety of USB-based hardware platforms, and subsequently communicating with it using a straightforward API on the host side and a standard FIFO interface on the FPGA side. It works on many host and FPGA platforms. All source code is released under the GNU Lesser General Public License v3.0, meaning you are free to distribute unmodified copies of it (or binaries built from unmodified source) with your products. It has no commercial or hardware platform usage restrictions (cf. Digilent Adept may only be used on Digilent hardware), so you can prototype your design with an inexpensive devkit, and then use the same software tools on your custom-built PCBs, so you can easily distribute updated FPGA designs to your customers just as you would with firmware updates, with no special programming cables required, making your FPGA truly "field-programmable".
The source code should compile with minor changes on most modern platforms. Binaries are provided for the following platforms:
|Linux||x86_64, i686, arm, ppc|
The FPGALink library is just a C DLL, so using it from C and C++ is straightforward. Bindings are provided for Python and Excel/VBA. Simple examples are provided for all three languages. There is also a utility which provides straightforward command-line access to many of the library functions.
On the FPGA side, all HDL code is provided in separate VHDL & Verilog implementations. The VHDL code includes GHDL/GTKWave-based simulation testbenches. Xilinx and Altera target FPGAs are supported. There is firmware support for the Cypress FX2LP and the USB-capable Atmel AVR8s. There are a couple of ready-made example FPGA designs with platform support for these boards:
- KNJN Xylo-L
- Digilent Atlys
- Digilent Nexys2 (500K & 1200K editions)
- Digilent Nexys3
- Digilent S3BOARD (needs FX2 add-on board)
- EP2C5 Mini Board (needs Minimus USB AVR Board or similar)
However, there are many FPGA devkits available with basically FPGALink-compatible hardware, so if you have a board that is not listed here that you'd like to use with FPGALink, send a message to the FPGALink User Group.