Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

just pulling a request #10

Open
wants to merge 121 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
619da85
Update the default fan speed percentage
Feb 22, 2017
19b6d29
Add SSP support for Avalon7
qinfengling Nov 8, 2016
4cdf957
Add clean_jobs notify
qinfengling May 19, 2017
90262c2
Only update stratum work to MM when new block was found
qinfengling May 19, 2017
7de9a9b
Support clean jobs for different stratum pool
qinfengling May 20, 2017
2354004
Add factory info support
Jun 2, 2017
e0a0644
Add A761 support
Mar 31, 2017
fa12442
Update avalon7 device description
Mar 31, 2017
257f2f6
Update vin_adc_ratio calculation
Jun 8, 2017
95ead33
Fix BIP34 Serialization
jameshilliard Jun 22, 2017
9de8313
Fix testnet diff
jameshilliard Jun 22, 2017
c20ff31
Fix warnings
qinfengling Sep 27, 2017
6146576
Fix api warning without miner enable
qinfengling Sep 27, 2017
6786bbd
Add Avalon8 support
XzxEmbedded Sep 11, 2017
d5b0ac3
Update cpm
Johnson-Fan Nov 8, 2017
b6200e2
Update P_SET_VOLT
Johnson-Fan Nov 8, 2017
9345953
Update P_SET_SS
Johnson-Fan Nov 9, 2017
9d5f0f3
Update P_SET
Nov 9, 2017
7d44925
Add some options for avalon8
Johnson-Fan Nov 10, 2017
ba8dac4
Update cpm
Johnson-Fan Nov 10, 2017
8777d3a
Add PVT_T
qinfengling Nov 10, 2017
87b5aea
Update PVT_T && Add PVT_V
qinfengling Nov 11, 2017
3a9468a
Update cpm
Johnson-Fan Nov 11, 2017
8216647
Update P_SET_VOLT
Johnson-Fan Nov 11, 2017
2454a71
Support 4 miners
Johnson-Fan Nov 11, 2017
a6006fe
Add max temperature display
JianXiongZ Nov 13, 2017
3b115d1
Merge pull request #23 from Canaan-Creative/xzx
Nov 13, 2017
115eb0a
Update cpm
Johnson-Fan Nov 14, 2017
f64284d
Add a new option for avalon8
Johnson-Fan Nov 14, 2017
2ebc27a
Support Vi and Vo display
XzxEmbedded Nov 14, 2017
6944723
Update options for avalon8
Johnson-Fan Nov 15, 2017
2f476c6
Update avalon8 device description
Johnson-Fan Nov 17, 2017
2197b42
Update option for avalon8
Johnson-Fan Nov 22, 2017
aceb45d
Update P_SET_PLL
Johnson-Fan Nov 24, 2017
4069a94
Update default parameters for avalon8
Johnson-Fan Nov 24, 2017
b56ab3b
Update polling error count for avalon8
Johnson-Fan Nov 29, 2017
01ab3b9
Support voltage-level tweak
qinfengling Dec 7, 2017
b652b76
Revert "Update polling error count for avalon8"
Johnson-Fan Dec 16, 2017
3a28ef0
Update default parameters for avalon8
Johnson-Fan Dec 16, 2017
415afcb
Fix typo
Johnson-Fan Dec 16, 2017
6284d37
Update frequency tweak
qinfengling Dec 14, 2017
bbcc132
Update P_SET_PLL
Johnson-Fan Jan 25, 2018
44685ac
Add over hashrate
XzxEmbedded Jan 28, 2018
16b1c7b
Update P_STATUS_PLL
Johnson-Fan Feb 12, 2018
d86efcc
Change over hashrate to overclocking
Johnson-Fan Feb 12, 2018
fdddf6e
Add A841 support
XzxEmbedded Feb 23, 2018
c9d437b
Update avalon8_dev_description
Johnson-Fan Mar 3, 2018
b5b497e
Update set frequency for avalon8
Johnson-Fan Mar 5, 2018
40104c1
Update set_avalon8_factory_info()
Johnson-Fan Mar 15, 2018
13cdfdd
Minor fix
Johnson-Fan Mar 29, 2018
e857578
Add A822 support
Johnson-Fan Apr 20, 2018
4fafa6f
Rename A822 to A831
Johnson-Fan May 2, 2018
a45b74b
Add P_STATUS_ASIC
XzxEmbedded May 30, 2018
2511248
Add options for avalon8
XzxEmbedded May 30, 2018
e5385e6
Add A851 support
XzxEmbedded May 30, 2018
37a06b0
Add DH display for A851
XzxEmbedded May 30, 2018
a1d8a34
Update P_STATUS_PVT for A851
XzxEmbedded May 30, 2018
0ffd924
Update api debug message for A851
XzxEmbedded May 30, 2018
0f3a9d4
Update target temperature
XzxEmbedded May 31, 2018
077d2f8
Update Smart speed parameters
XzxEmbedded Jun 5, 2018
c4e7ee6
Update AVA8_DRV_DIFFMAX
XzxEmbedded Jun 5, 2018
ad49bfb
Update mhsmm calculation for A851
Johnson-Fan Jun 27, 2018
8f2fdfc
Update options for avalon8
XzxEmbedded Jun 21, 2018
faa50df
Update smart speed parameters for A831
Johnson-Fan Jul 28, 2018
e45e7f1
Support to read LotID and WaferID
Jul 26, 2018
45c7ee1
Add a new option for avalon8
Jul 26, 2018
8f54bba
add modular_id support for otp info
Jul 31, 2018
5a74ee4
add otp_info initializing
Jul 31, 2018
7c5ea77
add reading OTP lot id CRC info
Aug 10, 2018
c56e445
Fix compile warning
Johnson-Fan Aug 16, 2018
90eeddf
Update AVA8_OTP_INFO_LOTID_OFFSET
Aug 16, 2018
4c38c03
Update the lotid and waferid display mode
Aug 16, 2018
22e35c9
Update otp display
Aug 16, 2018
f298b99
Rename avalon8-otp-asic to avalon8-cinfo-asic
Aug 16, 2018
57256f7
Update CINFO display
Johnson-Fan Aug 17, 2018
d8b2206
Minor fix comment indentation
Johnson-Fan Aug 17, 2018
db147ca
Merge s9 soc support
jameshilliard Aug 17, 2018
f749b22
Use normal cgminer api.
jameshilliard Aug 19, 2018
ed4bf7b
fix compiler warnings
jameshilliard Aug 19, 2018
00869e5
Remove sha2-soc files
jameshilliard Sep 7, 2018
45431ea
Update PID controller for adjusting fan
Johnson-Fan Sep 26, 2018
db73322
Minor update
Johnson-Fan Sep 26, 2018
87ff6ea
Update AVA8_DRV_DIFFMAX
Johnson-Fan Sep 27, 2018
5e676a7
Merge pull request #730 from jameshilliard/s9
ckolivas Sep 29, 2018
fe24e92
Merge pull request #722 from jameshilliard/testnet-diff-fix
ckolivas Sep 29, 2018
e670d4f
Merge pull request #721 from jameshilliard/bip34-serialization
ckolivas Sep 29, 2018
0d1b58a
Fix no hashrate of Avalon7
Nov 1, 2018
68f35dd
Merge pull request #733 from Johnson-Fan/master
ckolivas Nov 1, 2018
deb1b77
Revert "Support clean jobs for different stratum pool"
Johnson-Fan Nov 1, 2018
0b8adaa
Revert "Only update stratum work to MM when new block was found"
Johnson-Fan Nov 1, 2018
a2f909d
Revert "Add clean_jobs notify"
Johnson-Fan Nov 1, 2018
24c4689
Revert "Add SSP support for Avalon7"
Johnson-Fan Nov 1, 2018
e041ef3
Fix compile error
Johnson-Fan Nov 1, 2018
c6cb9cc
Merge branch 'avalon8-dev'
Johnson-Fan Nov 1, 2018
676c5ef
Fix no hashrate of Avalon8
Johnson-Fan Nov 1, 2018
508be06
Update README and ASIC-README for Avalon8
Johnson-Fan Dec 6, 2018
737e241
Fix --avalon8-freq-sel range
Johnson-Fan Dec 6, 2018
b8491c6
Merge pull request #734 from Johnson-Fan/master
ckolivas Dec 6, 2018
2788310
Merge remote-tracking branch 'upstream/master' into r606
vthoang Apr 6, 2019
10c89fd
Terminus R606 code - first commit
vthoang Apr 6, 2019
6e1b09d
fix WU calculation. fix zero chip not resetting
vthoang Apr 7, 2019
a453564
add WU to tune-down, as a longer term health metric.
vthoang Apr 7, 2019
0b57918
add one hour health check
vthoang Apr 7, 2019
363d879
found a r606 plateau during ramp match
vthoang Apr 8, 2019
67a12a6
redo no nonce handling.
vthoang Apr 10, 2019
0efd17c
limit tune down to once per hour, give it a little time to think it over
vthoang Apr 10, 2019
bcab82b
use high hashrate to set lower frequency boundary
vthoang Apr 11, 2019
6f28734
added computed peak to display, allow fast ramp while less than peak
vthoang Apr 11, 2019
78116c7
increase potential rate for frequency increase. really fast return …
vthoang Apr 13, 2019
5e485ce
update fallback to peak condition. start using microseconds.
vthoang Apr 17, 2019
7f04144
adjustment to mitigate observation on WIN32
vthoang Apr 18, 2019
2a03170
updated to only count successfully tested nonce in hashrate. switch …
vthoang Apr 23, 2019
532985e
reduce hashrate check interval - WIN32
vthoang Apr 23, 2019
66920e6
slow down frequency pings. increase max frequency setting.
vthoang Apr 24, 2019
c333ad1
pause full ms per usb_write to keep data from slipping into the same …
vthoang Apr 24, 2019
5c757f5
set R606 default frequency to 400. clean-up plateau detection.
vthoang Apr 28, 2019
0d524aa
scan rx buffer to re-align to reply's checksum. set pool's reported…
vthoang Apr 30, 2019
ef74c27
Fixed statline overflow. Suspend periodic frequency checks. Step do…
vthoang May 11, 2019
a62385f
AB option to use 2 instead of 4 midstate. ignore stray 0x80 message…
vthoang May 13, 2019
d76cd8a
adjust wait_factor for noboost (improve speed), adjust bauddiv for WI…
vthoang May 27, 2019
9e51f0b
wait for chips to converge at current frequency
vthoang May 27, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions ASIC-README
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Currently supported devices include:
- Avalon2/3
- Avalon4/4.1/6
- Avalon7
- Avalon8
- BFx2 USB
- Butterfly Labs SC 65/28nm range
- BF1 (bitfury) USB (red and blue)
Expand Down Expand Up @@ -59,6 +60,8 @@ Avalon4/4.1/6 devies need the --enable-avalon4 option when compiling cgminer.

