I am interested to obtain people's thoughts on what is stopping them diving into FPGAs. I have my own theories on this subject and will share these as this discussion develops.
I look forward to hearing your views,
Thanks in advance,
Simon
I am interested to obtain people's thoughts on what is stopping them diving into FPGAs. I have my own theories on this subject and will share these as this discussion develops.
I look forward to hearing your views,
Thanks in advance,
Simon
Here’s what I see as the main barriers to getting people to play with FPGAs.
1. “Logic! Why don’t they teach logic in these schools?” asks the Old Professor in The Lion, the Witch, and the Wardrobe. Well, they didn’t teach logic when I was in USA schools. It was something you had to learn on your own. I see no evidence that they’re teaching it now. I don’t know about other countries.
Schools teach algebra, so you’re in better shape for computer programming. But symbolic logic is the basis of FPGA design, so if you have to learn it at the same time that you’re trying to absorb the rest of FPGA design the learning curve is that much steeper.
2. Verilog and VHDL are pretty much the only game in town for designing FPGAs. The problem is that both are languages for describing hardware behavior and rather than the hardware itself. If you’re an accomplished hardware designer, you know what registers and memories you want and what logical and arithmetic functions you want. But to get a synthesizer to generate that hardware you have to write your Verilog or VHDL in just the right way so that the synthesizer recognizes pre-defined patterns for edge-triggered registers, clocked latches, and memories. If you get the pattern wrong, the synthesizer will try to implement what you wrote but it will likely be a mess. It’s usually hard or completely impractical to look at the netlist generated by the synthesizer so good luck untangling it. If you’re a new designer, fuggeddabouddit.
At Design West / ESC 2013, Duane Benson gave a terrific talk called “FPGAs: I know nothing... yet” which covered a number of the challenges a new FPGA designer faces with Verilog. It’s a great talk if you can find it online somewhere. We had a recent discussion here at element14 called Connecting Verilog to Synthesis. The OP had a design that simulated just fine but there were all sorts of problems when he tried to synthesize. They can be very frustrating and discouraging for new users.
Here’s another recent example, this one from Gadget Factory: VHDL newbie: 'if' on a process sensitivity list element. This new designer left some logic unspecified which caused the VHDL synthesizer to change combinational logic to clocked logic, and then gave an obscure error message about the user’s clock (which he didn’t realize he had). VHDL calls every variable a signal and figures out at compile time which are combinational and which are registers, so if you make a mistake you can suddenly have unexpected added or missing registers. In Verilog, you declare a variable as a wire or reg, which usually (but not always) prevents this particular problem.
I think those two discussions do a great job of illustrating the learning curve problem for VHDL and Verilog.
3. FPGA tools have a steep learning curve. If you want to write a C program, you start with “Hello, world” which is two lines of source code. It takes one GNU command to compile it and one to execute it.
If you want a simple blinking light on an FPGA, you’re faced with the very long process of downloading the FPGA tools, getting the license manager to let you run the tools, figuring out how to use the tools, finally getting an FPGA bitstream, and writing it to your development board.
Plus the code itself is a lot more involved. Blinking an LED sounds easy, but remember that your development board probably has a 32MHz or 50 MHz oscillator, so you need a clock divider to get it down to a few Hz. Suddenly you need to learn about sequential logic and always or process statements.
We’re talking orders of magnitude more work than “Hello, world”. OTOH, getting an LED to blink on a Raspberry Pi or BeagleBone is pretty involved too 
Is there a better way? You bet -- take a look at the examples at the end of Flavia: the Free Logic Array.
I love the potential of FPGAs (and CPLDs and other variations on the theme) and have used them in a previous job.
I don't think the available development software is so much an issue. I can recall Quartus (and Max+Plus II) crashing a lot when I used them at university, but my recent experience has been OK. The software is often bulky and the lack of common terminology across different vendors can be confusing.
For me the barriers are cost and power. These days I can pick up a MCU dev board for ~25USD, or a Raspberry Pi for ~35USD. A decent FPGA dev board costs an order of magnitude more.
Also, it's typically not just the cost of the FPGA you need to worry about - you might want external ROM/RAM, regulators, etc.
In its current state, the FPGA ecosystem (including the development tools) is geared for rapid prototyping or research, or very high-end products. The one-off costs aren't appealing for hobbyists, and the volume costs are prohibitive for low-margin products.
Slightly off-topic: The PSoC is a fantastic concept, marrying a MCU with some FPGA-like capabilities. I'd love to use it in a commercial design, but unfortunately it is also hampered by its cost.
tekmeister wrote:
For me the barriers are cost and power. These days I can pick up a MCU dev board for ~25USD, or a Raspberry Pi for ~35USD. A decent FPGA dev board costs an order of magnitude more.
...
Slightly off-topic: The PSoC is a fantastic concept, marrying a MCU with some FPGA-like capabilities. I'd love to use it in a commercial design, but unfortunately it is also hampered by its cost.
While FPGA development boards from FPGA vendors are often multi-hundred dollars, there are plenty of independent boards under US$100, such as the LOGI-Bone and LOGI-Pi.
For lots of cheap FPGA development boards, take a look at Joel Williams’ list.
The cheapest FPGA boards I’d consider include the $38 Papilio One with Xilinx Spartan-3E 250K, the $39 Gameduino (or similar Olimex MOD-VGA) with Spartan-3A 200K, or the $69 Xula2-LX9 with Spartan-6 LX9.
I'm not sure why Spartan-6 LX9 boards cost so much more than 3E 250K or 3A 200K. The FPGA chips now have the same prices.
Regarding PSoC pricing: PSoC 5LP is pretty expensive, but you can get PSoC 4 chips for a couple dollars. OTOH, you won’t get much (if any) programmable logic in those devices.
I had half an inkling someone would reply with some cheap FPGA board proving me wrong :-)
Thanks for the links, the Papilio boards look interesting.
For me it's budget.
Because an FPGA board is often more expensive than other development boards, I had to find some synergy.
I circumvented my conscience by finding additional uses:
- When I added the board (in my case one of the Papilio members) to my shopping cart, I went over the 'free shipping treshold'.
- I'm using my FPGA board as a LogicSniffer compatible logic analyzer. That works particularly well for protocol analysis.
Hello Simon,
Firstly sorry for the VERY slow response, for some reason I only saw your replay now. As for your proposal I think that would be very interesting and informative way to learn. This would be especially helpful if there was an explanation as to why things are done (code explanation) as opposed to just showing steps. If there was an analagy to C or other more main stream programing as the tutorials went along it may be helpful as well.
Kas
Not sure what the budget limit is, but the Zybo board is (in my humble opinion) a very interesting platform:
http://digilentinc.com/Products/Detail.cfm?Prod=ZYBO
Sure it's more expensive than Papilo, but you get three times the logic resources of Papilo Pro, a dual core Cortex A9 with sizable RAM and FLASH and quite a few interesting on-board peripherals - Gig Ethernet, HDMI, switches, buttons, leds, user-friendly expansion ports etc.
johnbeetem wrote:
3. FPGA tools have a steep learning curve. If you want to write a C program, you start with “Hello, world” which is two lines of source code. It takes one GNU command to compile it and one to execute it.
If you want a simple blinking light on an FPGA, you’re faced with the very long process of downloading the FPGA tools, getting the license manager to let you run the tools, figuring out how to use the tools, finally getting an FPGA bitstream, and writing it to your development board.
Plus the code itself is a lot more involved. Blinking an LED sounds easy, but remember that your development board probably has a 32MHz or 50 MHz oscillator, so you need a clock divider to get it down to a few Hz. Suddenly you need to learn about sequential logic and always or process statements.
We’re talking orders of magnitude more work than “Hello, world”. OTOH, getting an LED to blink on a Raspberry Pi or BeagleBone is pretty involved too
Is there a better way? You bet -- take a look at the examples at the end of Flavia: the Free Logic Array.
In my continuing Quixotic quest towards making it easier for people to get started with FPGAs, the new release of Flavia (XXICC rev 0.0n) supports the ValentF(x) LOGI-Pi and LOGI-Bone. Both boards have a Spartan-6 LX9 FPGA.
Thought I might add my own $0.02 to this. I've been interesting in FPGA's for as long as i could remember but never went down the path because it just seemed far to complex to get started in. But I always think of ASIC style operations when i think of FPGA.
However, the complexity comes from where my interesting in FPGA's comes from, i've been a linux guy for as long linux has been, and i do storage/networking as my career. In those two area's (SAN/networking) theres alot of ASIC and the number of times in both of those area's where i've thought "if i understood FPGA's at all, there are so many idea's i've love to attempt/build" (though I cant say i was certain of how far an FPGA could really go). About a year ago a colleague who knew of my interest bought a really cheap one from somewhere and gave it to me as thanks for something. It was basically just an FPGA on a board with two leds, a switch and tonne of pin-outs but it got me interested in actually doing something, it took me the better part of a week to get the software i needed and to a point where i could control the leds with the button which I wont say dissuaded me from my end goals exactly but the sheer complexity of that task was certainly very daunting (and having done a reasonable amount of hobbiest type stuff with arduino and arm based MCU's it felt a little pointless).
However, i made a goal for myself which was fairly ambitious to make a simple 2-port ethernet hub, extend it into a switch and ultimately aim for writing an entire network forwarding plane on an FPGA. I spent a bit of time figuring out the circuit i'd need to connect an rj45 ethernet to an FPGA and then more time again getting my head around the "core" i needed to drive a tripple-speed ethernet port directly off the FPGA (which later dumbed down into a 10baset only port) - the end result wasn't very encouraging, most of the core's were proprietary and licensed and completely indecipherable to me. However, the thing that eventually killed my interest (and i still dont really know) was getting an idea of what limitations/capabilities were on the FPGA i had when it came to that goal or even how i'd go about making a choice of FPGA with a goal in mind. Even googling was a little difficult, there seemed to be a lot of contradictory information out there and i also got the feeling that there wasnt many places a hobbyist focused FPGA enthusiast would be particularly welcome asking some really dumb questions. One example which was really aimed where I wanted to be was NetFPGA, seemed very welcoming to researchers but completely closed to hobbyists (though the cost behind their equipment ruled it out pretty quickly anyways).
What FPGA do you have on your board ?
There are free Ethernet MACs around but the one I use is paid for. (hard to say how much (because of bundling) but about £500 per year.). You can use it for free indefinitely if you don't mind it switching itself off after an hour. (It comes from Lattice and only works on their FPGAs).
Big projects on FPGA are more expensive - the chips are not cheap, a small FPGA will cost about £5, a mid range part about £100 and there is pretty much no top limit. The software is fairly expensive too - at the low end even the free simulators are OK but when you get on to big things then the prices rocket up. The chip vendors don't really sell software, they sell annual licenses - not bad value if it's professional work but way out of hobby range.
Gbit Ethernet requires a high speed pcb which you would need to design and make or buy a ready made eval baord - there are some about and they can be found on promotional offers from Lattice, Xilinx or Altera from time to time - I paid $99 for one.
I think a Gbit ethernet switch is just about doable with free software tools so longs as you can get hold of hardware and the FPGA isn't too big for free tool versions.
As far as getting help on choosing chips and scoping projects you'll need to be thick skinned and ask in forums (fora ?). I've never found any books that are any good at that sort of thing. Although I use Lattice chips I think that Xilinx have the best support material on their website.
There is a lot of help on the web - but it's patchy.
Anyway - I'll be happy to help you get that board doing something if reasonably possible. (But I won't be able to help you with Verilog - only VHDL.)
MK