chris@wotan$ cd $HOME chris@wotan$ wget -q http://www.swaton.ukfsn.org/bin/fpgalink-20130321/fpgalink-bin.tar.gz chris@wotan$ tar zxf fpgalink-bin.tar.gz chris@wotan$ cd libfpgalink-20130321/examples/python/ chris@wotan$ rm fpgalink2.py chris@wotan$ wget -q https://raw.github.com/makestuff/libfpgalink/master/examples/python/fpgalink2.py chris@wotan$ LD_LIBRARY_PATH=../../lin.x64/rel python Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from fpgalink2 import * >>> flLoadStandardFirmware("04b4:8613", "1D50:602B:0002") >>> handle = flOpen("1D50:602B:0002") >>> flPortConfig(handle, "D7+") # Only needed for Nexys2 on USB power >>> flProgram(handle, "J:D0D2D3D4:../../hdl/apps/makestuff/swled/cksum/vhdl/csvf/fx2all-nexys2-1200.csvf") >>> flFifoMode(handle, True) >>> flWriteChannel(handle, 1000, 0x00, 0x10) >>> flWriteChannel(handle, 1000, 0x00, 0x10) >>> flWriteChannel(handle, 1000, 0x00, 0x10) >>> print "%02X" % flReadChannel(handle, 1000, 0x00) AA >>> flClose(handle) >>> quit() chris@wotan$