Avalon7 will come up as AV7.

Avalon8 will come up as AV8.

Klondike will come up as KLN.

Klondike devices need the --enable-klondike option when compiling cgminer.
Expand Down Expand Up @@ -322,6 +325,35 @@ ASIC SPECIFIC COMMANDS
--avalon7-freqadj-temp <arg> Set Avalon7 check temperature when run into AVA7_FREQ_TEMPADJ_MODE (default: 104)
--avalon7-nonce-mask <arg> Set A3212 nonce mask, range 24-32. (default: 31)
--no-avalon7-asic-debug Disable A3212 debug.
--avalon8-voltage-level Set Avalon8 default level of core voltage, range:[0, 15], step: 1
--avalon8-voltage-level-offset Set Avalon8 default offset of core voltage level, range:[-2, 1], step: 1
--avalon8-freq Set Avalon8 default frequency, range:[25, 1200], step: 25, example: 800
--avalon8-freq-sel <arg> Set Avalon8 default frequency select, range:[0, 3], step: 1, example: 3 (default: 3)
--avalon8-fan Set Avalon8 target fan speed, range:[0, 100], step: 1, example: 0-100
--avalon8-temp <arg> Set Avalon8 target temperature, range:[0, 100] (default: 90)
--avalon8-polling-delay <arg> Set Avalon8 polling delay value (ms) (default: 20)
--avalon8-aucspeed <arg> Set AUC3 IIC bus speed (default: 400000)
--avalon8-aucxdelay <arg> Set AUC3 IIC xfer read delay, 4800 ~= 1ms (default: 19200)
--avalon8-smart-speed <arg> Set Avalon8 smart speed, range 0-1. 0 means Disable (default: 1)
--avalon8-th-pass <arg> Set A3210 th pass value (default: -1)
--avalon8-th-fail <arg> Set A3210 th fail value (default: -1)
--avalon8-th-init <arg> Set A3210 th init value (default: 32767)
--avalon8-th-ms <arg> Set A3210 th ms value (default: 5)
--avalon8-th-timeout <arg> Set A3210 th timeout value (default: 4294967295)
--avalon8-th-add <arg> Set A3210 th add value (default: 1)
--avalon8-iic-detect Enable Avalon8 detect through iic controller
--avalon8-nonce-mask <arg> Set A3210 nonce mask, range 24-32. (default: -1)
--avalon8-nonce-check <arg> Set A3210 nonce check, range 0-1. (default: 1)
--avalon8-roll-enable <arg> Set A3210 roll enable, range 0-1. (default: 1)
--avalon8-mux-l2h <arg> Set Avalon8 mux l2h, range 0-2. (default: 0)
--avalon8-mux-h2l <arg> Set Avalon8 mux h2l, range 0-1. (default: 1)
--avalon8-h2ltime0-spd <arg> Set Avalon8 h2ltime0 spd, range 0-255. (default: 3)
--avalon8-spdlow <arg> Set Avalon8 spdlow, range 0-3. (default: -1)
--avalon8-spdhigh <arg> Set Avalon8 spdhigh, range 0-3. (default: 3)
--avalon8-cinfo-asic Set Avalon8 cinfo asic index, range:[0, 25], step: 1
--avalon8-pid-p <arg> Set Avalon8 pid-p, range 0-9999. (default: 2)
--avalon8-pid-i <arg> Set Avalon8 pid-i, range 0-9999. (default: 5)
--avalon8-pid-d <arg> Set Avalon8 pid-d, range 0-9999. (default: 0)
--bab-options <arg> Set BaB options max:def:min:up:down:hz:delay:trf
--bet-clk <arg> Set clockspeed of ASICMINER Tube/Prisma to (arg+1)*10MHz (default: 23)
--bflsc-overheat <arg> Set overheat temperature where BFLSC devices throttle, 0 to disable (default: 90)
Expand Down Expand Up @@ -647,6 +679,38 @@ Avalon7 Devices
--avalon7-nonce-mask <arg> Set A3212 nonce mask, range 24-32. (default: 31)
--no-avalon7-asic-debug Disable A3212 debug.

