dmesg
[ 894.003473] usb 1-3.1: new full-speed USB device number 5 using xhci_hcd
[ 894.022883] usb 1-3.1: New USB device found, idVendor=03eb, idProduct=2144
[ 894.022888] usb 1-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 894.022891] usb 1-3.1: Product: Mojo V2
[ 894.022893] usb 1-3.1: Manufacturer: Emb Micro
[ 894.022896] usb 1-3.1: SerialNumber: 84134353230351B0D1B0
[ 894.023034] usb 1-3.1: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[ 894.039841] cdc_acm 1-3.1:1.0: ttyACM0: USB ACM device
[ 894.040196] usbcore: registered new interface driver cdc_acm
[ 894.040200] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
mojo-loader
http://embeddedmicro.com/tutorials/the-mojo/installing-mojo-loader
remove RXTXcomm from distribution and use one from packages
dpavlin@blue:/blue-zfs/FPGA/Mojo/mojo-loader-1.1.2/lib$ rm RXTXcomm.jar
dpavlin@blue:/blue-zfs/FPGA/Mojo/mojo-loader-1.1.2/lib$ rm librxtxSerial.so
dpavlin@blue:/blue-zfs/FPGA/Mojo/mojo-loader-1.1.2/lib$ ln -s /usr/share/java/RXTXcomm.jar
dpavlin@blue:/blue-zfs/FPGA/Mojo/mojo-loader-1.1.2/lib$ ln -s /usr/lib/jni/librxtxSerial.so
alternative implementation: https://github.com/mogorman/mojo.py
Bitcoin mining
https://github.com/kramble/DE0-Nano-BitCoin-Miner/tree/master/Mojo_LX9
http://embeddedmicro.com/forum/viewtopic.php?f=3&t=68&sid=8510da058a2db897f380609cfcee4044&start=10#p300
dpavlin@blue:/blue-zfs/FPGA/Mojo$ git clone https://github.com/kramble/DE0-Nano-BitCoin-Miner.git
Cloning into 'DE0-Nano-BitCoin-Miner'...
remote: Counting objects: 227, done.
remote: Compressing objects: 100% (167/167), done.
remote: Total 227 (delta 74), reused 208 (delta 56)
Receiving objects: 100% (227/227), 659.22 KiB | 174.00 KiB/s, done.
Resolving deltas: 100% (74/74), done.
upload bitstream
dpavlin@blue:/blue-zfs/FPGA/Mojo/DE0-Nano-BitCoin-Miner/Mojo_LX9/MiningSoftware$ ../../../mojo.py/mojo.py -v -d /dev/ttyACM1 -i ../Bitstream/mojo_top_hashers6_100MHz_icarus.bin
Rebooting Mojo
Mojo is ready to recieve bitstream
Mojo acknowledged size of bitstream. Writing bitstream
Mojo has been flashed
Verifying Mojo
First Byte was valid getting flash size.
Flash and local bitstream match file size.
Flash and local bitstream are a match.
Mojo has been loaded bitsream
dpavlin@blue:/blue-zfs/FPGA/Mojo/DE0-Nano-BitCoin-Miner/Mojo_LX9$ python miner_icarus.py
Miner started on Tue Jul 16 23:26:17 2013
Sending data to FPGA
...
Share found on Tue Jun 25 23:37:11 2013 nonce 0074fd13
Upstream result: True
[15 accepted, 0 failed, 5.25 +/- 1.35 Mhash/s]
Updated by Dobrica Pavlinušić on Jul 16 2:30pm
Posted by Dobrica Pavlinušić on May 8 12:17pm
ISE IMPACT
USB driver
http://rmdir.de/~michael/xilinx/
dpavlin@blue:/blue-zfs/FPGA/S3A$ git clone git://git.zerfleddert.de/usb-driver
dpavlin@blue:/blue-zfs/FPGA/S3A$ cd usb-driver/
dpavlin@blue:/blue-zfs/FPGA/S3A/usb-driver$ make
cc -Wall -fPIC -DUSB_DRIVER_VERSION="\"2013-06-18 23:37:15\"" -DJTAGKEY usb-driver.c xpcu.c parport.c config.c jtagmon.c jtagkey.c -o libusb-driver.so -ldl -lusb -lpthread -L/usr/lib/x86_64-linux-gnu -lftdi -lusb -shared
parport.c: In function ‘parport_transfer’:
parport.c:21:23: warning: variable ‘last_pp_write’ set but not used [-Wunused-but-set-variable]
static unsigned char last_pp_write = 0;
^
cc -DDEBUG -Wall -fPIC -DUSB_DRIVER_VERSION="\"2013-06-18 23:37:15\"" -DJTAGKEY usb-driver.c xpcu.c parport.c config.c jtagmon.c jtagkey.c -o libusb-driver-DEBUG.so -ldl -lusb -lpthread -L/usr/lib/x86_64-linux-gnu -lftdi -lusb -shared
Built library is 64 bit. Run `make lib32' to build a 32 bit version
dpavlin@blue:/blue-zfs/FPGA/S3A/usb-driver$ ./setup_pcusb /blue-zfs/Xilinx/14.5/ISE_DS/ISE/
You are not root, trying sudo...
Looking for USB cable files: /blue-zfs/Xilinx/14.5/ISE_DS/ISE//bin/lin64
Copying firmware to /usr/share:
‘/blue-zfs/Xilinx/14.5/ISE_DS/ISE//bin/lin64/xusbdfwu.hex’ -> ‘/usr/share/xusbdfwu.hex’
‘/blue-zfs/Xilinx/14.5/ISE_DS/ISE//bin/lin64/xusb_emb.hex’ -> ‘/usr/share/xusb_emb.hex’
‘/blue-zfs/Xilinx/14.5/ISE_DS/ISE//bin/lin64/xusb_xlp.hex’ -> ‘/usr/share/xusb_xlp.hex’
‘/blue-zfs/Xilinx/14.5/ISE_DS/ISE//bin/lin64/xusb_xp2.hex’ -> ‘/usr/share/xusb_xp2.hex’
‘/blue-zfs/Xilinx/14.5/ISE_DS/ISE//bin/lin64/xusb_xpr.hex’ -> ‘/usr/share/xusb_xpr.hex’
‘/blue-zfs/Xilinx/14.5/ISE_DS/ISE//bin/lin64/xusb_xse.hex’ -> ‘/usr/share/xusb_xse.hex’
‘/blue-zfs/Xilinx/14.5/ISE_DS/ISE//bin/lin64/xusb_xup.hex’ -> ‘/usr/share/xusb_xup.hex’
Installing udev rules:
done
# install fxload
sudo apt-get install fxload
boundary scan
GUI --- Auto connect to cable...
INFO:iMPACT - Connecting to TCF agent...
AutoDetecting cable. Please wait.
*** WARNING ***: When port is set to auto detect mode, cable speed is set to default 6 MHz regardless of explicit arguments supplied for setting the baud rates
PROGRESS_START - Starting Operation.
Using windrvr6 driver.
Connecting to cable (Usb Port - USB21).
Checking cable driver.
File version of /blue-zfs/Xilinx/14.5/ISE_DS/ISE/bin/lin64/xusbdfwu.hex = 1030.
File version of /usr/share/xusbdfwu.hex = 1030.
libusb-driver.so version: 2013-06-18 23:37:15.
Cable PID = 0008.
Max current requested during enumeration is 74 mA.
Type = 0x0004.
Cable Type = 3, Revision = 0.
Setting cable speed to 6 MHz.
Cable connection established.
Firmware version = 1303.
File version of /blue-zfs/Xilinx/14.5/ISE_DS/ISE/data/xusb_xlp.hex = 1303.
Firmware hex file version = 1303.
PLD file version = 0012h.
PLD version = 0012h.
PROGRESS_END - End Operation.
Elapsed time = 0 sec.
Type = 0x0004.
ESN device is not available for this cable.
Attempting to identify devices in the boundary-scan chain configuration...
INFO:iMPACT - Current time: 6/22/13 4:27 PM
PROGRESS_START - Starting Operation.
Identifying chain contents...'0': : Manufacturer's ID = Xilinx xcf04s, Version : 15
INFO:iMPACT:1777 -
Reading /blue-zfs/Xilinx/14.5/ISE_DS/ISE/xcf/data/xcf04s.bsd...
INFO:iMPACT:501 - '1': Added Device xcf04s successfully.
----------------------------------------------------------------------
----------------------------------------------------------------------
'1': : Manufacturer's ID = Xilinx xc3s700a, Version : 2
INFO:iMPACT:1777 -
Reading /blue-zfs/Xilinx/14.5/ISE_DS/ISE/spartan3a/data/xc3s700a.bsd...
INFO:iMPACT:501 - '1': Added Device xc3s700a successfully.
----------------------------------------------------------------------
----------------------------------------------------------------------
done.
PROGRESS_END - End Operation.
Elapsed time = 0 sec.
Attempting to identify devices in the boundary-scan chain configuration...
INFO:iMPACT - Current time: 6/22/13 5:44 PM
PROGRESS_START - Starting Operation.
----------------------------------------------------------------------
----------------------------------------------------------------------
Identifying chain contents...'0': : Manufacturer's ID = Xilinx xcf04s, Version : 15
INFO:iMPACT:1777 -
Reading /blue-zfs/Xilinx/14.5/ISE_DS/ISE/xcf/data/xcf04s.bsd...
INFO:iMPACT:501 - '1': Added Device xcf04s successfully.
----------------------------------------------------------------------
----------------------------------------------------------------------
'1': : Manufacturer's ID = Xilinx xc3s700a, Version : 2
INFO:iMPACT:1777 -
Reading /blue-zfs/Xilinx/14.5/ISE_DS/ISE/spartan3a/data/xc3s700a.bsd...
INFO:iMPACT:501 - '1': Added Device xc3s700a successfully.
----------------------------------------------------------------------
----------------------------------------------------------------------
done.
PROGRESS_END - End Operation.
Elapsed time = 0 sec.
'1': Loading file '/blue-zfs/FPGA/S3A/Open-Source-FPGA-Bitcoin-Miner/projects/Verilog_Xilinx_Port/S3A/top/fpgaminer_top.bit' ...
done.
INFO:iMPACT:2257 - Startup Clock has been changed to 'JtagClk' in the bitstream stored in memory,
but the original bitstream file remains unchanged.
UserID read from the bitstream file = 0xFFFFFFFF.
----------------------------------------------------------------------
INFO:iMPACT:501 - '1': Added Device xc3s700a successfully.
----------------------------------------------------------------------
Get Device ID
INFO:iMPACT - Current time: 6/22/13 5:45 PM
Maximum TCK operating frequency for this device chain: 10000000.
Validating chain...
Boundary-scan chain validated successfully.
'1': IDCODE is '00100010001000101000000010010011'
'1': IDCODE is '22228093' (in hex).
'1': : Manufacturer's ID = Xilinx xc3s700a, Version : 2
get device status
INFO:iMPACT - Current time: 6/22/13 5:48 PM
Maximum TCK operating frequency for this device chain: 10000000.
Validating chain...
Boundary-scan chain validated successfully.
'1': Reading status register contents...
CRC error : 0
IDCODE not validated while writing FDRI : 0
DCM Locked : 1
status of GTS_CFG_B : 1
status of GWE : 1
status of GHIGH : 1
value of VSEL pin 0 : 1
value of VSEL pin 1 : 1
value of VSEL pin 2 : 1
value of MODE pin M0 : 1
value of MODE pin M1 : 0
value of MODE pin M2 : 0
value of CFG_RDY (INIT_B) : 1
DONEIN input from Done Pin : 1
SYNC word not found : 0
Get Device Signature/Usercode
INFO:iMPACT - Current time: 6/22/13 5:50 PM
Maximum TCK operating frequency for this device chain: 10000000.
Validating chain...
Boundary-scan chain validated successfully.
'1': Usercode is 'ffffffff'
program
Load FPGA bitstream, don't update flash
INFO:iMPACT - Current time: 6/22/13 5:51 PM
PROGRESS_START - Starting Operation.
Maximum TCK operating frequency for this device chain: 10000000.
Validating chain...
Boundary-scan chain validated successfully.
'1': Programming device...
LCK_cycle = NoWait.
LCK cycle: NoWait
done.
'1': Reading status register contents...
CRC error : 0
IDCODE not validated while writing FDRI : 0
DCM Locked : 1
status of GTS_CFG_B : 1
status of GWE : 1
status of GHIGH : 1
value of VSEL pin 0 : 1
value of VSEL pin 1 : 1
value of VSEL pin 2 : 1
value of MODE pin M0 : 1
value of MODE pin M1 : 0
value of MODE pin M2 : 0
value of CFG_RDY (INIT_B) : 1
DONEIN input from Done Pin : 1
SYNC word not found : 0
INFO:iMPACT:2219 - Status register values:
INFO:iMPACT - 0011 1111 1100 1100
INFO:iMPACT:579 - '1': Completed downloading bit file to device.
INFO:iMPACT:188 - '1': Programming completed successfully.
LCK_cycle = NoWait.
LCK cycle: NoWait
INFO:iMPACT - '1': Checking done pin....done.
'1': Programmed successfully.
PROGRESS_END - End Operation.
Elapsed time = 1 sec.
FPGA bitcoin mining
http://github.com/sfo/Open-Source-FPGA-Bitcoin-Miner
Updated by Dobrica Pavlinušić on Jun 22 8:58am
Posted by Dobrica Pavlinušić on Jun 18 2:48pm
|
Weblog Navigation
Loading...
|