VILLASfpga 
VILLASfpga interconnects simulators and devices under test (DUT) for hardware-in-the-loop simulation using hard real-time-capable interfaces. VILLASfpga can guarantee fixed latencies in the nanosecond range. VILLASfpga uses Xilinx FPGA evaluation boards to interface such devices with each other and with the Linux host system via PCI Express.
It implements intellectual property (IP) cores for connecting:
- GTFPGA (aka
RTDS_InterfaceModule)- RTDS
- Xilinx' Aurora.
- OPAL-RT
- RTDS
- AixControl units
- Integration with all VILLASnode node-types via PCIexpress and DMA transfers.
- FPGA models built with
- Simulink by using Xilinx' System Generator.
- C / C++ by using Xilinx' High Level Synthesis.
VILLASfpga can be configured to connect these interfaces in an arbitrary fashion without the need to generate a new bitstream. This is realized by using a software-configurable switch in the FPGA fabric.
VILLASfpga is based on ARM's AXI-4 Stream interfaces and therefore relies on Xilinx's Vivado toolchain. This limits the range of supported FPGA families to Virtex 6, 7, and the newer Ultrascale devices. Bitstreams for the Xilinx VC707 FPGA evaluation board are available upon request.
Repositories
The VILLASfpga project is split into two Git repositories:
- VILLASfpga contains the C++ driver library and a few example applications
- VILLASfpga-hardware contains the Xilinx FPGA design based on Vivado
Building
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
git clone https://github.com/VILLASframework/fpga
pushd VILLASfpga
git submodule update --init --recursive
mkdir -p thirdparty/libxil/build
pushd thirdparty/libxil/build
cmake ..
sudo make -j$(nproc) install
popd
mkdir build
cmake ..
sudo make -j$(nproc) install
ldconfig
Running loopback test
Check that system is booted with IOMMU support:
find /sys | grep dmar
If not, add intel_iommu=on to the kernel command line and reboot.
sudo modprobe vfio
sudo modprobe vfio_pci
sudo VILLASfpga/build/src/villas-fpga-pipe