Getting started

stacksmith edited this page Sep 20, 2012 · 5 revisions

Windows executable

Just put it somewhere visible and use it.

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/simple Using your favorite editor, look at the various example files. Invoke like this: ''' 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 running xdl results in meaningful output.

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 fpgasm-test/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.