Table of Contents

Virtex6 XC6VLX365T PCI-Express dev board

Around October 2021 I was searching Aliexpress and found a Chinese-made Virtex6 coprocessor board being sold by HPC FPGA Board Store. It cost around £70 at the time, and appeared to have some impressive features:

The design files (Mediafire link) include a pin map (in the form of an Excel spreadsheet) and some demo code, but no schematic diagram and very little English documentation.

I/O and peripherals

USB Serial port

A CH340 USB serial port is fitted above the SFPs, and connects to a standard mini USB connector.

Switches

There are three switches near the SFP connectors:

LEDs

There are eight LEDs numbered D3 to D10. These are lit when the respective I/O pin (see spreadsheet) is pulled low.

GPIO header

A 78-pin (39 way, 2 row) 0.1in pin header carries 67 GPIOs. There is a mix of LVDS and LVTTL, as well as two LVDS GCLK (global clock) lanes.

PCI Express

The board is equipped with a PCI Express connector, which can operate in the x1, x4 or x8 speed modes.

Speed configuration is done via switch bank U8, near the PCIe connector:

Setting up the development environment

Install ISE 14.7 System Edition, and use the licence included with the demo board design files. Without a licence, ISE will only allow the XC6VLX75 device to be selected.

Demo projects

The design files (RAR archive) include a number of test projects:

PCI Express

First take the orange tape off the PCIe DIP switch bank, and turn on the top three switches by moving them to the right. This enables PCI Express with a maximum lane width of x8.

If the FPGA is being loaded from a 'bit' file (not the SPI Flash), then the PC must be rebooted without powering off after the FPGA is loaded. This is because the PCI Express bus is only scanned on boot.

Under Linux, it is possible to check the card's link speed and PCIe lane width:

user@thinclient:~$ lspci
...
01:00.0 Memory controller: Xilinx Corporation Device 6018
...
user@thinclient:~$ cat /sys/bus/pci/devices/0000\:01\:00.0/current_link_speed 
2.5 GT/s
user@thinclient:~$ cat /sys/bus/pci/devices/0000\:01\:00.0/current_link_width 
4

I'm testing on a HP t610 Plus thin client, which has a single PCIe x4 connector, hence the 4-lane limit. The speed of 2.5 GT/s indicates that PCI Express Gen-1 is in use.

The Linux driver in the original RIFFA repository doesn't build on later kernels, but an updated version is available. To test the card:

  1. cd riffa/driver/linux && make && sudo make install
  2. sudo modprobe riffa – you can use dmesg to see if the RIFFA driver was loaded.
  3. cd c_c++/linux/x64/sample_app && make
  4. ./testutil 0 displays the devices which RIFFA can detect.
  5. ./testutil 2 0 0 10000000 performs a speed test.

It may be possible to rescan the PCIe bus and reset the card, provided the PCIe BAR configuration has not changed. This Stackoverflow thread presents some options, but I have not tried them.

Hardware design

The RIFFA documentation provides information on implementing a RIFFA channel interface to produce or consume data.

Software side -- device access

With RIFFA this would generally be done with the RIFFA libraries.

This Reddit FPGA subreddit post explains how to mmap the PCI resource (/sys/devices/pci<partial_device_id>/<device_id>/resourceN) and directly read and write registers.

RIFFA alternatives

Issues