Let me first admit at the time of writing this the boards have already been ordered, simply for the fact that I didn't want to lose my momentum on this project. All too often I have let perfection be the enemy of good and I am determined to try to break the cycle. For the same reason I intend to write this first project log in a stream-of-consciousness style that may feel rather messy. Nevertheless, writing something is better than nothing. Hopefully it's coherent and I get my points across.
In this log I mainly want to talk about the motivation for this project, and talk about the current state of the FPGA hobbyist world from my perspective.
Motivation
Preface
As I mentioned in the description, this project is meaningful to me on a personal level. Over the past few years I have had the opportunity to interact very closely with my local university and their FPGA design class. I work very closely with the professor at my day job as an FPGA engineer, so every year I get to chat with students, grade final projects, interview prospective interns. Just this past semester, I even got to teach part of the course as an adjunct professor.
I really like FPGAs. I think about them almost constantly. I think they are just about the coolest electronic invention ever and its a joy that I get to work with them everyday. Not only that, I absolutely love teaching other people about FPGAs too. Just imagine: a magical IC that can basically take the form of any digital circuit, even a CPU! Of course, not everyone is interested, or even sees/understands the potential in the devices, which is fine. However, every semester there are a handful of students that "get it." It clicks for them just how powerful these devices can be and they understand why I get so excited about the subject. The problem is that after the class ends, these students are mostly abandoned.
Currently, in class use the Zybo Z7 board, and with one board rented out to a pair of lab partners. After the final project has been completed, the lab partners must then turn in their boards and get on with their well earned winter break. So this model not only encourages an unfair distribution of labor ("I will write the VHDL and you can do the report" often turns into, "I just did the whole lab by myself"), it also completely disqualifies the genuinely curious student from any tinkering or experimentation after the semester has ended. Not to mention using an FPGA in their upcoming senior design projects. It's really a bummer because every semester there is at least a handful of students who:
- inquire about keeping their boards for longer,
- want to buy the FPGA dev board for themselves
- ask for decent alternative FPGA boards
Over the past few years of interacting with these students and the university here are the answer to the inquires above
- The department gives some strong discouragement for doing so. (Must be enrolled, doing research, they are expensive etc.)
- They are about 299 dollars at the time of writing. That's just not happening for a college student.
- There are no decent alternatives. Not really.
It's this last point I want to focus on.
No Decent Alternatives
You might be telling yourself "surely there are plenty of good options out there." You have probably even seen some decent attempts, and honestly, fair play. There have been plenty of decent attempts, but not for not for someone using who wants to use an FPGA on their own workbench or in their dorm room. Let's me highlight a few of my favorites, and address their short comings.
ICEBreaker
Probably one of the most popular entry level FPGA dev boards and targeted specifically for students and workshops. Based on the ICE40 FPGA from Lattice, it's a strong contender, especially with the open source tool chain. At 80 dollars though, that might be worth a week or two of groceries for the frugal college student. Moreover, the form factor is bizarre at best. Points for the 0.1" header but good luck putting that on a breadboard. I'm also happy to see the bountiful PMOD ports but, unless you are already "into" FPGAs, I doubt that most students or hackers have even know what that is, much less have a collection of PMOD compatible boards laying around. Comparing a PMOD to the availability of an Arduino shield, Adafruit Feather Wing, or Raspberry Pi Hat, there is no contest. I have some more thoughts on the tool chain situation, but will save that for its own section
Arty A7 Board
Another very common FPGA board that I see in various enthusiasts posts. First of all, the price. We are talking 300 dollars here. No. Just no. that's a crazy amount of money for an entry level FPGA board unless you are a University performing a bulk buy or a major corporation that has no problem paying for equipment with more zeros on the price tag than what the average hacker is used to seeing. Frankly, with the price, the rest of the capabilities almost aren't worth talking about.
I will award a few minor bonus points though. 1) being that there is an Arduino shield compatible header. So obviously some amount of thought went into what people might want to use this board for. An appeal to the common person. 2) Vivado is definitely one of the most cohesive HDL IDEs out there that doesn't make me want to immediately open vim and write a TCL script (more thoughts on Vivado at the end).
Also worth mentioning is the Arty S7 board which comes in at a slightly less eye watering price. Both the A7 and the S7 make the claim that the they were designed with "versatility and flexibility" in mind. Which is great! But the fact is that they obviously "kept it in mind" rather than "prioritized" it. Neither the S7 or the A7 even have mounting holes!
Tiny FPGA Series
Ah the TinyFPGA! One of the shining starts of the hobbyist FPGA world, but taken from us too soon. Honestly, this line of boards checks nearly all the boxes. In my mind they are the FPGA parallel to the Teensy series of MCU boards, which may have even been the intention. Of course they are based on the ICE40 from Lattice so you have the freely available tool chain. They are breadboard compatible, the first of the devices covered here, and they were reasonably priced. My favorite feature on this series of boards however, is the bootloader.
Actually programming an FPGA board is another aspect of this world that is often glossed over with FTDI converter chips (which add cost and size) and propriety and/or recommended external programmers. Many of these programmers often cost over $100 alone! Luke Valenty got it right - it's an FPGA you can make it do pretty much whatever you want. Why not whip up a "DFU" mode just like every microcontroller out there?
But Alas, it appears the TinyFPGA is mostly abandoned. I will admit that I am not entirely up to date on the subject, but I believe an ECP5 version of the series was planned which would have given a major upgrade to the LUT count of these devices. The roughly 5-8k LUT limitation with negligible math blocks is really my only complaint about the boards that were available for a time.
Tang Nano 20k
Oh we are so close with the Tang Nano 20k. We have nearly all the marks. They have an INCREDIBLE price point at under $50 and you can get them on Amazon. They are breadboard compatible. They have a super duper reasonable amount of LUTs, BRAM, and math blocks - 20k LUTS starts making it feel "real" FPGA and not just an entry level toy. And finally, an open source tool chain that is being actively maintained and improved (thank you so much @yrabbit.)
So then what's the problem? I'm not entirely sure. I think the reason that you don't see these boards in every single lab space and lecture hall is mostly an issue of marketing and not being "mainstream." The Tang Nano 20k is primarily marketed around retrogaming, which admittedly makes up a relatively large portion of the hobbyist FPGA community. It has a small connector for audio out, a flex connector for a TFT screen, and an HDMI port (!). All to help you recreate and the consoles of yesteryears. The board was designed for a specific purpose for SiSpeed, and honestly, that's okay. In regards to the other "mainstream" comment: these boards are based on Gowin FPGAs. This is a Chinese FPGA company that make some really impressive devices at an incredible price point, and with decent documentation. At the end of the day I think it's just hard for a Chinese company to get traction in an industry dominated by some pretty gigantic American corporations. I believe the their IDE leaves something to be desired as well.
I have many more thoughts and questions on Gowin as whole but I will save that for another time.
CMOD
Last but not least is the CMOD board. Again, here we have a very reasonable contender for my goal of a well rounded general purpose FPGA board for the student and hacker. It's breadboard compatible, and comes with a single PMOD port. You don't need an external programmer and with 32 IO and even a couple analog inputs it's pretty compelling. The issue? The price! 100 dollars is definitely not as bad as it could be, but I personally still would think twice about dropping that kind of money, especially given the very real possibility I could blow it up. Further more, there is the whole "Vivado" thing, which applies to the Arty boards discussed above, as well. See the following section.
IDE / Tool Chain
This post is already long and rambling, and frankly I'm getting tired of writing, but I am going to do another long winded dive into on the subject of IDEs and toolchains. In short, they matter.
In Defense of Simple
In my opinion, a major key to the success the original Arduino Uno's was the IDE. It was simple, easy, and ready to go. There was no need to understand compilers, linkers, or assemblers. You just hit the compile and then upload button and boom - you are blinking and LED. Many said that this wasn't "real" embedded programming, and to them I say "shame on you!" The Arduino IDE is/was limited and basic enough that it gets out of your way. There is no need to deal with a multiplicative set of learning curves of both digital electronics and toolchain setup at the same time, especially when one was just interested learning more about electronics or trying to add lights to their Halloween costume or something. It handled all that setup for you. A further example can be seen in the traditional Arduino serial terminal. The user didn't really need to know anything about UARTs or USB converter chips or baud rates or ASCII if they didn't want to. At the end of the day, copying and pasting a snippet of code that let you print values to the screen was good enough.
No one has really provided a ubiquitous "Arduino IDE" for FPGAs as a whole. A piece of software that says "No no, I will take care of all the messy stuff behind the scenes - just focus on writing your HDL." This is due to a variety reasons I think. Not that there aren't some great attempts out there right now like F4PGA and Icestudio. However, unless I am missing something, F4PGA seems to be abandoned and Icestudio, while cute, doesn't exactly foster the capabilities that a prospective employer might be looking for, and I don't believe it really provides a smooth on ramp to more advanced digital designs.
Outside the open source community, all of the big names have their own IDEs. To name the latest: Xilinx has Vivado, Lattice has Radiant, (and Altera has Quartus I guess? idk. If you can't tell I'm sort of discounting the Cyclone or whatever). Of these, Vivado offers the most "batteries included" experience of the major players, in my opinion. This is mainly due to the fact that one doesn't need to learn/run a separate program for simulation, and there is built in debugging capability, or something. Everything is right there at your finger tips, mostly ready to go. I sort of hate it.
Self admitted Hypocrisy
Surely this seems like it would be the perfect IDE for my goals! Why do I hate it? First of all, it's GIGANTIC. Honestly, lab number 0 in my class was simply installing Vivado. The naive install, I believe, is over 100 gigabytes. Considering that when I was a student I was dual booting Linux and Windows on a 256 GB SSD, this was a major hurdle! Not to mention our campus WiFi seemed to purposefully target and terminate connections with large downloads, or limit speeds so severely that it would turn into an over night endeavor. That's assuming that something didn't error out in the process. I am still working through some trauma, if you can't tell.
Second of all. I don't like that the simulator and waveform viewer is packaged inside of the IDE. At least in my class, that is the way that we use it. However, in my professional life I have never come across another IDE with this functionality, and frankly I rarely ever start a GUI for builds anyway, but that is besides the point.
And I know I just spouted on about how its any okay for any IDE to hide something behind the curtains etc. etc. But in my eyes, this is the one context in which an HDL IDE should not come with batteries included. Why? Well, one of the most fundamental aspects of FPGAs is that, on the whole, you're not just compiling code into a series of instructions for a fancy state machine. What's going on behind the scenes is a very physical and substantial process for all but the most trivial digital designs. This process is time consuming and complex and thus simulation is a fundamental, but almost entirely separate aspect, skillset even, of creating digital designs in HDLs. In my (admittedly short) career I have seen some gorgeous and exceedingly thorough self-checking test benches designed to validate some less than excellent VHDL. Likewise, I have seen some incredibly elegant, well made modules that don't even have whisper of an "assert" statement in their midst.
From a pedagogical point of view, I believe it is more beneficial for entry level FPGA hobbyists and students to keep the their synthesis separate from their simulation and I believe that Vivado is a detriment in that regard.
I really like Lattice Radiant.
In Conclusion
All of this rambling hopefully helps to explain where I am coming from with this project. This post could have been three times as long if I had the time, especially with all that I have left unsaid about the current state of the hobbyist FPGA community, and hacker/maker community as a whole. I invite anyone to critique and comment on this post because I am genuinely interested in feedback from students, professionals, and everyone in between. Next post will have some actual technical content.
Chris
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.