Bitcoin Forum
December 07, 2016, 10:11:54 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 4 5 6 »  All
  Print  
Author Topic: An estimate of fpga performance  (Read 48735 times)
mimarob
Member
**
Offline Offline

Activity: 98


View Profile
December 19, 2010, 03:39:46 PM
 #1

Hello!

I converted the sha256 available in opencores.org into vhdl, just to see what to expect.

I got an xc3s500E about 1/3 full on the logic gates, so with a shoe horn one could maybe fit 3 cores into one of these. That does not include the communications with the host, nor the "less than" compare if the result is below the current threshhold.

 (I used an antique ISE (8.something) so maybe newer versions will compute better).

Assuming a maximum of 300 MHz and about 80 cycles to read in, process and output the result (8 + 64 + Cool

You'd get 3*300/80 ~= 11 Mhash/s

This device can be had on a nice DIP socket (GOP modules) at about 60 EUR.

If you want to run this simulation (only tried on Linus), you need ghdl and gtkwave packages (and probably some more stuff that I forgot).

The tar in the attachement contains the synthable file sha256.vhd and the test_sha256.vhd and a simple Makefile.


bitcoin address: 15swBLKathoPyX94HgptYXSSqf7SUGhG4z
1481148714
Hero Member
*
Offline Offline

Posts: 1481148714

View Profile Personal Message (Offline)

Ignore
1481148714
Reply with quote  #2

1481148714
Report to moderator
1481148714
Hero Member
*
Offline Offline

Posts: 1481148714

View Profile Personal Message (Offline)

Ignore
1481148714
Reply with quote  #2

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

Posts: 1481148714

View Profile Personal Message (Offline)

Ignore
1481148714
Reply with quote  #2

1481148714
Report to moderator
grondilu
Legendary
*
Offline Offline

Activity: 1134


View Profile
December 19, 2010, 04:10:39 PM
 #2

Ok but in order to mine don't you need a full VHDL implementation of the miner code ?
Because if you must communicate between your PC and your FPGA, this might slow it down quite a lot.

Also I don't understand :  have you just done simulations or have you tried on the actual device ?
bytemaster
Hero Member
*****
Offline Offline

Activity: 728

BitShares


View Profile WWW
December 19, 2010, 05:45:54 PM
 #3

How does this compare to a GPU?   

https://steemit.com  Blogging is the new Mining
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1470


View Profile
December 19, 2010, 05:46:17 PM
 #4

Because if you must communicate between your PC and your FPGA, this might slow it down quite a lot.

As long as the FPGA performs millions of hashes for each "call" (host sents work to FPGA), host<->FPGA communication cost is small.

Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
bitcoin2
Jr. Member
*
Offline Offline

Activity: 32


View Profile
December 19, 2010, 06:16:21 PM
 #5

Nice  Smiley
A full implementation would be great!
bitcoin2
Jr. Member
*
Offline Offline

Activity: 32


View Profile
December 19, 2010, 06:28:26 PM
 #6

How does this compare to a GPU?   


One AMD radeon 5970 (570 Mhash/s) = ~ 50 * xc3s500E (11 Mhash/s). But with FPGAs the Mhash/W should be better as with GPUs.
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1470


View Profile
December 19, 2010, 06:42:25 PM
 #7

One AMD radeon 5970 (570 Mhash/s) = ~ 50 * xc3s500E (11 Mhash/s). But with FPGAs the Mhash/W should be better as with GPUs.

I'm not sure what Mhash/W is.  But, GPUs are ASIC so they begin with a significant advantage over FPGAs.

Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
bitcoin2
Jr. Member
*
Offline Offline

Activity: 32


View Profile
December 19, 2010, 07:06:52 PM
 #8

One AMD radeon 5970 (570 Mhash/s) = ~ 50 * xc3s500E (11 Mhash/s). But with FPGAs the Mhash/W should be better as with GPUs.

I'm not sure what Mhash/W is.  But, GPUs are ASIC so they begin with a significant advantage over FPGAs.

Mhash/watt. FPGAs should be has a better power efficients than GPUs. ASIC (Application-specific integrated circuit) for mining only (like Deep Crack for DES) would be the greatest variant, but this is very expensive in development (maybe 300,000 USD?).
GeorgeH
Member
**
Offline Offline

Activity: 83


View Profile
December 19, 2010, 08:21:03 PM
 #9

Under my rough calculations, the highest end Virtex 5 could hit 40-50 mhps. At $3000+ for a PCIE dev board, it is far more cost effective to buy ATI video cards.

Edit:

Of course, if one were to connect a bunch of these things in parallel, they could make a big dent, ie:
http://www.sciengines.com/copacobana/

1DSpPtPTGXTYjkZehPsiAbjkXLkB1jsZ2x
mimarob
Member
**
Offline Offline

Activity: 98


View Profile
December 20, 2010, 05:23:58 AM
 #10

hello again!

Just to clarify, I did run the program under simulation only, but I also compiled the module into the Xilinx synthesis tool (ISE) just to see how much space it would take in the chip. (I don't even own a spartan fpga :-)

A full implementation.. well I'm just trying to understand the criteria for a found block, not being an expert in cryptography. This will also need to be in hardware, I think, so the fpga only reports back when it has found something.

I just checked in at the calculator (http://www.alloscomp.com/bitcoin/calculator.php).
What is the correlation between the "difficulty factor" and the "hash target"? Why do we use two concepts?

I also checked in to the bitcoin code, but it seems that the routine I'm trying to accelerate (ScanHash_CryptoPP) is only checking for a certain number of zeroes and then returning.

Where is the code that checks if you've found a block? I guess it would only be a simple less-than compare in the hardware.

The code would also need to contain some uart comms or similar, I thought of broadcasting the request to all devices and then daisy-chaining the results back so that the "winning" device could break the chain and report back to the host computer.


bitcoin address: 15swBLKathoPyX94HgptYXSSqf7SUGhG4z
jib
Member
**
Offline Offline

Activity: 84


View Profile
December 20, 2010, 05:41:40 AM
 #11

Difficulty = (2^224)/target. They're just two representations of the same thing. To check if you've found a block, you check if the hash is less than the target.

Looking forward to quantum computing so we can have qubitcoins.
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1470


View Profile
December 20, 2010, 06:07:17 AM
 #12

I also checked in to the bitcoin code, but it seems that the routine I'm trying to accelerate (ScanHash_CryptoPP) is only checking for a certain number of zeroes and then returning.

Correct.  The scanner performs a fast-path check, and then a more exhaustive check if the fast-path check exits the scanner loop.


Quote
Where is the code that checks if you've found a block? I guess it would only be a simple less-than compare in the hardware.

See CheckWork().  It is a less-than compare, on an unsigned 256-bit little endian integer.

Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
romkyns
Newbie
*
Offline Offline

Activity: 19


View Profile
December 20, 2010, 05:00:24 PM
 #13

http://www.dinigroup.com/product/data/DNDPB_S327/images/board_front6.jpg

Drool...

By my own estimates, this thing could generate a block every few hours at the current difficulty. I doubt it would cost less than $25k-$50k though...

(source: http://www.dinigroup.com/new/products.html)
mimarob
Member
**
Offline Offline

Activity: 98


View Profile
December 21, 2010, 02:33:44 PM
 #14

Yeah that seems about right, that altera board contains 12 times as many 4 input lut's as an xc3s500 spartan module in the GOP module. 12 x 27 = 324 times the 11 MHash in my calcs => 3564000 khash/sec input in the calculator gives you 4 hours for a block. Counting at 2000 blocks per year you get 100000 BTC or $25k a year assuming moderate difficulty increase.

So I guess the graphics cards beat the crap out of the fpga's. But what about power consumption? Also the graphics cards need a motherboard, host cpu etc.

Wonder how far you could optimize the gate count?

Putting a few hundreds of these DIP formfactor boards together would also give you a priceless 80's feeling :-)

http://shop.trenz-electronic.de/catalog/product_info.php?products_id=81

bitcoin address: 15swBLKathoPyX94HgptYXSSqf7SUGhG4z
bitcoin2
Jr. Member
*
Offline Offline

Activity: 32


View Profile
December 21, 2010, 06:49:11 PM
 #15

ArtForz has developed sha256 ASICs and let them (100 pieces) manufacturing for about $500/engine. This ASICs beats 5970 on hash/W by a factor of 6 but loses to 5970 on hash/$ by about a factor of 3, he said. These ASICs are not exactly a real standard cell ASIC but "metal-layer defined ASIC, basically FPGA without the FP part" (source: #bitcoin-dev).
MoonShadow
Legendary
*
Offline Offline

Activity: 1666



View Profile
December 22, 2010, 05:45:16 PM
 #16

ArtForz has developed sha256 ASICs and let them (100 pieces) manufacturing for about $500/engine. This ASICs beats 5970 on hash/W by a factor of 6 but loses to 5970 on hash/$ by about a factor of 3, he said. These ASICs are not exactly a real standard cell ASIC but "metal-layer defined ASIC, basically FPGA without the FP part" (source: #bitcoin-dev).

What kind of ASIC is it?  Is this a custom PCI card?  Would higher production volumes improve the price point?  I'm interested in this, as a purpose made PCI card would be as big a boon as buying an expensive GPU.

"The powers of financial capitalism had another far-reaching aim, nothing less than to create a world system of financial control in private hands able to dominate the political system of each country and the economy of the world as a whole. This system was to be controlled in a feudalist fashion by the central banks of the world acting in concert, by secret agreements arrived at in frequent meetings and conferences. The apex of the systems was to be the Bank for International Settlements in Basel, Switzerland, a private bank owned and controlled by the world's central banks which were themselves private corporations. Each central bank...sought to dominate its government by its ability to control Treasury loans, to manipulate foreign exchanges, to influence the level of economic activity in the country, and to influence cooperative politicians by subsequent economic rewards in the business world."

- Carroll Quigley, CFR member, mentor to Bill Clinton, from 'Tragedy And Hope'
bitcoin2
Jr. Member
*
Offline Offline

Activity: 32


View Profile
December 22, 2010, 07:27:09 PM
 #17

ArtForz has developed sha256 ASICs and let them (100 pieces) manufacturing for about $500/engine. This ASICs beats 5970 on hash/W by a factor of 6 but loses to 5970 on hash/$ by about a factor of 3, he said. These ASICs are not exactly a real standard cell ASIC but "metal-layer defined ASIC, basically FPGA without the FP part" (source: #bitcoin-dev).

What kind of ASIC is it?  Is this a custom PCI card?  Would higher production volumes improve the price point?  I'm interested in this, as a purpose made PCI card would be as big a boon as buying an expensive GPU.

ArtForz expect the arrive in february:
https://stuff.caurea.org/irssi/freenode/%23bitcoin-dev/2010/12/%23bitcoin-dev-2010-12-20.log : 18:36

Maybe the first step to develop a ASIC is this vhdl code. I don't believe that ArtForz will give us his code. If we put money together, maybe we could have enough money to let manufacturing a real ASIC.
Cdecker
Hero Member
*****
Offline Offline

Activity: 487



View Profile WWW
December 22, 2010, 08:28:00 PM
 #18

Just for reference again the logs for that moment: http://veritas.maximilianeum.ch/bitcoin/irc/logs/2010/12/20#l2461

Want to see what developers are chatting about? http://bitcoinstats.com/irc/bitcoin-dev/logs/
Bitcoin-OTC Rating
GeorgeH
Member
**
Offline Offline

Activity: 83


View Profile
December 23, 2010, 05:57:55 AM
 #19

Just for reference again the logs for that moment: http://veritas.maximilianeum.ch/bitcoin/irc/logs/2010/12/20#l2461

Thanks, that was a good read.

1DSpPtPTGXTYjkZehPsiAbjkXLkB1jsZ2x
grondilu
Legendary
*
Offline Offline

Activity: 1134


View Profile
December 23, 2010, 06:19:14 AM
 #20


If some people created a bitcoin-dedicated ASIC, I'd be amazed.  It would be a strong indicator about how involved are some people into the bitcoin project.
Pages: [1] 2 3 4 5 6 »  All
  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!