1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 23:08:07 +00:00

ICA default fpga_count to work_division if specified

This commit is contained in:
Kano 2012-08-02 07:58:05 +10:00
parent 94c09b6c54
commit b8b9c468e0
2 changed files with 5 additions and 2 deletions

View File

@ -26,6 +26,8 @@ There are two hidden options in cgminer when Icarus support is compiled in:
e.g. 2 means each FPGA does half the nonce range - default 2 e.g. 2 means each FPGA does half the nonce range - default 2
fpga_count The actual number of FPGA working - this would normally be the same fpga_count The actual number of FPGA working - this would normally be the same
as work_division - range is from 1 up to 'work_division' as work_division - range is from 1 up to 'work_division'
It defaults to the value of work_division - or 2 if you don't specify
work_division
If you define fewer comma seperated values than Icarus devices, the last values will be used If you define fewer comma seperated values than Icarus devices, the last values will be used
for all extra devices for all extra devices

View File

@ -470,9 +470,10 @@ static void get_options(int this_option_offset, int *baud, int *work_division, i
if (*colon) { if (*colon) {
tmp = atoi(colon); tmp = atoi(colon);
if (tmp == 1 || tmp == 2 || tmp == 4 || tmp == 8) if (tmp == 1 || tmp == 2 || tmp == 4 || tmp == 8) {
*work_division = tmp; *work_division = tmp;
else { *fpga_count = tmp; // default to the same
} else {
sprintf(err_buf, "Invalid icarus-options for work_division (%s) must be 1, 2, 4 or 8", colon); sprintf(err_buf, "Invalid icarus-options for work_division (%s) must be 1, 2, 4 or 8", colon);
quit(1, err_buf); quit(1, err_buf);
} }