x6500-miner Instructions (archived)
x6500-miner has been replaced by the newer, better MPBM. This guide is kept here for historical reference.
This is the user guide for x6500-miner, the mining software for the X6500 FPGA Miner. x6500-miner is a set of python scripts for communicating with the X6500 over USB. The software is maintained with a Github repository, so please check there for the most recent code. Versioned releases can be downloaded below.
x6500-miner Version 0.3
Development tree on Github
x6500-miner Version 0.2
x6500-miner Version 0.11
x6500-miner Version 0.1
Python, the FTDI D2XX driver, and PyUSB are required to run x6500-miner.
The installation process on Windows is very simple. There are 3 steps:
- Install Python 2.6.7. A pre-built installer is available here.
- Install the FTDI D2XX drivers.
- Install PyUSB 1.6 using the Windows installer.
- Download x6500-miner.
The only reason that the slightly older version of Python is suggested is because the PyUSB installer is a little out of date. If you'd like to use a different version of Python, you might have to build PyUSB from source (also available here).
On Linux, you will need to do a little bit more work than on Windows. It has been tested on Ubuntu 11.04. Please let us know how well it works for you, and any tips that might help other users.
Python 2.6 or later should work fine. If you don't have python (usually pre-installed), you can download it from python.org or install it from your package manager (
sudo apt-get install).
Install the FTDI D2XX drivers. NOTE: The latest version is not compatible with PyUSB, yet. Please use the previous version, available here: libftd2xx1.0.4.tar.gz.
Then, you need to install a modified version of PyUSB, which you can download from here: PyUSB-1.6-fizzisist-linux.tar.gz [1.5 MB].
To install PyUSB, extract the tar.gz and change into the extracted folder:
$ tar xzvf PyUSB-1.6-fizzisist.tar.gz $ cd PyUSB-1.6-fizzisist
Edit line 4 of setup.py to match your architecture. For a 64 bit system, the line should read:
For 32 bit, change it to:
Build and install it using python:
$ python setup.py build $ sudo python setup.py install
That should do it!
Because Mac OS X is so similar to Linux, the installation and usage is very similar. The x6500-miner has had the least amount of testing on Mac, though, so your mileage may vary.
First, download and install the FTDI D2XX drivers for Mac. Follow the instructions in the Readme file included in that download.
You will then need to download and install a modified version of PyUSB especially for Mac, available here: PyUSB-1.6-fizzisist-mac.tar.gz [1.7 MB]. The installation instructions are exactly the same as for Linux.
If you previously installed the FTDI serial drivers, you will need to unload that extension before running x6500-miner. Do this by running this command in the Terminal:
sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext
There are two python scripts that you will need to use to mine with an X6500. The first is
program.py, which will program the FPGA and prepare it for bitcoin mining. This needs to be run every time power is removed from the board or if you want to load a different bitstream. The second script is
mine.py, which handles the communication between the pool and the X6500.
Usage: program.py [-d <devicenum>] [-c <chain>] <path-to-bitstream-file> Options: -h, --help show this help message and exit -d DEVICENUM, --devicenum=DEVICENUM Device number, optional. If left out, the first available device will be opened. -c CHAIN, --chain=CHAIN JTAG chain number, can be 0, 1, or 2 for both FPGAs on the board (default 2) -v, --verbose Verbose logging </pre> <h4>mine.py</h4> <pre> Usage: mine.py [-d <devicenum>] [-c <chain>] -u <pool-url> -w <user:pass>
Options: -h, --help show this help message and exit -d DEVICENUM, --devicenum=DEVICENUM Device number, optional. If left out, the first available device will be opened. -c CHAIN, --chain=CHAIN JTAG chain number, can be 0, 1, or 2 for both FPGAs on the board (default 2) -i GETWORK_INTERVAL, --interval=GETWORK_INTERVAL Getwork interval in seconds (default 20) -v, --verbose Verbose logging -u URL, --url=URL URL for the pool or bitcoind server, e.g. pool.com:8337 -w WORKER, --worker=WORKER Worker username and password for the pool, e.g. user:pass
Note about Device Numbers
The first X6500 you connect will be device 0, and go up from there. If you disconnect a device, the device numbers may change. You can check them by running
listDevices.py. This will print a list of connected devices and their serial numbers.
If you have multiple X6500s connected to your computer, the software will automatically pick the next available device. To override this behavior, you will need to specify a
-d option, where the devicenum is the one shown in the output from
You will need to provide the software with a bitstream to configure the FPGAs before you start mining. Download and extract a bitstream from Bitstreams. It's recommended that you extract the bitstream into a folder called bitstreams inside the x6500-miner folder.
Open a command prompt (Start->Run, then type "cmd"), and "cd" to the x6500-miner directory. Once there, run
python.exe program.py bitstreams\fpgaminer_133mhz.bit
Where the last argument is the path of the bitstream you want to use for configuration of the FPGAs. After that finishes, start the miner:
python.exe mine.py -v -u mining.pool.com:8337 -w worker:pass
Change the url and the worker:pass. The -v argument is recommended, but you can remove that if you want a quieter output.
To stop the miner, press ctrl-c.
On Linux, you will need to make a few small changes. First, after you connect a board, you need to disable the FTDI serial I/O driver. To do this, run:
sudo rmmod ftdi_sio
Then, you can program the board with:
sudo python program.py bitstreams/fpgaminer_133mhz.bit
And, start the miner:
sudo python mine.py -v -u mining.pool.com:8337 -w worker:pass
On a Mac, you can unload the FTDI serial driver once using:
sudo kextunload /System/Library/Extensions/FTDIUSBSerialDriver.kext
If you have an X6000 (single FPGA board), would like to use only one of the FPGAs on your X6500, or want to configure each FPGA differently, you can add a
-c option. This will tell the program to only address one of the two "chains" on the board. On the X6500, each FPGA is on it's own chain, so FPGA0 is
-c 0 and FPGA1 is
-c 1. The FPGA on the X6000 is on chain 0. A
-c 2 argument addresses both chains (the default).
You can also experiment with the interval between getwork requests. Each FPGA gets a different job and works on each independently. By default, the getwork interval is 20 seconds. Ideally, you should request work after calculating 2^32 hashes, which takes 32 seconds at 133 MH/s. You may find that a different interval works better, especially if you're running the miner faster or slower.
The status line at the bottom of the mine.py output shows the following information:
HASHRATE | FPGA#: ACCEPTED/REJECTED/INVALID REJ_PERCENT | FPGA#: ACCEPTED/REJECTED/INVALID REJ_PERCENT | RUNNING_TIME | DEVICE_SERIAL
HASHRATE | TOTAL_ACCEPTED/TOTAL_REJECTED/TOTAL_INVALID REJ_PERCENT
Calculating the hashrate on an FPGA is very different from on a GPU. Actually, unless the FPGA is malfunctioning, it will consistently calculate hashes at or very near the clock rate you drive it with. There's no feedback that hashes are being calculated, except by the occasional "golden" nonce returned by the FPGAs. The hashrate displayed in the software is based on the number of nonces received from the FPGAs, averaged over the last hour of running time.
To program your board and start the miner immediately when finished, you can combine the two commands in a single command:
sudo python program.py bitstreams/fpgaminer_133mhz.bit && \ sudo python mine.py -v -u mining.pool.com:8337 -w worker:pass