Sidetracked by FPGAs

ï—¬ 2023-04-29

Big, big surprise! My goal of learning Erlang was sidetracked almost immediately when I came across some FPGAs I bought years ago. A Numato MimasV2 Spartan-6 FPGA board and a tinyVision Upduino board sporting a Lattice iCE UP5K FPGA.

Getting back into these things has been slow going. I think when I first got the Mimas V2 board I just followed the starter project, downloaded the monolithic, horrific beast known as Xilinx ISE, made an LED blink, and then put these things back in a drawer for another day. I think that was around 2019, and even trying to wrap my hand around digital circuit design was escaping me.

Fast-forward to now, and I have to admit that ChatGPT has been an immense help in clarifying the steps in the workflows of chip design as well as defining all the jargon. It’s still very slow going because I think procedurally and FPGA development is truly parallel.

Spent a lot of time getting a good workflow going. Now I can just type make <target> and all the steps from synthesis, to mapping, to place and route, to generating a bitstream happen automatically. Even set up some targets for running the test benches (which I have, unfortunately, inserted directly into the files and have guarded with an ifdef macro, which is a little silly, but it works). There’s even a target to display the simulation files in GTKWave.

Feel like it’s been a pretty productive weekend so far, although I’m going to have to take some time away from weekend laziness and go into the office tomorrow because I’ve seriously been slacking at my job. There’s something invigorating about digital circuits and hardware design, though. I think it’s because it’s so tangible. I could potentially be designing my own boards one day with the exact peripherals I need. There’s something about programming at the RTL of these devices, as well. Something that programming for the Arduino doesn’t really satisfy.

Don’t remember the last time I felt like I could really pour myself into something that holds my interest as well as this. Very good sign for the future. I’m even thinking about going back to school for EE as a result…

Good(bye|[:space:]riddance), software engineering!

TODO:

  • Add links to the projects above, especially Yosys. Claire and co’s work is simply incredible. I couldn’t match their intellects given a thousand lifetimes.
  • Learn some crazy formulas. For example, this scary-looking thing represents the bandgap, which determines the electrical conductivity of a semiconductor:

$$V_{\text{bi}} = \frac{kT}{q}\ln\left(\frac{N_{\text{d}}\cdot N_{\text{a}}}{n_i^2}\right)$$

  • And here’s Planck’s Law, rendered inline $B(\nu,T) = \frac{2h\nu^3}{c^2} \cdot \frac{1}{e^{\frac{h\nu}{kT}} - 1}$