Comparison with general purpose processors: is FPGA the future?

A processor is a complex device with a fixed set of instructions. Each one of them is associated with a permanently connected hardware, and the programmer cannot use more instructions than those defined and configured by the manufacturer. On the other hand, the FPGA system on module does not have anything permanently connected, but is composed of a network with connections that the user can join or break, and that determine the logical behavior of the device.

FPGA: the digital logic

When we program a microprocessor, we group a series of instructions for sequential or serial execution. On the other hand, when we describe digital logic for an FPGA, the resulting circuit will contain multiple signals that will vary at the same time, in a kind of parallel execution. Another way of looking at it is this: it is often said that a processor is limited in time or clock cycles. If we want to do more work, this translates into more clock cycles, that is, more time. However, an FPGA can execute multiple tasks simultaneously, but in that case it is limited by space. To do more work, you need more circuits and therefore more capacity to house them.

It should be noted that it is possible to include the design of a processor in the programmable logic of an FPGA. This is often called a soft microprocessor, and it is common enough that many manufacturers include these processor descriptions in their development environments. In fact, during the design of microprocessors, FPGAs are often used as a preliminary step to final manufacturing, greatly reducing cost.

There are other differences that are worth noting

Compared to a microprocessor or microcontroller, most FPGAs need more external components for their operation. This problem becomes more evident when we consider that many also have volatile configuration memory. In addition, they often require multiple voltages to operate, and their packages have a high number of input and output pins, complicating design.

When configuring an FPGA, the first step is the design of the circuit, which requires knowledge of digital electronics. Unlike software programming, it is much more difficult to start mincing code if the architecture of the application is not clear. It is advisable at this point to make a diagram of the complete circuit to be aware of the multiple signals that are going to coexist and vary simultaneously and of the consequences of each one of them.

Another fact that gives us clues about the paradigm shift is that they are not called programming languages, but description languages. Due to the complexity of testing digital circuits, it is common at this point to use test benches that simulate the behavior of the hardware. This type of tool allows you to see the status of the signal at all times and verify that the transitions are as expected and the results are as desired. The third stage is known as circuit synthesis and is one of the keys to the process. All the above steps are the same for all FPGAs, regardless of manufacturer or family.