Occasionally something will come into stock that bewilders me - the range of things we sell is so large that I'll inevitably have to look stuff up sometimes. This month has been no exception.
What the FPGA?
Here's the first part of the blurb from our site for this particular board (the TinyFPGA AX1).
The TinyFPGA A1 board is a bare-bones FPGA board in a tiny form-factor.
Add custom digital logic to your next project!The TinyFPGA A1 board is a bare-bones breakout board
for the Lattice MachXO2-256 FPGA.Tiny, just 1.2 by 0.7 inches
Low power 3.3 volt operation
18 user IOs (21 with JTAGEN)
256 4-input look-up tables
2 kilobits distributed RAM
1 SPI Hard-IP
2 I2C Hard-IPs
Built-in flash configuration memory programmable via JTAG
Let's start with the first line. This thing is a really small thing without any extra bits on. You can use it to make electrical decisions in your projects. Hmm, ok, we're doing alright. Repeat - this thing is a really small thing without any extra bits on, for the.... (invokes Google)... for the digital logic chip that's stuck to it.
Let's stop there before we get to the bullet points. It's worth looking into why you don't just use the logic chip like it is, or any other microchip for that matter! The clue is in the name.
FPGA stands for Field Programmable Gate Array. It means you can programme the ins and outs in the "field" (that's wherever you happen to be). Ah. A minion to do your bidding. I will call him Igor.
The Anatomy of an Igor
Let's look at a hastily crayoned drawing of Igor.
The field programmable thing means we will need to connect Igor to another device in order to give him the instructions to do our bidding, which is why I have named them his "mating pins". So Igor will do what we want, as soon as we've told Igor what we want.
Why is FPGA different to putting firmware on a microcontroller?
Oh, this is the good bit. You can put firmware on a microcontroller in much the same way that you can buy a microwave, and put it on High for 3 minutes. You can buy a TV and watch BBC2 for 30 minutes (other channels are available).
On a FPGA digital logic chip, you haven't bought a microwave or a TV. You have bought a small appliance that doesn't know what it is yet! You can decide what type it is, and what it does!
Igor's "mating pins"
People who know about these things call them JTAG connections. It's the initials of a group who made this the standard way of checking whether all your pins are where they should be and doing what they should be doing. The connectors can be all different shapes and sizes but generally there should be FIVE of them.
This prompted a nosey round at other things looking for mysterious 5 pin connections. You know where there are some of them? Look on a really old Raspberry Pi.
Warning! Not all 5 pin connectors are for this purpose.
So, using these pins, you can give your Igor the instructions of what type of appliance he should be. Here is a photo of an Igor getting his instructions from a computer via another board called a USB JTAG Programmer. Looks like he's going to be some kind of blinky light controller.
The Igor stores the "what Igor is today" instructions separately from the other instructions you give him so they don't get mixed up.
The really cool thing about all these little logic blocks inside the Igor (this particular one has 256 little blocks) is that you can get them and combine them in different ways to make totally different things, just like you do when you're cooking. Like, if there were three blocks, called flour, milk, and eggs, you could combine them and make pancakes, or an omelette, or some kind of flatbread, or even glue paste! Imagine what you could do with two hundred and fifty six!
So this is why people are all yay, FPGA is so great - it's because you can make your little Igor anything you want it to be. Dream Big, Igor.
Check out our range of FPGA boards here.
For actual technical detail have a look at this "Hobbyists Guide to FPGAs" on Hackaday.