"

BENJAMIN BLUNDELL'S  WEBSITE
----------------------------

Setup for the Scarab miniSpartan3 FPGA

20-12-2017

A long time ago, I bought one of the Scarab FPGA development boards which breaks out the Spartan 3 FPGA at a cheap price. Like many nerds, this sat in my box of bits for quite a long time. I've since started a project with my friend Will and although we are looking at a later Xilinx FPGA, I figured it might be worth trying to get this board setup, preferably on Linux. I had some trouble with this so if you've been having trouble getting this older board setup, I might be able to help.

### The miniSpartan3 Scarab

Now Scarab have a custom IDE but this didn't work for me. Indeed, support is very limited for this board now. It's really beenn superceeded by other projects but at the time, it was quite popular and you can still do handy things with it I'd say.

### Vagrant setup

I decided to use a virtual machine, and that Vagrant might be a good way to keep things organised. There are instructions on how to get the software to work on Arch Linux but it seems to be a lot more faff and using virtual machines keeps things neat, so after a lot of messing about and failure, I just decided to use Vagrant.

If you aren't familiar with Vagrant have a look at this link. I decided to go with the Ubuntu Precise Pangolin LTS Vagrant box which seems to work fine. It has all the bits in the right places and it's just a bit easier than messing around with things. Make sure you create a larger hard-disk. The following Vagrant file should work. I went with about 60G of harddisk space. Overkill a little. You might be able to get away with 30G instead. The Xilinx stuff takes up a lot of space.


Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/precise64"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 2
v.gui = true
v.customize ["modifyhd", "disk id", "--resize", "61440"]
end
config.ssh.forward_x11 = true
end



Now my approach was to do all the building and work inside the VM. This means I need to use Xorg and get away from the headless approach. To that end, one needs install a lot of extra packages. The bootstrap.sh file looks a little like this:


#!/usr/bin/env bash
apt-get update



This is a little overkill - I should probably cut this down but all the packages you need seem to be there.

### Xilinx ISE Webpack

The version I'm using of the Xilinx ISE is 14.7.

The newer program, Vivado is what Xilinx would like you to use now. You can still get this older package from http://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/design-tools.html here.

The Arch Linux page has some good advice on how to install this if you get stuck: https://wiki.archlinux.org/index.php/Xilinx_ISE_WebPACK.

Ultimately, the Xilinx ISE Webpack is freeware, but you will need to download a licence. These are now available from Xilinx for free.

Copy the installation files into your shared vagrant directory and then copy it into your VM. If you are using VirtualBox, you can launch the VirtualBox program itself and see your machine running away. Double click on the machine and you'll get a screen you can interact with - your Xorg window. From here we can run the installer.


tar -xvf Xilinx_ISE_DS_Lin_14.7_1015_1.tar
./xsetup


As we are running in a VM with a head, the visual installer should work fine.

### Launching the IDE

So the first thing to do is make an LED flash right? It is the helloworld of hardware afterall. We need to launch the design tools first though. Assuming you followed the standard install you can do this:


source /opt/Xilinx/14.7/ISE_DS/settings64.sh
ise


### Further steps

From here you have a couple of choices. Start a new project and work it though, or copy the project I've uploaded to git - https://github.com/OniDaito/Scarab3HelloWorld

I'll be writing up this basic LED tutorial in another post, along with a little more about FPGAs in general. For now though, there is a good tutorial you can find at http://users.wpi.edu/~rjduck/Spartan3_Tutorial.pdf. It is a little old but gets across the basics.