Why FPGA will rule Cryptomining in 2018

The cryptomining market has been crazy this last year. As we talked about before, we came in last year wanting to get involved in mining. I read the articles and gathered the trade tested advice, which said buy an asic. It has more hashing power for the lowest possible power, less power makes more money. It all made sense, so I purchased an ASIC.

After purchasing it, it did really well. They are still very good machines, but I soon realized that if the market goes down much or if other people buy a ton of ASICS on the algorithm (algo) that your profitability will decrease as the difficulty increases. So what other options do you have?

The traditional line of thinking is to go to GPUs if you don’t do ASIC’s and that is a solid plan. GPU’s are very flexible due to their ability to dynamically change to any algo/coin depending on price, difficulty, and GPU’s hashing power in just a few seconds. Check out our GPU article for more info. But it isn’t just GPU or ASIC, recent history has ignored a key player… the FPGA.

Why mine with an FPGA 2018

So what is an FPGA?

FPGA stands for Field Programmable Gate Array, and it is a device that has a series of gate arrays (obviously) that create truth tables to calculate inputs from a data stream, and output a desired result. In industry you can use this to optimize an industry process, such as cutting 2x4s from a log, provide machine learning or even to perform DNA sequencing. FPGA’s excel at any task that can be done in a parallel process, such as a mining hash to create an output resulting in a successful hash, and if you’re lucky a successful block.

Logic Gates

For more information on FPGA’s specifically check out Intel’s book “FPGA’s for dummies”.

While GPU’s are significantly more powerful than CPU’s, both by power and hashing/watt, because of the FGPA’s inherent parallelism, they can be about 15 times more efficient at making hashes and about 50-100x more efficient by hash/watt output. Check out some research by Tomas, Howes and Luk on the subject. It is a few years old, but still holds true. I have grabbed a snippet from the research, it is a great read.

FPGA vs GPU computationFPGA vs GPU computation

I apologize that my data referenced is generated from random number generators (RNG), but as I couldn’t find any relevant data on benchtesting GPU vs FPGA in real life for mining, I had to go to the next best thing and creating RNG’s are actually pretty similar to hashing as we are doing brute force hashing similar to using hashcat. Numbers will be different but the scale & magnitude should be similar.

SO what does this all mean? Well you know me, lets do the calculations!

Let’s say you are mining Litecoin (Scrypt) as of today on 1/23/2018:

