There has always been hot discussion between what to choose, an FPGA or a conventional hard IP microcontroller. It seems that FPGAs are going to rule in the future because of their flexibility, increasingly better power efficiency and decreasing prices. Often a soft processor is added in the FPGA design to get microcontroller like functionality along-with other concurrent processing.
- FPGAs are concurrent. You can take sequential functionality like adding soft processor core. While the microcontroller as always sequential. This makes FPGAs better suited for real-time applications such as executing DSP algorithms.
- FPGA are flexible, you can add subtract the functionality as required. This can not be done in microcontroller.
- FPGAs are liked in military applications. There are two main reasons of that. The first is that FPGAs are hard-wired and the random attack of alpha rays can not destroy/corrupt the memory areas hence collapse the device functionality. The second reason is that the life time of FPGA based development is longer. It can be adopted for advanced chip is required. Microcontrollers change too often and there is lots re-work required to do in order to keep pace with changing technology. This is necessary to save the design from being obsolete.
- The development time in case of conventional microcontroller is, I think, shorter and that of FPGA takes time because you need to glue-up different modules yourself and test them to perfection before doing anything. In case of a microcontroller, the peripherals are readily available and you can choose the microcontroller with your desire peripherals. These peripherals are pre-tested thoroughly by vendor and you need not to worry about their functionality, just need to use them. You will find ready made open source soft-peripherals for FPGAs as well but still “gluing” them up and testing is as task.
- Microcontroller, up-til now, are power efficient.
- Microcontroller are low-cost, much lower than FPGAs. This is specially true for small applications and large quantities.
- Microcontrollers are available in easy to solder SOIC and QFP package like one of the 32 bit Stellaris microcntroller from TI is available in SOIC28. Many vendors have TQFP48/64 packages with enriched peripheral options. You have limited choice in case of FPGAs. Those of the class of Spartan4/5 and above need to outsource the PCB/PCBA services which is expensive, difficult to debug and out of the reach an entry level professional or hobbyist.
What if we use microcontrollers and FPGAs are used simultaneously?
It happens! Infact some vendors like Altera, Xilinx, Atmel provide configurable logic along-with processor core as well. But for an electronics engineer (or the embedded systems developer) working on both the niches is really difficult. I remember that I had taken an FPGA course back in 2008 but could not fully utilize my training even now. This is because the expertise in microcontrollers are rarely going to help you in the field of FPGA unless you only do the embedded development and no advanced digital logic design. Also the HDL like Verilog may look similar to C in syntax, it’s very different in use and often confuses just after a session of C coding. The very mechanism of sequential microcontrollers and concurrent FPGAs is very different.
There are many other factors which decide what you choose. Like your company is a pure R&D or a services based company. You educational upbringing, some universities teach heavy FPGAs and DSP while other emphasize on microcontrollers. Your own personal interest and the level of your comfort. The nature of project, small volume cost insensitive or large volume cost sensitive. And, may be, most importantly the end application or customer requirement.
There would many other pro and cons which you can search further on internet but, I think that, if your field demands heavy DLD work and lots of DSP is involved, use FPGAs, otherwise, use microcontrollers; although only you are the right person to decide what to do keeping all the above mentioned circumstances in view.