FPGA-README 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. This README contains extended details about FPGA mining with cgminer
  2. Bitforce
  3. --bfl-range Use nonce range on bitforce devices if supported
  4. This option is only for bitforce devices. Earlier devices such as the single
  5. did not have any way of doing small amounts of work which meant that a lot of
  6. work could be lost across block changes. Some of the "minirigs" have support
  7. for doing this, so less work is lost across a longpoll. However, it comes at
  8. a cost of 1% in overall hashrate so this feature is disabled by default. It
  9. is only recommended you enable this if you are mining with a minirig on
  10. p2pool.
  11. BFGMiner also bundles a bitforce-firmware-flash utility on Linux. Using this,
  12. you can change the bitstream firmware on BitFORCE Singles. It is untested with
  13. other devices. Use at your own risk! Windows users may use Butterfly Labs
  14. EasyMiner to change firmware.
  15. To compile:
  16. make bitforce-firmware-flash
  17. To flash your BFL, specify the BFL port and the flash file e.g.:
  18. sudo ./bitforce-firmware-flash /dev/ttyUSB0 alphaminer_832.bfl
  19. It takes a bit under 3 minutes to flash a BFL and shows a progress % counter
  20. Once it completes, you may also need to wait about 15 seconds,
  21. then power the BFL off and on again
  22. If you get an error at the end of the BFL flash process stating:
  23. "Error reading response from ZBX"
  24. it may have worked successfully anyway.
  25. Test mining on it to be sure if it worked or not.
  26. You need to give cgminer about 10 minutes mining with the BFL to be sure of
  27. the MH/s value reported with the changed firmware - and the MH/s reported
  28. will be less than the firmware speed since you lose work on every block change.
  29. Icarus
  30. There are two hidden options in cgminer when Icarus support is compiled in:
  31. --icarus-options <arg> Set specific FPGA board configurations - one set of values for all or comma separated
  32. baud:work_division:fpga_count:quirks
  33. baud The Serial/USB baud rate - 115200 or 57600 only - default 115200
  34. work_division The fraction of work divided up for each FPGA chip - 1, 2, 4 or 8
  35. e.g. 2 means each FPGA does half the nonce range - default 2
  36. fpga_count The actual number of FPGA working - this would normally be the same
  37. as work_division - range is from 1 up to 'work_division'
  38. It defaults to the value of work_division - or 2 if you don't specify
  39. work_division
  40. quirks List of quirks to enable and disable (after a minus sign):
  41. r Reopen device regularly to workaround buggy Icarus USB chipset
  42. (enabled by default)
  43. If you define fewer comma seperated values than Icarus devices, the last values will be used
  44. for all extra devices
  45. An example would be: --icarus-options 57600:2:1:-r
  46. This would mean: use 57600 baud, the FPGA board divides the work in half however
  47. only 1 FPGA actually runs on the board, and don't reopen the device (e.g. like
  48. an early CM1 Icarus copy bitstream)
  49. --icarus-timing <arg> Set how the Icarus timing is calculated - one setting/value for all or comma separated
  50. default[=N] Use the default Icarus hash time (2.6316ns)
  51. short Calculate the hash time and stop adjusting it at ~315 difficulty 1 shares (~1hr)
  52. long Re-calculate the hash time continuously
  53. value[=N] Specify the hash time in nanoseconds (e.g. 2.6316) and abort time (e.g. 2.6316=80)
  54. If you define fewer comma seperated values than Icarus devices, the last values will be used
  55. for all extra devices
  56. Icarus timing is required for devices that do not exactly match a default Icarus Rev3 in
  57. processing speed
  58. If you have an Icarus Rev3 you should not normally need to use --icarus-timing since the
  59. default values will maximise the MH/s and display it correctly
  60. Icarus timing is used to determine the number of hashes that have been checked when it aborts
  61. a nonce range (including on a LongPoll)
  62. It is also used to determine the elapsed time when it should abort a nonce range to avoid
  63. letting the Icarus go idle, but also to safely maximise that time
  64. 'short' or 'long' mode should only be used on a computer that has enough CPU available to run
  65. cgminer without any CPU delays (an active desktop or swapping computer would not be stable enough)
  66. Any CPU delays while calculating the hash time will affect the result
  67. 'short' mode only requires the computer to be stable until it has completed ~315 difficulty 1 shares
  68. 'long' mode requires it to always be stable to ensure accuracy, however, over time it continually
  69. corrects itself
  70. When in 'short' or 'long' mode, it will report the hash time value each time it is re-calculated
  71. In 'short' or 'long' mode, the scan abort time starts at 5 seconds and uses the default 2.6316ns
  72. scan hash time, for the first 5 nonce's or one minute (whichever is longer)
  73. In 'default' or 'value' mode the 'constants' are calculated once at the start, based on the default
  74. value or the value specified
  75. The optional additional =N specifies to set the default abort at N 1/10ths of a second, not the
  76. calculated value, which is 112 for 2.6316ns
  77. To determine the hash time value for a non Icarus Rev3 device or an Icarus Rev3 with a different
  78. bitstream to the default one, use 'long' mode and give it at least a few hundred shares, or use
  79. 'short' mode and take note of the final hash time value (Hs) calculated
  80. You can also use the RPC API 'stats' command to see the current hash time (Hs) at any time
  81. The Icarus code currently only works with an FPGA device that supports the same commands as
  82. Icarus Rev3 requires and also is less than ~840MH/s and greater than 2MH/s
  83. If an FPGA device does hash faster than ~840MH/s it should work correctly if you supply the
  84. correct hash time nanoseconds value
  85. The timing code itself will affect the Icarus performance since it increases the delay after
  86. work is completed or aborted until it starts again
  87. The increase is, however, extremely small and the actual increase is reported with the
  88. RPC API 'stats' command (a very slow CPU will make it more noticeable)
  89. Using the 'short' mode will remove this delay after 'short' mode completes
  90. The delay doesn't affect the calculation of the correct hash time