Browse Source

PARTIAL Merge commit '1725179' into stratum

Omitted merging MMQ driver refactoring mess

Conflicts:
	driver-modminer.c
	miner.c
	miner.h
Luke Dashjr 13 years ago
parent
commit
d3de5cec56
3 changed files with 49 additions and 2 deletions
  1. 44 2
      FPGA-README
  2. 4 0
      miner.c
  3. 1 0
      miner.h

+ 44 - 2
FPGA-README

@@ -2,7 +2,48 @@
 This README contains extended details about FPGA mining with cgminer
 This README contains extended details about FPGA mining with cgminer
 
 
 
 
-Bitforce
+ModMinerQuad (MMQ)
+------------------
+
+The mining bitstream does not survive a power cycle, so cgminer will upload
+it, if it needs to, before it starts mining
+
+You must make sure you have an approriate firmware in your MMQ
+Read here for official details of changing the firmware:
+ http://wiki.btcfpga.com/index.php?title=Firmware
+
+The basics of changing the firmware are:
+ Join the 2 left pads of the "RESET" pad with wire and the led will dim
+ Without dicsonnecting the "RESET", join the 2 left pads of the "ISP" pad
+ with a wire and it will stay dim
+ Release "RESET" then release "ISP" and is should still be dim
+ Unplug the USB and when you plug it back in it will show up as a mass
+ storage device
+  Linux: (as one single line):
+   mcopy -i /dev/disk/by-id/usb-NXP_LPC134X_IFLASH_ISP000000000-0:0
+      modminer091012.bin ::/firmware.bin
+  Windows: delete the MSD device file firmware.bin and copy in the new one
+   rename the new file and put it under the same name 'firmware.bin'
+ Disconnect the USB correctly (so writes are flushed first)
+ Join and then disconnect "RESET" and then plug the USB back in and it's done
+
+Best to update to one of the latest 2 listed below if you don't already
+have one of them in your MMQ
+
+The current latest different firmware are:
+
+ Latest for support of normal or TLM bitstream:
+  http://btcfpga.com/files/firmware/modminer092612-TLM.bin
+
+ Latest with only normal bitstream support (Temps/HW Fix):
+  http://btcfpga.com/files/firmware/modminer091012.bin
+
+The code is currently tested on the modminer091012.bin firmware.
+This comment will be updated when others have been tested
+
+
+Bitforce (BFL)
+--------------
 
 
 --bfl-range         Use nonce range on bitforce devices if supported
 --bfl-range         Use nonce range on bitforce devices if supported
 
 
@@ -37,7 +78,8 @@ the MH/s value reported with the changed firmware - and the MH/s reported
 will be less than the firmware speed since you lose work on every block change.
 will be less than the firmware speed since you lose work on every block change.
 
 
 
 
-Icarus
+Icarus (ICA)
+------------
 
 
 There are two hidden options in cgminer when Icarus support is compiled in:
 There are two hidden options in cgminer when Icarus support is compiled in:
 
 

+ 4 - 0
miner.c

@@ -5845,6 +5845,10 @@ bool submit_nonce(struct thr_info *thr, struct work *work, uint32_t nonce)
 			       cgpu->api->name, cgpu->device_id);
 			       cgpu->api->name, cgpu->device_id);
 			++hw_errors;
 			++hw_errors;
 			++thr->cgpu->hw_errors;
 			++thr->cgpu->hw_errors;
+
+			if (thr->cgpu->api->hw_error)
+				thr->cgpu->api->hw_error(thr);
+
 			return false;
 			return false;
 		}
 		}
 		case TNR_HIGH:
 		case TNR_HIGH:

+ 1 - 0
miner.h

@@ -313,6 +313,7 @@ struct device_api {
 	void (*free_work)(struct thr_info*, struct work*);
 	void (*free_work)(struct thr_info*, struct work*);
 	bool (*prepare_work)(struct thr_info*, struct work*);
 	bool (*prepare_work)(struct thr_info*, struct work*);
 	int64_t (*scanhash)(struct thr_info*, struct work*, int64_t);
 	int64_t (*scanhash)(struct thr_info*, struct work*, int64_t);
+	void (*hw_error)(struct thr_info*);
 	void (*thread_shutdown)(struct thr_info*);
 	void (*thread_shutdown)(struct thr_info*);
 	void (*thread_enable)(struct thr_info*);
 	void (*thread_enable)(struct thr_info*);
 };
 };