Bitcoin Forum
December 08, 2016, 02:28:20 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 [33] 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 »
  Print  
Author Topic: Official Open Source FPGA Bitcoin Miner (Last Update: April 14th, 2013)  (Read 402782 times)
kramble
Sr. Member
****
Offline Offline

Activity: 384



View Profile WWW
March 15, 2013, 01:28:17 PM
 #641

Looks to me that the pool is rejecting ALL of your shares! So either the fpga is producing garbage, or your submission to the pool is not working.

The FPGA seem to be running. The problem appears to be related to upstream json communication. I'm a bitcoin newbie so it's a little hard to tell if the transactions are correct. I've included some puts statements and here is what I observe:

Code:
[03/15/2013 13:03:35] 99.99 MH/s (~52.70 MH/s) [Rej: 2/2 (100.00%)]
Submitting work ... 0000000236fdabecb3eff6caa95027cf247643cade23325ab5d677040000
0304000000006f21ab6f094d06f1df5ff632aeeedb3634639ab1762bcbda5a511f0c8167ea675143
0e081a0375fae44d3b1a000000800000000000000000000000000000000000000000000000000000
000000000000000000000000000080020000
do_rpc_request: url: http://localhost:8332 request: {"method": "getwork", "params": [ "0000000236fdabecb3eff6caa95027cf247643cade23325ab5d6770400000304000000006f21ab6f094d06f1df5ff632aeeedb3634639ab1762bcbda5a511f0c8167ea6751430e081a0375fae44d3b1a000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000" ], "id":1}
do_rpc_request: will return result false error null id 1
json_dict: result false error null id 1
[03/15/2013 13:03:36] 1a3b4de4 _rejected_
do_rpc_request: url: http://localhost:8332 request: {"method": "getwork", "params": [], "id":0}
do_rpc_request: will return result {midstate 662f73807a8ad39f1d7fef2e480fefb19a9c8c9be9dc3bba07efd37c4c4a0859 data 0000000236fdabecb3eff6caa95027cf247643cade23325ab5d677040000030400000000ad9da8b1b157514d40ca3ddd23ee4dfef10f09f5a84d9717bcc5d7190a0d404151430e171a0375fa00000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000080020000 hash1 00000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000010000 target 0000000000000000000000000000000000000000000000fa7503000000000000} error null id 0
[03/15/2013 13:03:38] 100.01 MH/s (~77.62 MH/s) [Rej: 3/3 (100.00%)]


The problem might also be related to the configuration of my bitcoind on localhost.


Sorry for the delay, I had to reinstall python on my laptop to run the check script (seems my windows 8 upgrade broke it).

Yes, I can confirm that 1a3b4de4 is a valid nonce for that block (difficulty 1 hash), so the problem looks to be with your bitcoind configuration rather than the fpga. Unfortunately I can't help with that.

Best of luck
Mark

Github https://github.com/kramble BLC BkRaMaRkw3NeyzsZ2zUgXsNLogVVkQ1iPV
1481164100
Hero Member
*
Offline Offline

Posts: 1481164100

View Profile Personal Message (Offline)

Ignore
1481164100
Reply with quote  #2

1481164100
Report to moderator
1481164100
Hero Member
*
Offline Offline

Posts: 1481164100

View Profile Personal Message (Offline)

Ignore
1481164100
Reply with quote  #2

1481164100
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481164100
Hero Member
*
Offline Offline

Posts: 1481164100

View Profile Personal Message (Offline)

Ignore
1481164100
Reply with quote  #2

1481164100
Report to moderator
1481164100
Hero Member
*
Offline Offline

Posts: 1481164100

View Profile Personal Message (Offline)

Ignore
1481164100
Reply with quote  #2

1481164100
Report to moderator
kingcoin
Sr. Member
****
Offline Offline

Activity: 262


View Profile
March 15, 2013, 01:45:51 PM
 #642

Yes, I think that is likely. Just to eliminate this, why not just set up an account on btcguild (it only takes a moment) and try it on there?

The problem appears to be related to my local bitcoind. Now with btcguild.com as upstream I'm at least getting:


