Browse Source

ICA default fpga_count to work_division if specified

nfactor-troky
Kano 13 years ago
parent
commit
b8b9c468e0
  1. 2
      FPGA-README
  2. 5
      driver-icarus.c

2
FPGA-README

@ -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

5
driver-icarus.c

@ -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);
} }

Loading…
Cancel
Save