Icarus

From Qi-Hardware
Jump to: navigation, search

Icarus is a FPGA development/bitcoin mining board, it's a 6 layers PCB. has 2 XC6SLX150 -2FGG484I on it. there are100+ GPIOs on this board and plenty(50+) of interconnect wires between the 2 FPGAs. most of them are routed as diff-pairs. generates about ~360MH/s hashing power. 19.5W on wall power consuming.

Contents

Pictures

Icarus Front.JPG Icarus Back.JPG Icarus connector.JPG

Icarus connector side.JPG Icarus JTag.JPG Icarus USB.JPG

Icarus Soldering.capacitance problem.JPG

Icarus thermographic top.png Icarus thermographic side.png Icarus thermographic back.png

Without FAN and cooling plate: front, back

Power supply

  • Input: 100-240V~, 50-60Hz, 1A Max
  • Output : 12v, 2A
  • Connector: 5.5mm OD, 2.5mm ID

Icarus batch3 adapter.jpg Icarus batch3 adapter detail.jpg

  • ATX powe. connect 20 Icarus to one 650W ATX power is better. evenly distributed Icarus to your 12V yellow cables. don't put all Icarus to only one. xiangfu have tried connect 10 Icarus to ANTEC VP 650PM ATX Power, it give ~235W in power meter.
  • If you have more Icarus like 40. don't power on all at same time. power on them 10 by 10 is better.
  • Cables link: ATX cable 1 ATX cable 2 Power cable 5.5*2.5

Modular-ATX-power.jpg Icarus-ATX-power-cable.jpg Icarus Power Wire.JPG

  • Burned bad quality cable, it should be 4 yellow cables and 4 black cables. after burned all became black

Icarus-power-connect-bruned.jpg Icarus-power-connect-bruned-all.jpg Icarus-power-connect-soldering.jpg

  • Burned power adapter, the case became uneven. no power output at all. the Icarus connect to this power adapter not broken.

Icarus-adapter-bruned-inside.JPG Icarus-adapter-bruned-outside.JPG Icarus-adapter-bruned-pcb.JPG

LEDs

  • PWR_OK: power modules output are all in good voltage.
  • TXD1 and RXD1: for display transport on the USB UART bridge, but by a design miss, they are difficult to discriminate, and this function is also implemented on other LEDs, so will be removed in the future.
  • LED1: FPGA1 is busy, in the origin bitsteam, light means FPGA is working, but it changed to opposite.
  • LED2: TXD for FPGA1
  • LED3: RXD for FPGA1
  • LED4: valid nonce found by FPGA1. will light and fade out in 4 seconds.
  • LED5: FPGA2 is busy.
  • LED6: TXD for FPGA2
  • LED7: RXD for FPGA2
  • LED8: valid nonce found by FPGA2.

Communication protocol V3

The FPGAs on board or even in chain mode (under development) , act as a single miner to the uart port. when the board connect to a PC, it recognized as a ttyUSB device or COM on windows PC.

Operation

  1. No detection is needed (no special command for this).
  2. Wait work data: each data packet is 512bit (64 byte) length. the format is : 256bits MIDSTATE + 160bits fill bits(can be any value) + 96bits data (last 12 bytes of block header).
  3. Send back the results if the fpga found a valid nonce, they will send back the 32bits nonce result immediately. no any query protocol is implemented here.

Simple work process is described

  1. Send a work pass the COM port, start a timer and a listener on the COM port.
  2. If any data send back by the COM port, then this is a valid nonce. push a new work to the FPGA and send the result back to the pool.
  3. If no data send back in 11.3 seconds (a full cover time on 32bit nonce range by 380MH/s speed, maybe increase so a shorter time is suggested, like 8s ), send another work.

Info

  1. FPGA will start the calculate when you push a work to them, even they are busy. that means if a block has been found, the miner could push a new immediately to overlap the old work in the fpga.
  2. The 2 FPGAs on one board will distribute the 32bit nonce to calculate. one will calculate the 0 ~ 7FFFFFFF and the other will cover the 80000000 ~ FFFFFFFF. so if you want to do any performance measure on this device, please notice this feature.
  3. FPGA will stop work when: a valid nonce has been found or 32 bits nonce range is completely calculated. notice that it's possible for 2 FPGA both find valid nonce in the meantime, the 2 valid nonce will all be send back.