Code:
[03/15/2013 14:43:55] 100.00 MH/s (~154.00 MH/s) [Rej: 0/9 (0.00%)]
[03/15/2013 14:43:57] c6268b39 accepted
[03/15/2013 14:43:58] cf4ae4eb accepted
[03/15/2013 14:44:00] 99.98 MH/s (~184.55 MH/s) [Rej: 0/11 (0.00%)]
Thank you for the suggestion.
kingcoin
Sr. Member
****
Offline Offline

Activity: 262


View Profile
March 15, 2013, 02:25:51 PM
 #643

2) Will the TCL script handle multiple instances of the miner within a single FPGA?

I tried to build an image with two instances of fpgaminer_top but it did not change anything. Seems like the tcl scripts can only handle a single GNON/NONC interface. So I guess the answer is no here as well.
senseless
Sr. Member
****
Offline Offline

Activity: 388



View Profile
March 15, 2013, 02:35:35 PM
 #644

2) Will the TCL script handle multiple instances of the miner within a single FPGA?

I tried to build an image with two instances of fpgaminer_top but it did not change anything. Seems like the tcl scripts can only handle a single GNON/NONC interface. So I guess the answer is no here as well.

If a custom driver for cgminer were devised for this firmware should be possible to check for multiple instances per fpga and multiple fpga per jtag. As I mentioned before I'm willing to put up some coinage for a driver bounty. 4x 233mhz w/ cgminer sounds nice.









kramble
Sr. Member
****
Offline Offline

Activity: 384



View Profile WWW
March 15, 2013, 02:47:07 PM
 #645

2) Will the TCL script handle multiple instances of the miner within a single FPGA?

I tried to build an image with two instances of fpgaminer_top but it did not change anything. Seems like the tcl scripts can only handle a single GNON/NONC interface. So I guess the answer is no here as well.

You could just use different ident strings for the second instance eg STA1/DAT1/GNO1/NON1 and STA2/DAT2/GNO2/NON2
(they seem to need to be 4 chars not longer), then duplicate the jtag driver code to direct the work alternately between them.

At a very long shot you might even try just running two instances of the mine.tcl scripts (in separate directories due to dependancies) and just change the idents accordingly. I don't know if this is supported by the quartus_stp driver, but I have had some success with this approach on another project.

[EDIT]
Actually, thinking about this, its a pretty crude approach. It would be better to rewrite fpgaminer_top so as to apportion work between multiple hashers, and queue the results for transmission back via a single channel. Rather beyond my skills I'm afraid. I'll also note that the quartus_stp JTAG driver is not entirely reliable. I've had the mine.tcl script drop out with errors on extended runs (this is partly why I went the route of a custom serial interface to my raspberry pi host).

[EDIT2]
Then again it would be ridiculously easy just to push the same midstate_buf and data_buf into two or more sha256_transform units and just use different nonce values (eg for four instances just hardwire the top two bits of the nonce and count over a 30 bit range). Then just load golden_nonce based on whichever unit matches. Voila. You'd probably also need to reduce the getwork from every 20 seconds to something a bit faster in order to avoid wrapping and duplicating work. Longpoll would be nice too.

[EDIT3]
This is roughly what I had in mind https://github.com/kramble/DE0-Nano-BitCoin-Miner/blob/master/Misc/quad_fpgaminer_top.v
... just as a discussion point. I can't vouch for it working and it needs optimization, but I have given it a quick trip through the simulator (just tested one of the cores). I also found LX150_makomk_dualcore in the fpgaminer distribution which may be worth a look.

Anyway, with the rate that ASIC's are coming on stream and pushing up the difficulty, I doubt if anyone is going to do any further work on the fpgaminer code.

Mark

Github https://github.com/kramble BLC BkRaMaRkw3NeyzsZ2zUgXsNLogVVkQ1iPV
kingcoin
Sr. Member
****
Offline Offline

Activity: 262


View Profile
March 15, 2013, 04:06:50 PM
 #646

It would be better to rewrite fpgaminer_top so as to apportion work between multiple hashers

Yes, a pretty plain indirect addressing unit which can address multiple instances was what I was thinking.

Anyway, with the rate that ASIC's are coming on stream and pushing up the difficulty, I doubt if anyone is going to do any further work on the fpgaminer code.

True, even though I haven't really sat down to study the different ASIC offerings which are available yet.
kingcoin
Sr. Member
****
Offline Offline

Activity: 262


