Play with (y)our FPGA

We love FPGAs, but we know it can be quite the trouble to get started using an FPGA on an application level. So we turned our SmartScope code into a simple FPGA maker kit and published all that, together with a short howto.

In less than an hour, we show you how to have your own code running inside the SmartScope, and even control that firmware from your Android device.

Makerkit android

Application

The little app shown on the left works together with the sample FPGA code. Download it for desktop or android.

You can find the source code in the makerkit folder of the DeviceInterface git repository. To get started real quick, just get this zip archive of the makerkit branch, which already contains all project files and is ready to open using Monodevelop, Xamarin or Visual Studio.

FPGA code

To get started, you can use the FPGA firmware integrated in the software. To dive in, check out the FPGA repository (zip) and compile with Xilinx ISE.

Pcb bare

Compile your own design

You can easily open the SmartScopeMakerKit.xise project file with the Xilinx software and get started from there. It's a pretty straight-forward development environment, for which already plenty of guides and even videos have been made.

If you're not afraid to dive into a command line environment, and like to work with your favourite plain text editor, it's the quickest way to get a firmware compiled, though needs a bit more of your brain power than the GUI way. It's explained further below.

Prerequisites

Windows Linux

Compiling on the command line

In a bash (git-bash on windows) console, change directory (cd) to the folder where you want to clone the FPGA repository to.

# cd /c/Users/Jos/

Clone the repository and step into its folder

# git clone https://github.com/labnation/fpga          
# cd fpga

Set the XILINX_BIN_DIR environment variable to where the ISE suite was installed

# export XILINX_BIN_DIR=/c/Xilinx/14.7/ISE_DS/ISE/bin/nt

Finally run the build script

# ./build/build.sh

The next time you run this script, you might want to add the ‑‑noregen argument to the script. This avoid regenerating the IP cores (PLL, RAM blocks) on every build, which will save you a lot of time

# ./build/build.sh --noregen

After the script completes, you'll get a notice that wbtc.exe crashed You can ignore this (Xilinx produced) error. The firmware bin-file can be found in the bitstreams directory (i.e. c:\Users\Jos\fpga\bitstreams\SmartScopeMakerKit.bin).

Console ise windows