Improve

  1. Return nonce=0 once it gets to the end! so we know when it is finished - in V4, if we get a nonce=0 VERY quickly we know it is a real nonce or if the FPGA can send back a "I'm done" message, it would probably make it easier to do more efficiently.
  2. Detection via the USB product/device ids is crucial to automatically adding it to Miner Software like(miner.py or CGminer).
  3. Normal error rate is less than 0.1%, if the error rate goes high, that means something goes wrong. like FPGA too hot. needs additional fan, V3 bitstream got 0x08% under abcpool.co for 24 hours. tested by ngzhang
  4. In case you (or someone else) produces protocol-compatible devices in the future, you may wish to provide a way to probe the number of FPGAs on the board and their speeds.
  5. It would be good to have the ability to specify exact nonce ranges, so cgminer (or another miner) can support the noncerange extension in the future, or even split up work internally (a single work is sufficient for up to 4 GH/s). need change on HDL code
  6. Reporting temperature/safety measurements can allows cgminer to shut off the FPGA if it gets too hot, need additional hardware.

Mining software

Cgminer

  • Written with C, support long polling and rolling time.
  • Icarus in cgminer should give Utility: ~5.20/m, if the Utility is not around 5. there is something wrong.
  • Install cgminer in your PC:
$ git clone git://github.com/ckolivas/cgminer.git
$ cd cgminer
$ ./autogen.sh && ./configure --enable-icarus --disable-opencl --disable-adl && make
$ sudo make install
  • Setup with Icarus, connect Icarus to your PC. it will shows as /dev/ttyUSB0, running cgminer by:
$ cgminer -S /dev/ttyUSB0 -o http://pool.ABCPool.co -O xiangfu.0:x
  • If you have more Icarus connected. you may needs this little scrip file, it assume all /dev/ttyUSB* is Icarus, --api-network --api-listen is for API access for miner.php like this one:
#!/bin/sh
DEVS=`find /dev/ -type c -name "ttyUSB*"  | sed 's/^/-S/' |  sed ':a;N;$!ba;s/\n/ /g'`
cgminer $@ --api-network --api-listen -o http://pool.ABCPool.co -O xiangfu.0:x ${DEVS}

Mining pool

  • Recommend: http://ozco.in/ (Support long polling and rolling time) or http://www.abcpool.co/ (Suppoy long polling), when you running cgminer with more then 10 Icarus. you better choose a rolling time mining pool.
  • DeepBit does not pay well
  • EclipseMC seems to have lots of problems cause he changes stuff often
  • P2Pool is no good with FPGA coz of 10s LP, check out those 1 2 for more detail.
  • ABCpool.co is a proxy (Their pool is actually an Amazon EC2)
  • ARS is going broke fast
  • More: https://en.bitcoin.it/wiki/Comparison_of_mining_pools

Using TP-LINK TL-WR703N as host

