Learn FPGAs With a $25 Board and Open Source Tools
An anonymous reader writes: Hackaday has a 3 part tutorial with videos of using open source tools with a cheap ($25) FPGA board. The board isn't very powerful, but this could be the 'gateway drug' to FPGAs for people who don't want to spend hundreds of dollars and install 100s of megabytes of software and license keys just to get their feet wet. The videos are particularly good--like watching them over their shoulder. As far as I know, this is the only totally open source FPGA toolchain out there.
... the more they stay the same.
During my time in college nearly a decade ago, I experimented a lot with libre toolchains like iVerilog and the like, which were very useful for putting together high quality code that could be dumped into some poorly designed Xilinx toolchain (with a few workarounds for the bugs in Xilinx's junk software).
I cannot believe that nearly a decade later, this cheap FPGA is as far as we've come.
It's been a lost decade; everything—including smartphones, tablets, increasingly laptops and desktops, FPGAs, etc.—has been completely locked down and walled off from the innovative play of passionate hackers. What a waste of time.
Yeah, because "Field Programmable Gate Array" makes it perfectly clear for those never heard of an FPGA...
I won't argue that's a good idea if you don't know some HDL or how to use the tools, or even have a good idea for a project. But there are a few reasons to actually use a real FPGA, and particularly a real toolchain:
- Not all HDL code synthesizes. Great designs get ruined when they meet an actual synthesizer that doesn't understand the construct you are using. This can be heartbreaking sometimes.
- You may want to use tri-state logic internally in your design. Never do this. Even when using tri-state buffer features, use a wrapper module. Xilinx, Altera and various design libraries often do this differently because of the large variety of buffers, most of which aren't interesting to you for the blinky light. Just save yourself some trouble here.
- Complex buffers (DDR, serdes) have a lot of detail that everyone implements a bit differently. You want real hardware to make sure these work properly, and you may need to implement extra circuits to handle the implementation detail. Or, and this is fun, sometimes the vendor has limitations that will break your heart (particularly on low end FPGAs)
- Not all code that simulates well actually runs well. The list of gotchas is near infinite, but ignoring buffer complexity the best ones are reset conditions (xilinx has no POR, it all initializes to 0 unless otherwise specified, and that is fine if you implement a clean reset ckt), setup/hold violations from external interfaces, and everybodies favorite: bus doesn't quite work the way you think it should and the way you coded the BFM.
- You can do squirrely things that you shouldn't really do at all, like double edge triggered flipflops, or latches. Technically this goes in "doesn't synthesize", but sometimes it will and will do funky things that a simulator won't pick up on.
There's value in messing around and $25 is compelling, but don't buy the $600 PCIe kit until you know what you want to do and already have a good design and have done your homework.
I think VHDL is better than Verilog to learn HDLs for two main reasons:
1. VHDL is based on ADA, which is a concurrent systems language that is verbose and relatively easy to read versus Verilog's C-based syntax that is more terse, which leads me to...
2. Verilog, being C-based, can reinforce procedural language thinking rather than concurrent system thinking where inherent timing-independent parallelism is the norm in an HDL (e.g. multiple clock domains, or even *shudder* asynchronous feedback).
That said, VHDL has its own problems, such as its relative lack of use in the workplace like the United States, packages and library dependency being a bit clunky, and lack of efficiency in some situations versus Verilog where equivalent Verilog is just less typing and IMO much easier to read a netlist for a standard-cell design.
For a $25 package, it's really hard to go wrong with this and I hope it will take off. I only wish there were better tools to reinforce the principles of timing and design pipelining, especially a tool for static timing analysis. Then again, I suspect nobody was expecting to get a copy of Synopsys PrimeTime with this package either!
Yea, because open-source software is famous for having well-designed, easy-to-use comprehensive instructions. ;>)
After building a few things with atmel-chip Arduino boards in the last couple years I gave in to my curiosity and bought a couple cheaper CLPD and FPGA boards. On electronics forums there's always people moaning "oh god not another arduino user" and whining how "there's so many other boards that are faster/have more cores/ect ect/why are you still using atmel shit". I ended up choosing Altera-chip boards, for no particular reason. Lower-end Altera or Xlinix boards can be had for $10-$15 from the orient-direct sites. A USB JTAG programmer costs another $5, if one wasn't included. The cost isn't the problem here.
Part of the problem (as I see it) is the complexity of using the programming toolchains, yes. The boards seem to work, but I haven't actually gotten mine to 'do' anything yet.... I have not gone through the available Altera tutorials however.
But another part of it is that most people are hard-pressed to think up anything that would require an FPGA, so there's not a lot of incentive to learn. Myself included.
Most of the projects that most people build with Arduinos probably have the atmel processor sitting there idle most of the time. If an Uno isn't fast enough, the Mega is twice as fast as the Uno. And then the Due (with an ARM chip) is ~5x or more times faster than the Mega, depending on what your program does... And there are other ARM boards that are faster/have more cores than the Arduino Due.... so there are a lot of other easier-to-use options for a 'faster' board, if an Uno or Mega just can't handle the task.
So I think that FPGA's aren't going to advanced into the hobbyist market any time soon. At least. no more than they already are.
The concepts of FPGAs and CLPD's intrigues me, but currently it's a lot of hassle to learn just to gain processor speed that most projects I can imagine simply don't require.