View Profile
March 16, 2013, 03:53:33 AM
 #647

# ** Error: (vsim-3033) fpgaminer_6_1200mv_85c_slow.vo(759): Instantiation of 'dffeas' failed. The design unit was not found.
#         Region: /test_fpgaminer_top/uut

You're doing a simulation on the netlist after synthesis. This is very slow and is probably not what you want.
fizzisist
Hero Member
*****
Offline Offline

Activity: 720



View Profile WWW
March 16, 2013, 05:56:55 AM
 #648

Yes, I think that is likely. Just to eliminate this, why not just set up an account on btcguild (it only takes a moment) and try it on there?

The problem appears to be related to my local bitcoind. Now with btcguild.com as upstream I'm at least getting:


Code:
[03/15/2013 14:43:55] 100.00 MH/s (~154.00 MH/s) [Rej: 0/9 (0.00%)]
[03/15/2013 14:43:57] c6268b39 accepted
[03/15/2013 14:43:58] cf4ae4eb accepted
[03/15/2013 14:44:00] 99.98 MH/s (~184.55 MH/s) [Rej: 0/11 (0.00%)]
Thank you for the suggestion.


As I understand it, fpgaminer doesn't care about the target difficulty and always treats it as 1, so showed lots of rejects when you were solo mining. There's no problem with this, because that just means you haven't found a block yet. When one is accepted is when you should be interested, because you just earned 25 BTC! If you don't want to see the rejects because they bother you, recode the host software (tcl?) to request the real target and make sure any hashes received from the FPGA meet that target. The FPGA will always return shares that meet the target of 1, which you can just ignore or count to make sure the FPGA is still hashing properly.

kingcoin
Sr. Member
****
Offline Offline

Activity: 262


View Profile
March 16, 2013, 01:31:58 PM
 #649

As I understand it, fpgaminer doesn't care about the target difficulty and always treats it as 1, so showed lots of rejects when you were solo mining.

That makes sense.
senseless
Sr. Member
****
Offline Offline

Activity: 388



View Profile
March 18, 2013, 09:20:56 AM
 #650

2) Will the TCL script handle multiple instances of the miner within a single FPGA?

I tried to build an image with two instances of fpgaminer_top but it did not change anything. Seems like the tcl scripts can only handle a single GNON/NONC interface. So I guess the answer is no here as well.

I was able to increase the fmax on my chip for the Stratix IV OrphanGland code from 107 to 221 by removing all of the quasi-piplining code from the top and the associated files from the project. I now have 3 cores hashing @ 220mhz (450MH/s) on my EP4SGX230. It's still no where near as efficient as the makomk-mod code. Going to try to implement makomk's hashing core under the orphangland top.

Also, on a side note. I talked with Luke-Jr and he said he'd be willing to build a driver (bfgminer already has a jtag driver) if someone were to send him a board. I was thinking of just sending him some coinage so he can buy a DE0-Nano (which should be sufficient to get communication with the firmware running). He said it would be able to take a look in 1-2 weeks.

kingcoin
Sr. Member
****
Offline Offline

Activity: 262


View Profile
March 18, 2013, 11:39:51 AM
 #651

I was able to increase the fmax on my chip for the Stratix IV OrphanGland code from 107 to 221 by removing all of the quasi-piplining code from the top and the associated files from the project. I now have 3 cores hashing @ 220mhz (450MH/s) on my EP4SGX230.

Cool. Do the three cores act like individual workers, or do they work together? Did you ever try to run your design with a Stratix-V target to see what fmax you would get?

senseless
Sr. Member
****
Offline Offline

Activity: 388



View Profile
March 18, 2013, 12:05:10 PM
 #652

I was able to increase the fmax on my chip for the Stratix IV OrphanGland code from 107 to 221 by removing all of the quasi-piplining code from the top and the associated files from the project. I now have 3 cores hashing @ 220mhz (450MH/s) on my EP4SGX230.

Cool. Do the three cores act like individual workers, or do they work together? Did you ever try to run your design with a Stratix-V target to see what fmax you would get?



They work together dividing work between N cores instead of each core doing its own work.

