FPGA: all about these chips and their programming


The FPGAs have become more and more popular in recent times. Even for professional applications, these chips are often used, but also for DIY and makers who want to implement a discrete circuit within a chip with all the advantages that this implies. It is not cheap or easy to find a factory to send your layouts or patterns and have a custom chip made for you.

It is true that some foundries allow to make wafers or multiproject wafers to make chips for individuals or universities to test with them. These types of factories are, as I say, difficult to find, are usually abroad and do not come cheap. After some time, samples of your chips are sent to you at the agreed address, but they do not take care of testing them or making sure they work. It all depends on your design.

An alternative solution to that is to acquire an FPGA and program whatever you need to implement inside the chip…

What is an FPGA?

Programmable cells

FPGA stands for Field Programmable Gate Array They are digital devices or chips that are capable of being configured to allow the implementation of practically anything. In other words, it’s a blank chip that you can “write” on. That means that you can implement a CPU, a memory, a controller, any logic, etc., getting a very fast operation and with all the advantages of having it integrated in a chip and not with electronic elements.

Ross Freeman and Bernard Vonderschmitt, co-founders of Xilinx, invented the FPGA in 1984. They did it as an evolution to the CPLD chips of that time. The CPLD programmable chips had some shortcomings that solved the new FPGA designs and have been evolving ever since.

The FPGA market is so fruitful that companies like Intel, Xilinx, Altera, Quick Logic, Lattice, etc. have invested a lot to develop better FPGAs and also integrated programming environments or IDEs for them. Thus providing very good platforms to facilitate the task of developers or makers.

Today these manufacturers not only provide a programmable chip, but also include numerous auxiliary elements to provide more possibilities for developers. For example, they include flash memory cells, SDRAM cells, etc.

What are they used for?
IDE to program FPGA

Therefore, an FPGA can be similar to an ASIC but we can choose what it is going to be. For example, we could create a code to program it and turn it into a CPU, a GPU, an adder, a memory controller, or any other logic circuit implemented in a single chip.

The possibilities are quite endless. In fact, I recommend you to visit the website opencores.org, a site dedicated to offer a multitude of free hardware projects. You will find code in VHDL, Verligo, etc., for RAM, CPU, GPU, controllers, ALUs, FPUs, decoders, and a long etc.

How is it programmed?

FPGA programmer

To program an FPGA we can do it from our favorite operating system, such as GNU/Linux, Windows and MacOS, although there are certainly more development environments for Windows. Usually, the same companies that manufacture the FPGA offer a very complete IDE to work with and where you can find all the tools you need in the same software suite.

You will also need the chip or FPGA board and the necessary cable or programmer with which you can connect the FPGA to your PC to pass the code written to the FPGA so that it is programmed. This is similar to what you do with the Arduino board, by writing the Arduino IDE program into the microcontroller’s programmable memory.

Only that in the case of the FPGA what we have is an array of elementary components such as memory cells, AND, OR, NOT, Flip-flops, and other elements or basic blocks of digital electronics that we can use. With the written program what we are going to do is to impose the way those essential blocks are going to be grouped to form the circle we want, like for example an ALU.

That is, if we program an adder in our IDE, the blocks needed to implement this adder are going to be linked in the right way inside the FPGA so that the chip works as an adder. Simple, isn’t it? Usually several methods are used for this programming at a physical level, as usually memories or fuses to make a permanent link in that case.

The speed at which they operate will depend on the clock frequency at which the FPGA we have purchased works. For example, the most basic ones usually work at 50 Mhz, others will work at much higher frequencies. In the case of the 50 MHz FPGA, that means that it will operate at a rate of 50,000,000 times per second. If we continue with the adder I have given as an example, it will be able to do that amount of sums in one second…

Continuing with the issue of programming, once we know that you can write code as we would do in Arduino IDE or to develop any other program, and see how it is done at the hardware level, I will say that it is not really a programming as such. Rather, it is a description of hardware. In fact, hardware description languages such as VHDL, Verilog, etc. are used.

With this program describes at a logical level what makes the circle we want to implement. And then you go to the FPGA. Although it is true that some platforms allow programming in programming languages such as C to be able to implement a CPU in the FPGA and then generate programs to be loaded into memory and processed by that processor.

Integration with Arduino

FPGA Arduino

FPGAs are usually used separately, but it is true that there are many tools and kits on the market that will make your life easier to integrate your FPGA with the Arduino platform. An example of a board to bring FPGA to your projects with Arduino is MKR Vidor 4000, although there are others.

MKR Vidor 4000 is a board with three chips. One of them is an FPGA, specifically an Intel Cyclone 10. There are also other chips for Bluetooth LE or low power connectivity and also WiFi support. A good complement to provide your Arduino with connectivity features and be able to implement what you need in the FPGA.

This gives you a customizable hardware, configured by yourself for the purpose you want. That offers infinite possibilities.

Leave a Comment