CPU (Intel i7 2600k)GPU (1080 TI)FPGA (Hearsay, Xilinx Spartan 6 CM1)ASIC (Antminer L3+
MH/s .00075 0.895 14550
Power (W) 350 245 35 800
Difficulty 3,714,485 3,714,485 3,714,485 3,714,485
Price 184.76 184.76 184.76$184.76
$/Day Profit (Revenue – electricity -$0.22 -$0.57 $0.27 $355.15
Profit/Watt -$0.0006 -$0.00232 $0.0077$0.444
H/Watt.0023.65400687.5

So you can see that ASIC is the winner here, but this old FPGA is still rocking 400h/w! Lets look at ASIC-resistant coins or coins that haven’t been ASIC’d yet. Let’s take Blake as an example.

CPU (Intel i7 2600k)GPU (1080 TI)FPGA (Hearsay, Xilinx Spartan 6 CM1)ASIC (Antminer L3+
MH/s11 7300 1600N/A
Power (W) 350 250 35 N/A
Difficulty17,816.7317,816.7317,816.7317,816.73
Price $0.076$0.076$0.076$0.076
$/Day Profit (Revenue – electricity -$0.84 $1.52 $.038N/A
Profit/Watt -$0.0024 $0.006 $0.001N/A
Hash/Watt31.4329,20045,714

So this example doesn’t seem to show the power of FPGA  by dollar due to the lower hash rate, but look at that hash/watt ratio, it still beats out the GTX 1080Ti, but on a hash/s value there is no comparrison, the 1080 Ti is the winner. This is due to the massive black hole in FPGA mining. This device I am quoting is a 6 year old device, equivalent to that I7 2600k. There isn’t any hard numbers here to evaluate the true potential, and anything else is just me guessing. So let’s do some educated guessing based on the massive FPGA hardware we have at our disposal now.

So I just used some hash/s and hash/watt figures from 2012 when this FPGA was made to build a quick equivalence table based off power and RAM

Using Bitcoin hashing stats from 2012

CPU (Intel i7 2600k)GPU (AMD Radeon 6990 Pro 4GB)FPGA ( Xilinx Spartan 6 CM1)ASIC (KNC Miner Jupiter)
H/s49840,000 1,600,000400,000,000
Power (W) 350 375 351,000
Hash/Watt0.142,24045,714 400,000

This table was generated by taking the best of every class (except the FPGA as it is the only solid data I have, since I have this one) and we find a 20x increase from GPU to FPGA on a hash/watt value. What is amazing is that we have a 20x increase with only 512MB of RAM total (128M/per fpga) With a highend FPGA that rides on a PCIe bus I have seen semi-verified claims of 50-100x!

If we projected a moderately highend FPGA such as the 520N – with Intel Stratix 5 FPGA, which has 8GB per FPGA a total of 16GB with access to the host computers RAM. With these same spec ratios we can expect about 73x better than the 1080Ti for the same power requirement!

So if the FPGA is so great, then where are they?

FPGA has one Achilles heel when it comes to the programming of it.  FPGA runs on a language called HDL (Hardware Descriptive Language) which requires you to program the devices physical hardware such as the gate arrays and static IP manually! Luckily we have developed a semi automatic language(s) VHDL, which is a visual way of programming it and you literally draw out a circuit and it literally burns in an image of the circuit your drew. There are not subroutines that run to solve problems and it emulates the technology it actually IS the technology that is used to solve problems. Verilog came by and allowed programmers to program in higher level code, but is still very hardware language based, this has helped streamline FPGA’s and make them easier to program, but things are even better now, because of OpenCL.

OpenCL (Open Computer Language) is a cross platform high level programming language derived from C. This platform runs the subroutines in your CPU and your GPU and yes even CCminer/Cgminer. This cross platform technology explains how to use the hardware it has based on a separate configuration file, while the base code stays the same. You do need to optimize it, but that is easier than writing all new code.

OK, big deal. It is a huge deal. It means that a programmer who knows C can program the FPGA without a ton of knowledge of Verilog/VHDL or HDL, lowering programming time and allowing more moding faster.

The only issue you are going to run into is that the GPU is more fluid, it can change algo’s at will and quickly, while the FPGA even with OpenCL will need to be optimized and flashed to run each possible algorithm. This is a ton of work, but the gains could be quite great. At this time there is not the capability for dynamic switching. Time will tell when this capability will come though.

I am embarking on an adventure to program these new OpenCL controllers and get them optimized. It isn’t going to be easy, but we’ll see if my projections are anywhere in the ballpark. Wish me luck.

I hope that you found this article and the companion video informational and entertaining and it has helped you to get one step closer to living free each and every day.

If you have any questions, please don’t hesitate to ask.

UPDATE: Many have asked which boards are good ones to use, I have experience with Xilinx and Altera (Intel) and I prefer the Altera boards for the beginner as the documentation is so much better, if you are planning on buying a board, feel free to use our affiliate link to buy the DE10-Nano with SOC below, the affiliate link will help us with development and the cost is not any more than normal. This would be a big help if you are already interested in buying a FPGA board. Thanks!!

UPDATE 2: Months ago we have successfully created a working bitcoin miner and have been working on an altcoin miner. I have been blown away with the awesome and positive response from the post! Sorry I haven’t been able to post much recently as we have been “in the lab” so to speak building. If you guys are interested in getting the latest information as it comes available, please click “Join” button by our newsletter opt-in. We have some exciting developments to come and look forward to helping you live free each and everyday! Thank you for your awesome support!

UPDATE 3: We have a new alpha release of our first bitstream for the TUL KU-115 for keccak and keccakc! Check out our latest video and article on how it works and performs. Comment in the article to get setup as a beta tester! Check it out here –> DIY FPGA miner | Alpha release of Keccak FPGA miner

For the past 20 years I have been advocating and teaching about Renewable Energy and Alternative fuels. I worked in IT for 9 years and ran a few IT businesses during that time. I have worked wind turbines and in fuel cell technology and I currently teach college courses full time in Renewable’s and Alternative fuels. I am passionate about technology, building things, family and having fun outdoors. I love sharing and helping to make the world a better place in my own way.

93
Leave a Reply

avatar
33 Comment threads
60 Thread replies
8 Followers
 
Most reacted comment
Hottest comment thread
41 Comment authors
Abe FouhyJanilton MotacreorleiTimAfra Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Daniel
Guest

Hi,
Very interesting point of view.
I have been playing with FPGAs and HDLs some time ago.
In master thesis I studied a so called system-level-design language, SpecC:
https://en.wikipedia.org/wiki/SpecC
(check also the references)

Old now. I don´t know how these things evolved but this line of thinking may be interesting to you as using a high level language which maps to FPGA would make you prototype fast.

Hope it helps.
BR
Daniel

Richard Lo
Guest
Richard Lo

Hi Abe,
I am from Taiwan and works for a company which is developing some fpga boards.
I am interested in what you are doing.
Can I contact with you by email?

regards
Richard Lo

Andrea Barca
Guest
Andrea Barca

Hi Abe,
very interesting. I like to collaborate. I am an electronic engineer and I did study FPGA and VHDL… has been 20 years ago but I would love to contribute. Can you please email me and let me know which hardware are you using, so I can buy the same and we can actually try to make it work.
Thanks Andy

Tex Dean
Guest
Tex Dean

Noob computer geek getting into mining, about to attempt to set up approx 16 FPGA cards for mining. Your videos are very helpful. Side question can these card be run off solar panels and car battery?

Andrew A.
Guest
Andrew A.

Love your work and well made article. I am geeking out on new ways to mine more efficiently especially in today’s market. I am a senior programmer at my day job so my understanding of C is pretty good. Would love to keep up with what you find and start developing on a development board. If you could email me recommendations to get started on a board that would be great. Staying tuned and subscribed

Rochester
Guest
Rochester

Hi Abe,
if i want to start my trial of FPGA mining, where i should start with? any open source i can refer to?

Afra
Guest
Afra

Try to read this https://fpga.guide . It helps a lot, for a starter.
I also found this tutorial very useful https://fpga.guide/4a-Howto-AWS/

CryptoFPGA
Guest
CryptoFPGA

Abe, I have started a similar project. We might be able to collaborate. Please e-mail me. I cannot find your email on your profile.
Thank you.

Ernst
Guest
Ernst

If it is profitable the sky is the limit as the say. To know if mining with FPGAs is profitable we would need some way of calculating/estimate their profitability. We need to know “Hashing Power” vs power consumption and cost of hardware I guess. Any idea how this could be done?

Ernst
Guest
Ernst

Just a comment to elaborate on my previous question. Above you do some calculations but it is not clear how you got to the h/s 1,600,000 for the Xilinx Spartan 6 CM1 and no idea about the hardware costs involved. I would like to recalculate it for the Spartan-7 to see if if makes sense. I know maybe mining bitcoin or Litecoin is not your recommendation because of the network difficulty. Maybe you can give us a tip here too. If I calculated it correctly for the Spartan 6 (not including the hardware costs). Mining Litecoin would mean loosing money.… Read more »

mike s
Guest
mike s

Hi Abe
Im very interested and subscribed to this. Just wanted to know if you have made any new progress or have any comparison results. I think you are definitely on the right track and keep up the great work

mike s
Guest
mike s

Im interested in attempting to build one of these. Its very interesting. Is there a way I could email you . Im interested in the hardware that is available . Thanks

Victor
Guest
Victor

Noob and probably a really basic question, but i have seen some fpgas that runs OPENCL directly. are they not profitable? altera and i guess some others.

Michele Sburlino
Guest
Michele Sburlino

Hi Abe!

Very good article!

I’ve just found this interesting thread about Fpga and altcoins.

https://bitcointalk.org/index.php?topic=3073933.0

The thread’s author said that this Fpga custom miner can work with 2/3 hashrate of a mid-class GPU (like RX470), with only 1/10 of power consumption.

Maybe you can have a look,

Michele

Scott
Guest
Scott

Hi Abe,

Great article. I’m very interested in learning more and contributing to this project. I’m a software architect and developer in prior life. Would you please reach out to me so I can learn more about this?

Thanks!
Scott

Simon Luger
Guest

Looks like such devices are coming very soon…
https://photos.app.goo.gl/PcsE3LJm7xRMCesi7

Presented today in austria

Artem
Guest

Hi! Could you give me the link? Very interesting.

Artem
Guest

Please, give me the link.

Jason
Guest
Jason

Same cards as in this rig..
https://drive.google.com/file/d/1Oh8VV0CDi-R6ls4Up9n7uJk5_gVp5OK2/view
https://bitcointalk.org/index.php?topic=3459858

The FPGA card is called the Xilinx Virtex UltraScale+ FPGA VCU1525 Acceleration Development Kit and costs over $4000. Yikes!

Xilinx VCU1525 FPGA
https://www.xilinx.com/products/boards-and-kits/vcu1525-a.html

Etherion
Guest
James Klemm
Guest

Hi Abe ….
This is very intresting. I am mining with gpus atm and would like ti go on whith this fpga mining. What i have found is Papilio Pro(Xilinx Spartan 6 Lx Fpga) and
Haz clic para obtener una vista ampliada
Waveshare XC3S500E XILINX Spartan-3E XILINX FPGA Development Board + 8 Accessory Modules Kits
are there any sites where i can get information how to build a miner with those fpga s ?
price of these Boards is interesting…. i live on canary islands and its quite hard to get the things over here….
maybe zou can help me?

Cole
Guest

Hey Abe, so my question which I can’t find an answer for happens to be about compatibility of code.

Does code have to be chip specific or is it like a miner for a gpu where just the hashrate changes depending on what fpga you have?

I am about to take a leap on a cheap fpga and try to push some code I found on GitHub and hope it works.

Thanks for help!

Aleks
Guest
Aleks

Hello Aby iam very interested in what you are doing.

Iam (we are) a company from austria.
Would it be possible for you to contact me via mail to have a little talk?

Hope to hear from you soon.

Thank you!

Regards,
Aleks

Jason
Guest
Jason

I was wondering if Intel’s MAX 10 FPGA with 1G DDR3 would work? I found a dev kit board for $200.

DK-DEV-10M50-A
https://www.digikey.com/product-detail/en/intel-fpgas-altera/DK-DEV-10M50-A/544-3082-ND/5056804

Jason
Guest
Jason

It may be 2G DDR3

Kanishak
Guest
Kanishak

Hello Abe, I am Kanishak. I am also working on mining technology and using FPGA board for mining bitcoin. I am also using OpenCL as the platform to program FPGA. I really appreciate your article about crypto mining and I would love to be in contact with you regarding this topic.

Vinod
Guest
Vinod

Hi my Friend
you use openCl platform for FPGA . but are you usin XIlING VU125 card on that for ETH mining..

Victor de la Riva
Guest
Victor de la Riva

Great info. I’ll definitely be bookmarking your site to get updates. Specially on this project.

Michael Harrall
Guest
Michael Harrall

Pardon my my lack of understanding, but it does not look like you have actually mined on DE10-Nano with SOC at-least per writing of this article. If you have since what miner did you use and coin did you mine. also would you mind making the code available. So we could learn what needs to be done to make one of these things mine. I can make x86 do just about wnat ever i want, FPGA has been a long time and a few beers ago.

Christopher W. Schroeder
Guest
Christopher W. Schroeder

Hello Abe,

I am interesting in getting into FPGA mining. Could you send me an email, so I can start to ask you some questions regarding this endeavor?

David Mikesell
Guest
David Mikesell

Have you written any bitstream for the DE10-Nano with SOC board you pictured above?
I am hoping you have. I am interested in learning about and making my own fpga miner. I was thinking of buying that board and testing it with your code and then looking at your code to see how the gate array is creating the structure for the algo. Please contact me if you require payment for the bitstream.

creorlei
Guest
creorlei

ola, como posso seguir seu trabalho,

Cod3monk3y
Guest
Cod3monk3y

Great topic I have been looking into fpga miners alot lately and look forward to seeing how it works out. Just bought my first xilinux Dev board and going to try making my own

Paul Badenhorst (South Africa)
Guest

Hi, with reference to UPDATE 2:, what is the performance you see on the DE10-Nano Kit , would it be worthwhile? And will you be selling the Btistream? or making it available for download?

Zowie Jacobs
Guest
Zowie Jacobs

How do start writing bitstreams? what do i need?

creorlei
Guest
creorlei

Congratulations on the article, have some source code for demo.?

jay
Guest
jay

So what kind of hashing can that board you are recommending can do?

Greg
Guest
Greg
Alex
Guest
Alex

Hi This FPGA topic is very interesting. Thank you all! I am planning to buy one or two FPGA boards and would like to test them a little bit. Before I do that, I would like to ask for help. A) In the article it is written, “Well you know me, let’s do the calculations!” Is it possible to calculate hashrate of FPGA? If yes, how? Are there any equations? Could they be found on the internet? If no, is it possible to estimate it? B) Parallel computing is needed for mining, therefore FPGAs for parallel computing needs to be… Read more »

Janilton Mota
Guest
Janilton Mota

Ola, Abe. Eu estou interresado em estudar FPGA para mineração de algos tipo CN, ETH ou BTC. Que placa de custo mais barata é possivel ter para começar? Quero comecar uma placa barata e depois passar para uma mais cara. Onde posso encontrar algo de estudo? Eu posso usar uma Placa De Desenvolvimento Fpga Altera Ciclone 4 Iv Ep4ce6 para isso?