It holds the nonce value in a variable(?) and then rotates that and provides work to each core. I think it might be a bit more efficient if each core was given a nonce range and then does its own internal flipping but would require a larger footprint. It's definitely not doing 1 hash per clock per core. I think the cores just get hung up waiting for data. It seems like it's doing 1 hash per 2 clocks (Maybe it takes a full clock just to get the data to the core). My hash rate has slipped down to 325-350 with good streaks pushing that up to 400+ and the actual hashing value should be closer to 700mh/s. Hash rate is based on submitted shares since the firmware doesnt have any way to stat the internal hashing frequency.

I've got 2-3 compiles going at any given time atm (takes like 2 hrs to compile). I'll try it out on a Stratix V when I can.



kramble
Sr. Member
****
Offline Offline

Activity: 384



View Profile WWW
March 18, 2013, 12:38:06 PM
 #653

Are you still using the original mine.tcl script? This does getwork at a fixed rate (every 20 secs, unless a share is submitted in the meantime), but at 660MH/s (which 3 cores at 220MHz should be doing), the nonce will wrap every 6 seconds, so you end up duplicating work and get a reduced actual throughput. Just a thought.

Mark

Github https://github.com/kramble BLC BkRaMaRkw3NeyzsZ2zUgXsNLogVVkQ1iPV
senseless
Sr. Member
****
Offline Offline

Activity: 388



View Profile
March 18, 2013, 01:03:02 PM
 #654

Are you still using the original mine.tcl script? This does getwork at a fixed rate (every 20 secs, unless a share is submitted in the meantime), but at 660MH/s (which 3 cores at 220MHz should be doing), the nonce will wrap every 6 seconds, so you end up duplicating work and get a reduced actual throughput. Just a thought.

Mark

Thank you, I was even showing duplicate submissions on the pool. I set it to 3 and now i'm pushing 600MH/s submission rate!

Now if I can just find 8% more resources so I can add in 1 more core I'll meet BFL single original specs!



kramble
Sr. Member
****
Offline Offline

Activity: 384



View Profile WWW
March 18, 2013, 01:17:24 PM
 #655

Now if I can just find 8% more resources so I can add in 1 more core I'll meet BFL single original specs!

If not, you could probably squeeze in an extra half-core, though it would make apportioning work a bit trickier.

Mark

Github https://github.com/kramble BLC BkRaMaRkw3NeyzsZ2zUgXsNLogVVkQ1iPV
senseless
Sr. Member
****
Offline Offline

Activity: 388



View Profile
March 18, 2013, 04:23:43 PM
 #656

Average of 670Mh/s based on my submissions over the last 1240 share submissions. Thanks again, the TCL was definitely the problem.

I started compiling a stratix V with 4 cores to see what the fmax would be.

Fmax was 147mhz. There were some routing issues and it had to add in some delays to fit 4 cores. There also seemed to be some weird clocking things going on in the stratix v with some sort of fractional clock. I'm not sure what that was all about, probably some sort of EP5 specific features that will improve performance if the design takes advantage of them.





kingcoin
Sr. Member
****
Offline Offline

Activity: 262


View Profile
March 19, 2013, 08:02:08 AM
 #657

I would have expected the 28nm Stratix V to be faster. Maybe the new ALM structure does not map that well into the sha logic, at least with the current version of Quartus.
senseless
Sr. Member
****
Offline Offline

Activity: 388



View Profile
March 19, 2013, 09:10:40 AM
 #658

I would have expected the 28nm Stratix V to be faster. Maybe the new ALM structure does not map that well into the sha logic, at least with the current version of Quartus.

That was under Quartus 11.1, so not even the latest Quartus. I would also expect it to clock higher but it seems the stratix v's are pretty significantly different when compared to previous versions.

Do you have a supply of Stratix Vs? What sort of pricing are you getting for them?






kingcoin
Sr. Member
****
Offline Offline

Activity: 262


View Profile
March 19, 2013, 09:50:11 AM
 #659

No I don't have a supply of Stratix V's. I was juts curious of their mining performance
kingcoin
Sr. Member
****
Offline Offline

Activity: 262


View Profile
March 23, 2013, 01:56:22 PM
 #660

I was playing with the multicore FPGA design and I get high local rates (as expected), but the estimated rate is low. Is this because the mine.tcl script does not implement long polling?

[03/23/2013 14:52:55] 300.00 MH/s (~54.09 MH/s) [Rej: 0/42 (0.00%)]

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 [33] 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!