Elbert V2 FPGA Programming Tips
11 Dec 2021About
The Elbert V2 is an entry level FPGA board manufactured by Numato Lab. It has a Xilinx Spartan 3a FPGA, and 16 Mb SPI flash memory. This blog is about how to generate (“synthesize”) bitstream for it and how to program the bitstream to it, in Linux.
Install Xilinx ISE Webpack on Linux
The Xilinx ISE Webpack is the official (and only?) tool to generate bitstream
for Xilinx FPGAs. The download and installation process is a full of roadblocks
and in great lack of documentation, but in the end the Linux version worked out
pretty well for me. The tool is free, though to download you need first create
an account with Xilinx and get a free license (that lasts a year?). Then the
installation package is composed of four individual tarballs, each is about 2GB
in size. Extract the first one, ending with .tar, a file called xsetup
will
be present in the root directory, which is the installer. Run it and it’ll
guide you through the installation process. The installation is relatively
painless, except… that when the installation completes, the wizards simply
exists, leaving you wondering where the heck the program had been installed to.
Towards the end of the installation, it’ll ask you an installation location,
though at that location the installer will create a deep chain of directories
and dozens of files. The final program, ISE, is at
$INSTALL_DIR/14.7/ISE_DS/ISE/bin/lin64/ise
(14.7 is the version of the ISE
webpack installed so yours may be different, and lin64 is the 64-bit version;
there is a 32-bit version too). One more thing you need to be aware, is that
before invoking that program, you’ll need to source
a shell script installed
at $INSTALL_DIR/14.7/ISE_DS/settings64.sh
(again, note the version and
64-bit).
Once you’ve worked around all that, the actual ISE program is nicely designed, runs pretty smoothly. You can create projects, loading existing projects, generating bitstreams, etc.
Programming Elbert V2 SPI Flash
The Elbert V2 can be connected to a Linux PC via USB, and the standard CDC_ACM
Linux kernel module will create a pseudo tty device, e.g., /dev/ttyACM0
for
connected Elbert V2. To program a bitstream file (with the file
extension .bin
) to the Elbert V2, there is a python script provided by Numato
Lab:
https://github.com/numato/samplecode/blob/master/FPGA/ElbertV2/tools/configuration/python/elbertconfig.py. The only thing to note here is the need to have the pyserial
library, otherwise programming works like a charm: python elbertconfig.py /dev/ttyACM0 <bistream-file.bin>
.