Avalon8 Devices

--avalon8-voltage-level Set Avalon8 default level of core voltage, range:[0, 15], step: 1
--avalon8-voltage-level-offset Set Avalon8 default offset of core voltage level, range:[-2, 1], step: 1
--avalon8-freq Set Avalon8 default frequency, range:[25, 1200], step: 25, example: 800
--avalon8-freq-sel <arg> Set Avalon8 default frequency select, range:[0, 3], step: 1, example: 3 (default: 3)
--avalon8-fan Set Avalon8 target fan speed, range:[0, 100], step: 1, example: 0-100
--avalon8-temp <arg> Set Avalon8 target temperature, range:[0, 100] (default: 90)
--avalon8-polling-delay <arg> Set Avalon8 polling delay value (ms) (default: 20)
--avalon8-aucspeed <arg> Set AUC3 IIC bus speed (default: 400000)
--avalon8-aucxdelay <arg> Set AUC3 IIC xfer read delay, 4800 ~= 1ms (default: 19200)
--avalon8-smart-speed <arg> Set Avalon8 smart speed, range 0-1. 0 means Disable (default: 1)
--avalon8-th-pass <arg> Set A3210 th pass value (default: -1)
--avalon8-th-fail <arg> Set A3210 th fail value (default: -1)
--avalon8-th-init <arg> Set A3210 th init value (default: 32767)
--avalon8-th-ms <arg> Set A3210 th ms value (default: 5)
--avalon8-th-timeout <arg> Set A3210 th timeout value (default: 4294967295)
--avalon8-th-add <arg> Set A3210 th add value (default: 1)
--avalon8-iic-detect Enable Avalon8 detect through iic controller
--avalon8-nonce-mask <arg> Set A3210 nonce mask, range 24-32. (default: -1)
--avalon8-nonce-check <arg> Set A3210 nonce check, range 0-1. (default: 1)
--avalon8-roll-enable <arg> Set A3210 roll enable, range 0-1. (default: 1)
--avalon8-mux-l2h <arg> Set Avalon8 mux l2h, range 0-2. (default: 0)
--avalon8-mux-h2l <arg> Set Avalon8 mux h2l, range 0-1. (default: 1)
--avalon8-h2ltime0-spd <arg> Set Avalon8 h2ltime0 spd, range 0-255. (default: 3)
--avalon8-spdlow <arg> Set Avalon8 spdlow, range 0-3. (default: -1)
--avalon8-spdhigh <arg> Set Avalon8 spdhigh, range 0-3. (default: 3)
--avalon8-cinfo-asic Set Avalon8 cinfo asic index, range:[0, 25], step: 1
--avalon8-pid-p <arg> Set Avalon8 pid-p, range 0-9999. (default: 2)
--avalon8-pid-i <arg> Set Avalon8 pid-i, range 0-9999. (default: 5)
--avalon8-pid-d <arg> Set Avalon8 pid-d, range 0-9999. (default: 0)

