However, each of these boards has a pretty glaring problem in my eyes, and that is the lack of support for any fpga bitstream generation tools on ARM, meaning you would have to use another PC to develop for the FPGA and then transfer files around. All is not lost however, there are ways around this problem!
Solution:
Use that x86-based server you have that's spends 90% of it's time doing nothing and make it do all the work for you! Allowing you to code for your fpga using any device as long as it has access to the internet, git support, and some kind of text editor.
Here's how I did it:
I'll probably post each step of this in more detail over the next few weeks, but for now here's a quick overview of how my system works.
First, you'll need a server to house your projects git repository, with enough space to also hold an installation of the Xilinx tools (this requires around 20GB or so), I currently use and recommend the basic Linode plan (referral link). In order to install the Xilinx tools I just gzipped up my /opt/Xilinx folder and scp'd it over, then extracted it into the same directory. I also had to install the webpack license file into ~/.Xilinx/Xilinx.lic for each user that was going to be using the tools.
You will then need to set up a git server if you haven't already, this isn't too hard to do, instructions can be found here.
You'll also need to set up your server to be able to send you emails (receiving isn't necessary), there are various guides on different methods of doing this (and your server likely already has this set up), so I'll leave this up to you for now.
Now for the good stuff, making git build the code and send back the .bit file in an email (or at least the logs if there is an error). Luckily git makes this very simple! The git developers were smart enough to include some useful hooks, one of which happens to run after each push to the server is completed!
In order to make use of this, you first need to create an empty git repository on your server:
(as the git user)
mkdir repo_name.git cd repo_name.git git --bare init
Now navigate to the .hooks folder in this repository, and create a post_receive file. This will contain a script that will be run after each push to the server is completed. Edit the file and paste in these contents (modify them where necessary for your own project and preferences):
post_receive:
#!/bin/bash MAKE_OUTPUT=output.bit #change this for your project TEMP_DIR=/home/git/temp_git_stuff # make sure this directory exists and is able to be used by whatever user is controlling your git repos EMAIL=your@email.com # make sure to put your own email ;) CHECK_COMMIT=`git log -1 | grep BUILD` # you can make it whatever you want, I prefer BUILD though. if [[ -n $CHECK_COMMIT ]]; then GIT_WORK_TREE=$TEMP_DIR git checkout -f cd $TEMP_DIR source xilinx_settings.sh # see below, this sets up my xilinx environment, replace with settings32 or 64.sh if you'd prefer make > make.log curr_time=`date +"%F %T"` if [[ -e $MAKE_OUTPUT ]]; then cat make.log | mutt $EMAIL -s "Build Success: $curr_time" -a $MAKE_OUTPUT -a make.log # you can remove the initial cat so that you will have an email with no body text else cat make.log | mutt $EMAIL -s "Build Failed: $curr_time" -a make.log fi rm -r $TEMP_DIR/* # clean-up, optional fi
Save that file and make it executable (I use chmod +x post_receive). If you use that file exactly you'll also want to use my xilinx_settings.sh file. You can source the normal Xilinx settings{32,64}.sh file if you'd prefer, mine just does the same thing but works in zsh as well:
xilnx_settings.sh:
#!/bin/bash # Fixed settings file for Xilinx ISE Development tools # May need to update XILINX_DIR and SETTINGS_FILE based upon your own setup # This probably wont work for all shells, and it isn't exactly an elegant # solution, but it does make things work on my zsh setup, so I'm happy. # Note that the commented code near the bottom might help make things a # little nicer/cleaner, though I was unable to get the for loop just right # for zsh to accept it, I'll leave it there in case other wish to give it a go. XILINX_DIR="/opt/Xilinx/14.7/ISE_DS" SETTINGS_FILE=.settings64.sh . "$XILINX_DIR/common/$SETTINGS_FILE" "$XILINX_DIR/common" . "$XILINX_DIR/EDK/$SETTINGS_FILE" "$XILINX_DIR/EDK" . "$XILINX_DIR/PlanAhead/$SETTINGS_FILE" "$XILINX_DIR/PlanAhead" . "$XILINX_DIR/ISE/$SETTINGS_FILE" "$XILINX_DIR/ISE"
Now all that you need is a project with a Makefile! (you can see an example of one I have created here for the Basys 2 board from digilent).
Unfortunately I haven't yet found a "catch all" Makefile for an FPGA, so I just created my own that works for my particular setup. I've posted it below and you're welcome to use parts of it if you want, though I recommend first doing a full build within ise, and then reading through the cmd_log that is generated and comparing to my makefile below to make sure that all the commands match up.
link to makefile
If you use this makefile, I recommend a directory structure used like in this project here: https://github.com/emusan/graph_radius. The ise project is based out of the ise directory, to keep all of its files tucked away nicely, and a separate build folder is created by make to store temporary build files, this can be easily deleted with a make clean and ignored using the gitignore file. Note also that if you use this makefile you will have to edit the ise/{project}.xst file to remove the top two "set" lines and to make the -ifn parameter set to ../ise/{project}.prj. If you don't then there will be a {project}.prj can not be found error (note that because of the ways that the directories are set up you wont have to change this again if you want to use ISE :D).
This is all still pretty hacked together, as I just got it all working over the past few days, but so far I haven't run into any serious problems (aside from the usual issues when trying to figure out each part). In the future I'll probably try and improve upon it some, but for now I don't plan on changing it too much.
If you've got any suggestions let me know! There's the comments on here and my email is around various places. I've also been hanging around on the oftc irc on channel #kosagi, discussing the new Novena laptop!