FPGA Programmable Logic

65-consulting-ARM-int-boardField Programmable Gate Arrays (FPGAs) are basically pieces of programmable logic. They consist of a large number of very simple logic elements which can each be configured to perform a simple step, and these logic elements can then be connected together to create complex logic blocks. The result, given enough logic elements, connection and external pins, is a general purpose logic array which can be programmed for almost any purpose. Designs which previously would have required a custom ASIC can now be implemented with a few standard parts connected to an FPGA.

As FPGAs have become more affordable they have found their way into more and more designs. It has now become possible to build very complex systems (for example an entire microprocessor) based around a US$30 FPGA.

The appeal of FPGAs is the ability to handle 'in hardware' a number of complex functions which previously would have been in the software domain. Since hardware can perform many operations in parallel, this can raise performance significantly. For example, high-resolution JPEG image compression which might take several seconds on a fast ARM CPU can be performed in under 100ms on a suitably equipped FPGA. Of course, good FPGA design will involve selecting the right tradeoff between performance and design size for a given application.

The price of this is extra design complexity, and higher power consumption. But this price is often worth paying for the functionality it brings.

FPGA design is performed in a simular way to software development, except with different languages and tools. Debugging is somewhat more difficult, and building a design generally takes longer for an FPGA than for software. FPGAs are best used to augment the functionality of a CPU, to enable the CPU to perform more tasks more quickly.

At the lower end of the scale, CPLDs can perform many of the functions of FPGAs at a much lower cost. Design is similar but somewhat more constrained. CPLD design is therefore generally more straight-forward and debugging is also easier.