Setup cgminer

  • Connect your laptop to the LAN/WAN port of the TL-WR703N and acquire an IP address via DHCP. It should come up under the 192.168.1.0/24 network then open http://192.168.1.1
  • Install OpenWrt (use Xiangfu's OpenWrt trunk image, with cgminer pre-installled ChangeLog).
  • This OpenWrt image using 192.168.42.1/24 network, after ~2 minutes, open http://192.168.42.1
  • Setup password for further SSH connect
  • Configure WiFi: Network -> WIFI -> Scan(select your WIFI network) -> Join Network -> WPA passphrase -> Submit -> Save & Apply for connect to WIFI Internet
  • Make sure WR703N can access Internet, ssh to your WR703N enable cgminer service follow:
  1. vim /etc/init.d/cgminer # update the POOL1/POOL2/POOL3
  2. /etc/init.d/cgminer stop
  3. /etc/init.d/cgminer start #or re-plug Icarus
  4. cgminer-api # wait 5 seconds for cgminer start the API thread. without any parameter it will give cgminer summary, the Utility should be ~5.2 or MHS should be ~380 for each Icarus after hours running
  5. cgminer-api pgacount # get Icarus count, if the Icarus count is not correct, you can restart he service again. this is a known pl2303 bug
  • There is a x86_64 Linux version cgminer-api, you can use that on you PC:
./cgminer-api summary 192.168.42.1
./cgminer-api devs 192.168.42.1 # list all icarus detail
# 192.168.42.1: your 703N ip address, check RPC API document under cgminer README for more information
  • The miner.php, if you have a apache/php5 server running somewhere, you can use this file. read the top of the file (miner.php) for details of how to tune the display, simply there are two variables you need modify $readonly, $rigs
  • There are maybe some problems happen(like the Utility give 0, didn't upload works to pool.), you can try add a USB HUB between 703N and Icarus or use a different power adapter like 5V,2A or 5V,4A. that may fix the problem.
  • If the elapsed give '2XXdays ...' because the ntpd service start after cgminer. then datetime changed. should not happen if your network works fine
  • A 13 ports usb-hub, you will need that when you connect more Icarus. I am connect 703N to this usb-hub for power supply(5V,4A), works really great. it's better then the original power adapter(5V,1A)

Compile OpenWrt from source

Wi-Fi connection for Milkymist One

  • We can direct plug the power cable of WR703N into Milkymist One any usb port
  • Connect your laptop to the LAN/WAN port of the TL-WR703ND and acquire an IP address via DHCP. It should come up under the 192.168.42.0/24 network then open http://192.168.42.1
  • Network -> WIFI -> Scan(select your WIFI network) -> Join Network -> WPA passphrase -> Submit -> Save & Apply for connect to WIFI Internet
  • Connect Milkymist One to WR703N LAN/WAN port
  • Test connection by Web update -> Check versions

FPGA core

Modify base on Open Source FPGA Bitcoin Miner. it needs ISE 13.2 and Synplify E-2011.03-SP2 for get the final result.

  1. First synthesize the stuff under ./miner_core by click Process->Implement Top Module, then you got a NGC file, named sha256_top.ngc.
  2. Put sha256_top.ngc to ./miner , than run the flow by using Synplify E-2011.03-SP2 as synthesizer and ./src/miner_top.ncd as smartguide file(already setup by default. ise_p_using_smartguide), then synthesize the miner by click Process->Implement Top Module
  3. about Smartguile file: execate smartXplorer500 times, use the best one as smartguild file

Verify FPGA core

  • Use this payload.py. just download it and running it like ./pyload.py -s /dev/ttyUSB0

PCB

  1. Open ./AD10Project/S6.PrjPCB by Altium designer 10 to browse. also you can review the PDF file: ./SCHinPDF/Icarus.pdf
  2. Make sure total 15 libraries are imported, see compiled libraries and S61.PcbLib PCB library

How To Flash

Flash by using iMPACT

You need install the ISE 13.2. then connect the Xilinx Cable Jtag to Icarus. open iMPACT. it should auto detect your Icarus two FPGAs. right click the FPGA. select Assign New Configuration File .... checkout this Picture.

Using Milkymist One JTAG/Serial duaghter board

Extendables for connecting Milkymist JTAG connector.png Icarus front jtag header pin1.jpg

Flash Chip

W25Q64CV: 64M-bit Serial Flash Memory with uniform 4KB sectors and Dual/Quad SPI, datasheet

BOM

BOM for v2.1a schematic but pcb buttom side rev. marked as v1.0a.

  • U3, U4 footprint does not coincide with Winbond W25Q64CVSSIG's 8-SOIC.

Replace fuse

If your Icarus not working. no power at all. fan stop. LEDs are all off. we better check if the fuse(next to the power connecter) burned. the fuse type is 0812 3.15A, you can easy find some videos on how to replace SMD component by using hot air gun. be careful with this power connector, don't make your hot air gun touch it.

Icarus fuse 1.jpg Icarus fuse 2.jpg

Links

The Icarus Box

Icarus-box-1.JPG Icarus-box-1-top-1.JPG Icarus-box-1-top-2.JPG

Icarus-box-2-top.JPG Icarus-box-2-side.JPG Icarus-box-2-inside.JPG

Logs

The Cgminer status is here

2012-03-21 : Receive 40 Icarus from ngzhang
2012-03-28 : 1 Icarus power adapter bruned, http://en.qi-hardware.com/wiki/Icarus#Power_supply
2012-04-08 : 1 Icarus broke, C23 problem make fuse blown - replaced & it works again
2012-04-30 : 1 power socket bruned. replaced with better one. this power problem make my PC usb totally not working
2012-05-03 : Now, start to using mr11u as mining host. my PC USB ports totally dead
2012-05-09 : Put 22 Icarus in a box (with ATX power, usb hub inside, 3 fans at bottom, 4 fans at top)
2012-05-11 : Switch back to ozco.in pool (the BIG ENDIAN cgminer bug fixed)
2012-05-16 : Put 19 Icarus in a second box(3 fans at bottom, remove the whole top side)
2012-05-21 : All two box(20, 19 icarus each) move to other place, now I have 1 Icarus + 1 mForce200, mining with ATX power + USB hub + 703n(Wireless)
2012-07-07 : Change fan to better heatsink, moved to a PC case
2013-01-01 : Move to ozco.in stratum pool
Personal tools
Namespaces
Variants
Actions
Navigation
interactive
Toolbox
Print/export