From b8b9c468e0ed2c069379b5e2ebd72c1ea3dc602b Mon Sep 17 00:00:00 2001 From: Kano Date: Thu, 2 Aug 2012 07:58:05 +1000 Subject: [PATCH] ICA default fpga_count to work_division if specified --- FPGA-README | 2 ++ driver-icarus.c | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/FPGA-README b/FPGA-README index 1c83d9fb..0c4da8a5 100644 --- a/FPGA-README +++ b/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 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' + 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 for all extra devices diff --git a/driver-icarus.c b/driver-icarus.c index 0b3aea7a..f1cf9d17 100644 --- a/driver-icarus.c +++ b/driver-icarus.c @@ -470,9 +470,10 @@ static void get_options(int this_option_offset, int *baud, int *work_division, i if (*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; - 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); quit(1, err_buf); }