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.

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  14 550
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 .002 3.65 400 687.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/s 11  7300  1600 N/A
Power (W)  350  250  35  N/A
Difficulty 17,816.73 17,816.73 17,816.73 17,816.73
Price  $0.076 $0.076 $0.076 $0.076
$/Day Profit (Revenue – electricity  -$0.84  $1.52  $.038 N/A
Profit/Watt  -$0.0024  $0.006  $0.001 N/A
Hash/Watt 31.43 29,200 45,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/s 49 840,000  1,600,000 400,000,000
Power (W)  350  375  35 1,000
Hash/Watt 0.14 2,240 45,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.

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.

Share this idea:

Leave a Reply

Be the First to Comment!

avatar
  Subscribe  
Notify of