BFLSC Devices

--bflsc-overheat <arg> Set overheat temperature where BFLSC devices throttle, 0 to disable (default: 90)
Expand Down
10 changes: 9 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cgminer_CPPFLAGS = $(PTHREAD_FLAGS) -fno-strict-aliasing $(JANSSON_CPPFLAGS) $(U
bin_PROGRAMS = cgminer

cgminer_LDFLAGS = $(PTHREAD_FLAGS)
cgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @PTHREAD_LIBS@ \
cgminer_LDADD = $(DLOPEN_FLAGS) @LIBCURL_LIBS@ @JANSSON_LIBS@ @LIBZ_LIBS@ @PTHREAD_LIBS@ \
@NCURSES_LIBS@ @PDCURSES_LIBS@ @WS2_LIBS@ \
@LIBUSB_LIBS@ @MM_LIBS@ @RT_LIBS@ @LIBSYSTEMD_LIBS@ \
@MATH_LIBS@ lib/libgnu.a ccan/libccan.a
Expand Down Expand Up @@ -112,6 +112,10 @@ cgminer_SOURCES += bf16-uartdevice.c bf16-uartdevice.h
cgminer_SOURCES += driver-bitfury16.c driver-bitfury16.h
endif

if HAS_BITMAIN_SOC
cgminer_SOURCES += driver-btm-soc.c driver-btm-soc.h
cgminer_SOURCES += bitmain-board-test.c bitmain-board-test.h
endif

if HAS_BITMINE_A1
cgminer_SOURCES += driver-SPI-bitmine-A1.c
Expand Down Expand Up @@ -174,6 +178,10 @@ if HAS_AVALON7
cgminer_SOURCES += driver-avalon7.c driver-avalon7.h
endif

if HAS_AVALON8
cgminer_SOURCES += driver-avalon8.c driver-avalon8.h
endif

if NEED_I2C_CONTEXT
cgminer_SOURCES += i2c-context.c
endif
Expand Down
60 changes: 60 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ CGMiner specific configuration options:
--enable-avalon2 Compile support for Avalon2/3 (default disabled)
--enable-avalon4 Compile support for Avalon4/4.1/6 (default disabled)
--enable-avalon7 Compile support for Avalon7 (default disabled)
--enable-avalon8 Compile support for Avalon8 (default disabled)
--enable-bab Compile support for BlackArrow Bitfury (default
disabled)
--enable-bflsc Compile support for BFL ASICs (default disabled)
Expand Down Expand Up @@ -259,6 +260,35 @@ Options for both config file and command line:
--avalon7-freqadj-temp <arg> Set Avalon7 check temperature when run into AVA7_FREQ_TEMPADJ_MODE (default: 104)
--avalon7-nonce-mask <arg> Set A3212 nonce mask, range 24-32. (default: 31)
--no-avalon7-asic-debug Disable A3212 debug.
--avalon8-voltage-level Set Avalon8 default level of core voltage, range:[0, 15], step: 1
--avalon8-voltage-level-offset Set Avalon8 default offset of core voltage level, range:[-2, 1], step: 1
--avalon8-freq Set Avalon8 default frequency, range:[25, 1200], step: 25, example: 800
--avalon8-freq-sel <arg> Set Avalon8 default frequency select, range:[0, 3], step: 1, example: 3 (default: 3)
--avalon8-fan Set Avalon8 target fan speed, range:[0, 100], step: 1, example: 0-100
--avalon8-temp <arg> Set Avalon8 target temperature, range:[0, 100] (default: 90)
--avalon8-polling-delay <arg> Set Avalon8 polling delay value (ms) (default: 20)
--avalon8-aucspeed <arg> Set AUC3 IIC bus speed (default: 400000)
--avalon8-aucxdelay <arg> Set AUC3 IIC xfer read delay, 4800 ~= 1ms (default: 19200)
--avalon8-smart-speed <arg> Set Avalon8 smart speed, range 0-1. 0 means Disable (default: 1)
--avalon8-th-pass <arg> Set A3210 th pass value (default: -1)
--avalon8-th-fail <arg> Set A3210 th fail value (default: -1)
--avalon8-th-init <arg> Set A3210 th init value (default: 32767)
--avalon8-th-ms <arg> Set A3210 th ms value (default: 5)
--avalon8-th-timeout <arg> Set A3210 th timeout value (default: 4294967295)
--avalon8-th-add <arg> Set A3210 th add value (default: 1)
--avalon8-iic-detect Enable Avalon8 detect through iic controller
--avalon8-nonce-mask <arg> Set A3210 nonce mask, range 24-32. (default: -1)
--avalon8-nonce-check <arg> Set A3210 nonce check, range 0-1. (default: 1)
--avalon8-roll-enable <arg> Set A3210 roll enable, range 0-1. (default: 1)
--avalon8-mux-l2h <arg> Set Avalon8 mux l2h, range 0-2. (default: 0)
--avalon8-mux-h2l <arg> Set Avalon8 mux h2l, range 0-1. (default: 1)
--avalon8-h2ltime0-spd <arg> Set Avalon8 h2ltime0 spd, range 0-255. (default: 3)
--avalon8-spdlow <arg> Set Avalon8 spdlow, range 0-3. (default: -1)
--avalon8-spdhigh <arg> Set Avalon8 spdhigh, range 0-3. (default: 3)
--avalon8-cinfo-asic Set Avalon8 cinfo asic index, range:[0, 25], step: 1
--avalon8-pid-p <arg> Set Avalon8 pid-p, range 0-9999. (default: 2)
--avalon8-pid-i <arg> Set Avalon8 pid-i, range 0-9999. (default: 5)
--avalon8-pid-d <arg> Set Avalon8 pid-d, range 0-9999. (default: 0)
--bab-options <arg> Set BaB options max:def:min:up:down:hz:delay:trf
--balance Change multipool strategy from failover to even share balance
--benchfile <arg> Run cgminer in benchmark mode using a work file - produces no shares
Expand Down Expand Up @@ -455,6 +485,35 @@ ASIC only options:
--avalon7-freqadj-temp <arg> Set Avalon7 check temperature when run into AVA7_FREQ_TEMPADJ_MODE (default: 104)
--avalon7-nonce-mask <arg> Set A3212 nonce mask, range 24-32. (default: 31)
--no-avalon7-asic-debug Disable A3212 debug.
--avalon8-voltage-level Set Avalon8 default level of core voltage, range:[0, 15], step: 1
--avalon8-voltage-level-offset Set Avalon8 default offset of core voltage level, range:[-2, 1], step: 1
--avalon8-freq Set Avalon8 default frequency, range:[25, 1200], step: 25, example: 800
--avalon8-freq-sel <arg> Set Avalon8 default frequency select, range:[0, 3], step: 1, example: 3 (default: 3)
--avalon8-fan Set Avalon8 target fan speed, range:[0, 100], step: 1, example: 0-100
--avalon8-temp <arg> Set Avalon8 target temperature, range:[0, 100] (default: 90)
--avalon8-polling-delay <arg> Set Avalon8 polling delay value (ms) (default: 20)
--avalon8-aucspeed <arg> Set AUC3 IIC bus speed (default: 400000)
--avalon8-aucxdelay <arg> Set AUC3 IIC xfer read delay, 4800 ~= 1ms (default: 19200)
--avalon8-smart-speed <arg> Set Avalon8 smart speed, range 0-1. 0 means Disable (default: 1)
--avalon8-th-pass <arg> Set A3210 th pass value (default: -1)
--avalon8-th-fail <arg> Set A3210 th fail value (default: -1)
--avalon8-th-init <arg> Set A3210 th init value (default: 32767)
--avalon8-th-ms <arg> Set A3210 th ms value (default: 5)
--avalon8-th-timeout <arg> Set A3210 th timeout value (default: 4294967295)
--avalon8-th-add <arg> Set A3210 th add value (default: 1)
--avalon8-iic-detect Enable Avalon8 detect through iic controller
--avalon8-nonce-mask <arg> Set A3210 nonce mask, range 24-32. (default: -1)
--avalon8-nonce-check <arg> Set A3210 nonce check, range 0-1. (default: 1)
--avalon8-roll-enable <arg> Set A3210 roll enable, range 0-1. (default: 1)
--avalon8-mux-l2h <arg> Set Avalon8 mux l2h, range 0-2. (default: 0)
--avalon8-mux-h2l <arg> Set Avalon8 mux h2l, range 0-1. (default: 1)
--avalon8-h2ltime0-spd <arg> Set Avalon8 h2ltime0 spd, range 0-255. (default: 3)
--avalon8-spdlow <arg> Set Avalon8 spdlow, range 0-3. (default: -1)
--avalon8-spdhigh <arg> Set Avalon8 spdhigh, range 0-3. (default: 3)
--avalon8-cinfo-asic Set Avalon8 cinfo asic index, range:[0, 25], step: 1
--avalon8-pid-p <arg> Set Avalon8 pid-p, range 0-9999. (default: 2)
--avalon8-pid-i <arg> Set Avalon8 pid-i, range 0-9999. (default: 5)
--avalon8-pid-d <arg> Set Avalon8 pid-d, range 0-9999. (default: 0)
--bab-options <arg> Set BaB options max:def:min:up:down:hz:delay:trf
--bflsc-overheat <arg> Set overheat temperature where BFLSC devices throttle, 0 to disable (default: 90)
--bitburner-fury-options <arg> Override avalon-options for BitBurner Fury boards baud:miners:asic:timeout:freq
Expand Down Expand Up @@ -1177,6 +1236,7 @@ USB on any hardware are the following:
--enable-avalon2
--enable-avalon4
--enable-avalon7
--enable-avalon8
--enable-bflsc
--enable-bitfury
--enable-cointerra
Expand Down
24 changes: 21 additions & 3 deletions api.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
defined(USE_MINION) || defined(USE_COINTERRA) || defined(USE_BITMINE_A1) || \
defined(USE_ANT_S1) || defined(USE_ANT_S2) || defined(USE_ANT_S3) || defined(USE_SP10) || \
defined(USE_SP30) || defined(USE_ICARUS) || defined(USE_HASHRATIO) || defined(USE_AVALON_MINER) || \
defined(USE_AVALON7) || defined(USE_GEKKO)
defined(USE_AVALON7) || defined(USE_AVALON8) || defined(USE_BITMAIN_SOC) || defined(USE_GEKKO)
#define HAVE_AN_ASIC 1
#endif

Expand Down Expand Up @@ -141,9 +141,11 @@ static const char SEPARATOR = '|';

static const char *APIVERSION = "3.7";
static const char *DEAD = "Dead";
#if defined(HAVE_AN_ASIC) || defined(HAVE_AN_FPGA)
static const char *SICK = "Sick";
static const char *NOSTART = "NoStart";
static const char *INIT = "Initialising";
#endif
static const char *DISABLED = "Disabled";
static const char *ALIVE = "Alive";
static const char *REJECTING = "Rejecting";
Expand Down Expand Up @@ -1989,6 +1991,7 @@ static void minerconfig(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __
io_close(io_data);
}

#if defined(HAVE_AN_ASIC) || defined(HAVE_AN_FPGA)
static const char *status2str(enum alive status)
{
switch (status) {
Expand All @@ -2006,6 +2009,7 @@ static const char *status2str(enum alive status)
return UNKNOWN;
}
}
#endif

#ifdef HAVE_AN_ASIC
static void ascstatus(struct io_data *io_data, int asc, bool isjson, bool precom)
Expand Down Expand Up @@ -2170,10 +2174,12 @@ static void pgastatus(struct io_data *io_data, int pga, bool isjson, bool precom
static void devstatus(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __maybe_unused char *param, bool isjson, __maybe_unused char group)
{
bool io_open = false;
int devcount = 0;
int numasc = 0;
int numpga = 0;
#if defined(HAVE_AN_ASIC) || defined(HAVE_AN_FPGA)
int devcount = 0;
int i;
#endif

#ifdef HAVE_AN_ASIC
numasc = numascs();
Expand Down Expand Up @@ -2220,10 +2226,12 @@ static void devstatus(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __ma
static void edevstatus(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __maybe_unused char *param, bool isjson, __maybe_unused char group)
{
bool io_open = false;
int devcount = 0;
int numasc = 0;
int numpga = 0;
#if defined(HAVE_AN_ASIC) || defined(HAVE_AN_FPGA)
int devcount = 0;
int i;
#endif
#ifdef USE_USBUTILS
time_t howoldsec = 0;
#endif
Expand Down Expand Up @@ -4872,6 +4880,16 @@ void mcast_init()
quit(1, "API mcast thread create failed");
}

#ifdef USE_BITMAIN_SOC
void reCalculateAVG()
{
new_total_mhashes_done = total_mhashes_done;
if(total_secs>0)
new_total_secs = total_secs-1;
else new_total_secs=total_secs;
}
#endif

void api(int api_thr_id)
{
struct io_data *io_data;
Expand Down
Loading