Hacker News new | ask | show | jobs
by muttled 1354 days ago
I see a lot of use of FPGAs in things like cutting-edge machinery, warfare, and stock trading. Are there any cool hobbyist uses of these things? Always game to learn a new tech.
6 comments

For me, one option is to be able to learn processors in depth. You want to understand how one works? You can always emulate it in SW, but on an FPGA you can make them interact with the real world in real time and probe them at the same time, with ready made signal analyzers that the vendors provide, and/or by making your own tools.

Another option, do you want to see by yourself how caching improves code performance? You can make that on an FPGA also.

I have done some time ago a very nice course which is called From Nand to Tetris, that teaches how to go all the way from gates to a processor. My plan for the near future is to implement the NAND2Tetris processor on a Basys 3 board, and make some of the examples I mentioned (like, probing internal registers using HW tools, or seeing by yourself how a cache improves performance). I hope to make some of these things available on my site. I am the OP, but just in case, my website is https://fpgaer.tech

There is vast spread of FPGA sizes, so on affordability side it's definitely possible and some people did it.

The "problem" is really that you can do a LOT with MCUs, and programming FPGAs is very different than microcontrollers serially executing your code so they are pretty niche.

Like, if you for example needed to drive few thousand neopixels techncially FPGA would be perfect use case, just make a blob of memory and a bunch of serializers that feed each chain of LEDs.

... or you can just use some DMA magick on some fast STM32 and hack it out without having to learn new programming language.

When would a hobbyist need processing much faster than a modern beefy CPU provides, but not in a highly parallel fashion which a modern GPU provides?

My only relatively reasonable suggestion is making perfect hardware emulators for old hardware, like vintage computers and their parts.

Alas, FPGA programming model is neither easy nor intuitive, and the tools are mostly proprietary, expensive, and (as I heard) have a steep learning curve.

These things get used in dsp and other radio applications all the time.
Not just emulators. You can do nifty things, like redirect RAM reads and writes to a different location, save states, freeze the CPU, feed it with a different ROM (bypassing the one in your board), etc.

https://bitfixer.com/2020/02/19/romulator-6502-is-ready/

>Are there any cool hobbyist uses of these things?

Yes, there is, if you're willing to learn.

>Always game to learn a new tech.

Great. A good starting point is NANDLand[0].

Their board is not at all a bad purchase at <$100, particularly to follow their tutorials, but you can do better[1] if you are adventurous. e.g. iCEBreaker or iCESugar.

I'd still recommend to stick to iCE40 and the open source yosys/nextpnr stack, until you become competent enough to actually know what you want/need.

[0] https://nandland.com/

[1] https://www.joelw.id.au/FPGA/CheapFPGADevelopmentBoards

For someone making hobby electronics experiments, an FPGA can be used to make a cheap (but with modest performances) logic analyzer and digital oscilloscope (and test signal generator, if desired).

Many years ago, that would have been the only solution to avoid paying thousands of dollars for a professional instrument.

However, nowadays there exist a number of commercial solutions for such cheap instruments, which are made exactly like this, i.e. with an FPGA surrounded by appropriate I/O circuits and connectors, some USB or Ethernet interface for the PC and some capture software.

These have the advantage that are ready to use out of the box, but making yourself such an instrument can be instructive.

There's always sound or image generation, or programming a game like Pong. That's always looked cool to me. There are some "easy" entry points, e.g. https://maker.pro/arduino/tutorial/getting-started-with-fpga..., but I've never gone as far as actually try them.

With a bit of luck, someone will reply with better options.

Edit: or look at this list: https://hackaday.io/search?term=fpga

The Cypress PSoC might be of interest. It's a combination FPGA and microcontroller, the low-end demo boards with USB programming get as low as ~$10.

Though most of what you can do with the FPGA would be covered by built-in timer/capture modules or the PICO PIO modules on other chips (though IIRC, some of the boards have analog support in the FPGA if you wanted to do real-time audio processing). I have not found a particular hobbyist use for them, only know it from my father teaching some computer engineering courses and picking since he could use the same board for digital logic and microcontroller programming.