4 ms·
I worked on something like this at a startup, it was very interesting work, but it is hard to convince people that it has value. The biggest issue is that stan
by ohyes 7y ago
I worked on something like this at a startup, it was very interesting work, but it is hard to convince people that it has value.
The biggest issue is that standard processors (i.e. x86_64) continue to get faster and better, and in a straight line, they're already much faster than an FPGA. Secondarily, software written for an FPGA ends up being specific to the FPGA, mostly because the number of LUTs per chip and the routing.
So there's two things going on, one is that you need something very parallel in order to have a compelling argument for implementing it on an FPGA, and secondarily, in a couple of years, the C implementation of the same thing ends up being faster because processors have improved and number of cores has increased, caches have gotten better on your standard processor. So for your code to improve, you have to rework it entirely, possibly to the extent of rethinking the algorithm you've used. (FPGAs advance in the same way, but a new compiler doesn't speed up your code, because you wrote it very close to the metal).
So in reality, the issue isn't that FPGAs have the wrong abstraction, it's that they have practically no abstraction, at least when it comes to having a real compiler that will optimize your code in a meaningful way for the chip that you are using, the way something like GCC would. Even if you are writing verilog or vhdl, you still need to consider the number of LUTs you have, how the placement will work out based on the size of your different modules (and of course, clock timings & pipeline stalls). You get some help with that stuff from the compiler, but when you then upgrade to a bigger chip, there are diminishing returns in the help that it provides. It is really like you are building your own arbitrary CPU. In that regard, it is difficult to find good people.
None of the commercial attempts at high level languages have been successful, largely because they suck. You're stuck writing C code when you'd rather write something that actually considers the advantages that an FPGA has (the extremely parallel processing of bytes). Implementors need to think more in terms of parallel graphs and tree structures that coalesce than they do loops. From that perspective, you need actual language primitives that actually match with the advantages of the platform (which verilog and vhdl do, but in a low-level, ham-fisted way). So it's an incredibly tough problem to tackle.
- shaklee3 7y agoThis is completely incorrect. There are many serial applications that run significantly faster in an fpga even at one-fifth of the clock of a CPU. The reason being that you can dedicate all of the resources to performing that one task instead of sharing it and using instructions that are not optimized for it. There is a reason signal processing is still predominantly done in asics, fpgas, and DSPs.
- ohyes 7y agoI think you misunderstood. I said very little about the relative performance. I know quite well that the FPGA can be faster. The point is you have to work 10-50x as hard to get there, if you want to do anything interesting. Arbitrary FPGA application code is not a thing. Practically speaking, by the time in your development cycle that you’ve built your custom hardware and software, got it through emissions and are ready to sell it commercially, there’s a new intel chip that is competitive with what you’re doing, using C code. (It’s an FPGA so you have to deliver custom hardware with it). FPGAs have advanced as well in this time, but you’re not using that, you’re using a 2-4 year old one. We were picking apart tcp packets and processing the data inside of them. What we built worked, and it was faster than a CPU, but we had a lot of clever non-standard custom compilers to do it. It was really fun, challenging and interesting work, but really hard to justify in a practical sense. Things like signal processing are a good application mostly because they’re well understood and the code follows the same basic pattern. Novel applications are much more difficult.
- ryacko 7y agoThere is no abstraction for anything unless you distribute it? What is the abstraction for AV1 decoding on CPUs that don't support it? Implementing it in a software library? The only problem with FPGAs is that they have even more interesting side channel problems, but FPGAs will be more space efficient than half a dozen ASIC implementations on a chip, or even a dozen cores to replace the implementations.