Skip to content
This repository was archived by the owner on Jul 23, 2021. It is now read-only.

Getting started

stacksmith edited this page Sep 10, 2012 · 5 revisions

Compile fpgasm

Create an fpgasm directory. Inside it, create two subdirectories called fpgasm-code and fpgasm-test. Pull fpgasm source into fpgasm-code and fpgasm-test.

To compile, run the build script in the fpgasm-code directory. It will create a file called fpgasm and make a copy of it in the fpgasm-test/src directory (feel free to put it elsewhere, like your 'bin' directory or whatever).

Working with fpgasm

cd into fpgasm-test/src/ Using your favorite editor, look at the various example files. You can invoke fpgasm directly to output to stdout:

./fpgasm test01.ham 

or specify the output file:

./fpgasm test01.ham test01.xdl

Xilinx(R) Tools Integration

In order to actually configure an FPGA, you will have to use proprietary tools from Xilinx. If you already have a running Xilinx installation, great. If not, you are in for a day of work. Download and Install Xilinx WebPACK(R) pre-V14 version and pay careful attention to the PATH - you may have to source a file to set the PATH. At the end, you should be able to type xdl on the command line and get meaningful output. Don't bother doing anything else until xdl works.

I would suggest making sure it all works by compiling a demo that came with your board and configuring your fpga with Impact.

Now, examine the 'build' script. Try

./build test01

It will run fpasm and invoke a makefile in the ../xdl directory. The makefile in turn will invoke the Xilinx tools and create a bitstream in about 10 seconds, if everything works. You will see a bunch warnings; that is normal. Watch for errors.

./build test01 burn

will rebuild and configure the fpga using impact.

Xilinx, WebPACK and Impact are registered trademarks of Xilinx Inc.

Clone this wiki locally