Live data from Hacker News

How FPGAs work, and why you'll buy one (2013)

yosefk.com

11–20 of 110 posts

Re: How FPGAs work, and why you'll buy one (2013)

#12

I think one issue here is that to achieve the great gains in performance FPGAs can provide you do need to treat it like a proper HW design. C to RTL exists but to get the best out of it you're basically using C as a syntactic sugar for verilog/VHDL. So the overhead for programmability is higher than a DSP/GPU if you want to gain over and above them. I do wonder if there's a sweet spot in here somewhere that's basical…

As a C programmer, I don't think C is suitable for such a fundamentally parallel architecture as an FPGA. I would prefer a higher level language, maybe declarative, where it is up to the compiler to lay out the parallel operations. Unfortunately the engineering culture gap from HDL to a high level language is much wider than to C.

Re: How FPGAs work, and why you'll buy one (2013)

#13
I am currently just another college student, but I have some experience in this field, as I had interned at Xilinx (which is the largest FPGA maker right now, iirc, although Altera may have taken the crown).

I don't think your typical college CS student, and by extension, the average programmer, would be interested in using FPGAs right now. This isn't an issue of performance, or costs, or lack of use cases- FPGAs are quite fast now and certainly can be extended to new niches that currently are CPU-bound. The issue isn't related to any of the advantages stated in this article, it's that the FPGA toolchain is still mired in the 1970s, a world dominated by the EE ecosystem that modern CS sprouted from.

Building things for a FPGA simply- for a lack of a better word- sucks. There is a lack of beginner tutorials, a free (non-proprietary) implementation tools. Severely lacking free example code and libraries. Few ways to share code, like Github. Much weaker community help.

Richard Stallman may be overzealous, but his impact on programming is striking if you compare it to what could have been, in the world of electrical engineers. Working on FPGAs now is crippling, when you are used to coding in the 21st century. Imaging a world where programming is without the GCC compiler, with little libraries to build on, without Github, without Stackoverflow. And THAT is the reason why FPGA adaption is low.

There are currently over 400,000 questions on Stackoverflow tagged "python", and over 40,000 questions tagged "mongodb". [1][2] In contrast, there is less than 2000 questions for the Verilog language, and less than 500 for Xilinx, even less for Altera.[3][4]

I have helped organize several hackathons at my University, where the largest one consisted of over 2000 people from across the USA. Random hacks that innovate are encouraged. There are plenty of other obscure platforms that are used, and yet very few people use FPGAs. This is indicative of the difficulty for typical programmers to dive into FPGAs, and it will be a hard problem to solve.

[1] http://stackoverflow.com/questions/tagged/python

[2] http://stackoverflow.com/questions/tagged/mongodb

[3] http://stackoverflow.com/questions/tagged/verilog

[4] http://stackoverflow.com/questions/tagged/xilinx

Re: How FPGAs work, and why you'll buy one (2013)

#14
post #7

The trouble I had with FPGAs is how radically different languages like Verilog and VHDL are when compared to languages like Java, Python, or C++. Writing code that is concurrent by default is a massive paradigm shift when all I had been exposed to at that point were procedural languages.

I think it is very important to understand that writing Verilog or VHDL isn't like writing code in a programming language. Programming languages provide instructions to a fixed state machine. With hardware description languages (HDL) you are describing the function of hardware. There are no instructions. It is hard to make good designs without understanding the underlying building blocks of hardware designs.

Re: How FPGAs work, and why you'll buy one (2013)

#15
post #7

The trouble I had with FPGAs is how radically different languages like Verilog and VHDL are when compared to languages like Java, Python, or C++. Writing code that is concurrent by default is a massive paradigm shift when all I had been exposed to at that point were procedural languages.

That's because hardware description languages are not programming languages. This point was constantly emphasized in my digital systems courses. You do not describe a sequence of instructions using an HDL, you describe the layout of a circuit with registers, wires, and logic blocks. You have to consider the physics of the device to avoid violating timing constraints or driving a signal from two different sources, etc.

Re: How FPGAs work, and why you'll buy one (2013)

#16
Our experience with GPU cloud computing at Graphistry should be pretty representative. We spend a lot of effort getting subsecond interactivity in funny C dialects (OpenCL/CUDA). To get those down further, we can put together a few GPUs and reuse most of the code. Eventually, however, data communication costs get too high, so FPGAs would be the next step. That is certainly doable: OpenCL -> FPGA compilers are a thing!

So the question is who has already been going down that pathway, and I'll leave that as an exercise to the reader :) My guess: that'll stay in private hands for awhile, and after a few years, as FPGAs get put into public clouds and everyone goes down the same pathway, a lot of people will be using FPGAs, even if indirectly.

Re: How FPGAs work, and why you'll buy one (2013)

#17
Suppose I wanted to get started with FPGAs for purpose of computation (no interest in control or actuation of sensors/devices). What would be the best starting board for less than $300?

I'm not a student, but I can probably find one if your suggestion is a student dev board.

Re: How FPGAs work, and why you'll buy one (2013)

#18
I think a lot of people posting here don't realize that programming an FPGA means programming how the gates are set up on the FPGA, not software programming.

VHDL/Verilog etc are descriptive languages, not software languages ala C/Python/Java/etc. You should have enough hardware design knowledge (at RT level) to be able to sketch your HW design in a piece of paper, and then, you are apt for writting VHDL/Verilog and putting it into the FPGA.

Re: How FPGAs work, and why you'll buy one (2013)

#19
post #17

Suppose I wanted to get started with FPGAs for purpose of computation (no interest in control or actuation of sensors/devices). What would be the best starting board for less than $300? I'm not a student, but I can probably find one if your suggestion is a student dev board.

I've recently purchased the parallela board:

http://www.parallella.org/

It's got USB/ethernet/arm cpu , and has been incorporated into numerous other projects. It's ~$100.00 USD.

Re: How FPGAs work, and why you'll buy one (2013)

#20
post #17

Suppose I wanted to get started with FPGAs for purpose of computation (no interest in control or actuation of sensors/devices). What would be the best starting board for less than $300? I'm not a student, but I can probably find one if your suggestion is a student dev board.

Probably the Zedboard.
Post reply on HN