FPGAs and Microcontrollers
Logic in ElectronicsField-Programmable Gate Arrays (FPGAs) and Microcontroller Units (MCUs) are two of the most powerful tools available to an electrical engineer today. It is essential for anyone working in digital electronics, as it as for a professional in any industry, or even a hobbyist, to pursue a complete understanding of the tools available to assist in their work. This is especially true in a fast-paced industry, where tools and technologies are subject to sudden and frequent change. The industry of digital electronics has come a long way since the advent of the bipolar junction transistor, a mere 60 years ago. The FPGAs and MCUs employed by electrical engineers today incorporate many hundreds of thousands, even hundreds of millions or into the billions, of simple BJTs.
Comparison of FPGAs and MCUs – The SimilaritiesIt is sometimes tempting to dwell on the differences between FPGAs and MCUs, and in so doing ignore their many similarities. These devices are generally used in very similar scenarios; to put it very broadly: they are used to monitor input values and effect according output values. In fact, nearly any application that employs a microcontroller could employ a FPGA to the same effect, and vice-versa. This is not to say that the two are interchangeable; it is sometimes very difficult to achieve using one device what would be a simple matter for the other, as explained in the following section.
Contrast of FPGAs and MCUs – The DifferencesThe most important difference between FPGAs and MCUs is the manner in which they process instructions. MCUs process commands sequentially, meaning that the MCU reads each line of the program one at a time, in sequence. Conversely, FPGAs process commands concurrently, meaning that multiple lines of code are executed simultaneously.
The concurrent processing of FPGAs lends itself very well to the reading of parallel data on multiple lines, and allows for tighter control over interrupts through the use of Finite State Machines (FSMs). While a MCU-user would need to take into account the length of time required for their ISR to service an interrupt, a FPGA-user could rest easy in the knowledge that concurrent FSMs are constantly monitoring for changes in their respective domains.
Though concurrent processing is a very powerful tool, the sequential processing of a MCU is not without its advantages. It can be quite challenging to program FPGAs for high-speed serial data transfer, compared to the relatively simple procedure for such applications on MCUs. Furthermore, the concurrent operation of FPGAs can result in utter failure if the timing of any control logic is skewed by so much as a single clock cycle. High-accuracy simulation software is effectively required for successful FPGA prototyping, while MCU prototypes can often employ a trial and error method of test.
Factors Relating to PCB Design & ProductionFPGAs and Microcontrollers can differ quite strikingly in terms of implementation on a PCB, perhaps even more so than they differ in operation or application. The most notable difference being that FPGAs will more often be sold in BGA-style packages, which can be challenging to work with for smaller businesses or hobbyists. BGAs also add to the cost of PCB assembly, and they require advanced X-Ray Inspection techniques for verification. There are, of course, exceptions to this rule; some FPGAs can be found in QFP or QFN packages, but BGA is generally the standard for these devices.
FPGAs often also require more peripheral hardware than MCUs due to three key factors.
- Volatile Memory: FPGAs use SRAM, which requires periodic refresh and a separate FLASH memory module to store configuration information
- No Internal Oscillator: FPGAs must be supplied with an external clock
- Supply Voltage: Many FPGAs run on uncommon supply voltages (not 5V)
Cases for UseFPGAs are generally applied in scenarios requiring high-speed parallel data processing, or a high degree of customizability, but may be neglected for their relative complexity of configuration and prototype operation. Meanwhile, MCUs are much easier to configure and use from the outset, and they handle high-speed serial data very well, but they lack some of the impressive features of FPGAs.
There is no specific set of rules to dictate when one should use an FPGA and when one should use an MCU, and certainly neither technology is altogether “better” than the other, which explains why both technologies enjoy widespread use today. It is useful nonetheless to draw out some guidelines, as this discussion has done, to highlight the inherent strengths of each device.
- Common QFN Issues and How to Avoid Them
- Stencil aperture considerations for QFN chips
- QFP and QFN Packages: Taking Care of Your Complex ICs
- A Brief Analysis of the Most Common Surface Mount Devices
- How Component Packages Can Affect the Production Process