Why implement microcontroller in FPGA?

If your project is going to use an FPGA for the grunt work, and it has the spare capacity, why would you go to the expense of an extra chip when you can just implement it in the FPGA?

For many procedural control environments it can be considerably easier to implement the required setup in a language like C than trying to do it in VHDL or Verilog. By adding the microcontroller into the FPGA you get the best of both worlds - the power of the VHDL / Verilog etc for the logic and interfacing systems, and the simplicity of a procedural language for the core control and management systems.


Benefits:

  • blazingly fast interface between the microcontroller and any custom interface or I/O logic on-chip.
  • customizable processor and debug interfaces
  • also, often easier control logic than writing the control code with, say, VHDL

Downsides:

  • Possibly more expensive FPGA is needed to fit both the microcontroller and the custom logic, compared to just having the custom logic on the FPGA
  • Possibly more difficult to implement, especially with memories and if the core is complex, than a ready-made microcontroller on a separate chip.

In extension to the answers of Majenko and PkP:

This trend of embedding a CPU into the FPGA design has lead to several heterogeneous systems like:

  • Xilinx' Zynq-7000 family
  • Altera's Arria/Cyclon/Stratix SoC FPGAs
  • MicroSemi's SmartFusion FPGAs

There is also an Intel Atom + Altera FPGA chip on the market: http://www.altera.com/devices/processor/intel/e6xx/proc-e6x5c.html

Most free micro controllers for FPGA suffer from a bad tool chain support. Embedded ARM CPUs come with trace/debug support, compilers (gcc tool chain) and full linux support. Here is a survey presented at FPL 2014: http://dx.doi.org/10.1109/FPL.2014.6927482

Edit 1:
There is also the class of PSoC (Programmable System on Chip) devices from Cypress. These devices include a micro controller (M8C, 8051, ARM Cortex M0 or Cortex M3) and classic SoC integrated I/O controllers or devices (I²C, SPI, Timer, CAN, DAC, ADC, OpAmp, ...) and a programmable part. This part is not as fine grain programmable as classic FPGAs, but it can be used to implement addition I/O controllers or built hardware accelerators. PSoC allows you to use analog components in your design.
http://www.cypress.com/psoc/?source=CY-ENG-HEADER

PSoC overview: PSoC
(source: electronicdesign.com)