What are the differences and similarities between FPGA, ASIC and General Microcontrollers?
ASIC vs FPGA
A Field Programmable Gate Array can be seen as the prototyping stage of Application Specific Integrated Circuits: ASICs are very expensive to manufacture, and once it's made there is no going back (as the most expensive fixed cost is the masks [sort of manufacturing "stencil"] and their development). FPGAs are reprogrammable many times, however because of the fact that a generic array of gates is connected to accomplish your goal, it is not optimised like ASICs. Also, FPGAs are natively dynamic devices in that if you power it off, you loose not only the current state but also your configuration. Boards now exist though that add a FLASH chip and/or a microcontroller to load the configuration at startup so this tends to be a less important argument. Both ASICs and FPGAs can be configured with Hardware Description Languages, and sometimes FPGAs are used for the end product. But generally ASICs kick in when the design is fixed.
FPGA vs microcontroller
As for the difference between a microcontroller and a FPGA, you can consider a microcontroller to be an ASIC which basically processes code in FLASH/ROM sequentially. You can make microcontrollers with FPGAs even if it's not optimised, but not the opposite. FPGAs are wired just like electronic circuits so you can have truly parallel circuits, not like in a microcontroller where the processor jumps from a piece of code to another to simulate good-enough parallelism. However because FPGAs have been designed for parallel tasks, it's not as easy to write sequential code as in a microcontroller.
For example, typically if you write in pseudocode "let C be A XOR B", on a FPGA that will be translated into "build a XOR gate with the lego bricks contained (lookup tables and latches), and connect A/B as inputs and C as output" which will be updated every clock cycle regardless of whether C is used or not. Whereas on a microcontroller that will be translated into "read instruction - it's a XOR of variables at address A and address B of RAM, result to store at address C. Load arithmetic logic units registers, then ask the ALU to do a XOR, then copy the output register at address C of RAM". On the user side though, both instructions were 1 line of code. If we were to do this, THEN something else, in HDL we would have to define what is called a Process to artificially do sequences - separate from the parallel code. Whereas in a microcontroller there is nothing to do. On the other hand, to get "parallelism" (tuning in and out really) out of a microcontroller, you would need to juggle with threads which is not trivial. Different ways of working, different purposes.
In summary:
ASIC vs FPGA: fixed, more expensive for small number of products (cheaper for high volumes), but more optimised.
ASIC vs microcontroller: certainly like comparing a tool with a hammer.
FPGA vs microcontroller: not optimised for sequential code processing, but can do truly parallel tasks very easily as well. Generally FPGAs are programmed in HDL, microcontrollers in C/Assembly
Whenever speed of parallel tasks is an issue, take an FPGA, evolve your design and finally make it an ASIC if it's cheaper to you in the long run (mass production). If sequential tasks are okay, take a microcontroller. I guess you could do an even more application specific IC from this if it's cheaper to you in the long run as well. The best solution will probably be a bit of both.
What a quick search after writing this gave me:
FPGA vs Microcontrollers, on this very forum
FPGAs can be "re-wired" by re-programming. A FPGA loads it's configuration into it's configurable logic cells when powered. This means it can be re-programmed with no changes to the hardware.
ASICs can only be re-wired by modifying the photolitographic masks at the silicon foundry.
A microcontroller is a type of ASIC, that executes a program and can do generic things as a result. However, if you want to alter the instruction set, or do something similar, you have to modify the actual silicon IC layout.
The difference between a FPGA and a MCU is more fuzzy. Basically, what a FPGA is, at the hardware level, is a lot of small SRAM cells, all connected to a dense matric of multiplexers. Basically, a FPGA is a whole pile of discrete logic that can be electronically "re-wired" **simply by reprogramming the multiplexers and SRAM cells.
As such, you can actually implement a MCU within a FPGA, since a MCU is just a certain configuration of logic cells. In fact, FPGAs are very commonly used in the design process of MCUs.
A microcontroller is a implementation of a certain logic configuration. The reason we have them is that by implementing a MCU directly in the silicon, the overall amount of silicon die space required can be considerably optimized, and certain performance optimizations can be made that the required "genericness" of a FPGA prohibits. This allows the production costs of a MCU to be reduced dramatically, and as a result, the common MCU is much cheaper then a FPGA that's capable of containing the equivalent logic.
FPGAs are useful in certain applications, because they can implement logic structures in a manner that MCUs cannot. For example, if you need to add X1 + Y1, X2 + Y2, X3 + Y3, and X4 + Y4, the MCU will have to do each operation in sequence *. A FPGA can simply have 4 separate ALUs at the same time, so it can do the same operation in a quarter of the time (assuming the two devices are clocked at the same rate).
This is where FPGAs (or ASICs designed for the same task) can really shine, in the fact that you can do many, many things simultaneously, which a single-process can only do sequentially.
* (note: I'm ignoring some things like SIMD here)
This is a good question,
Basically a micro controller and an ASIC have hardware (often referred to as silicon) that is set in stone and can't be changed. An FPGA can be configured to represent many different kinds of hardware (this can include micro controllers).
You may think that a micro controller can be made to do many different things but this is all done by running different programmes - technically software but sometimes referred to as firmware - the hardware itself doesn't change essentially it does the same operations but in a different order with different inputs.
FPGAs are usually used to generate the designs that are committed to ASICs the difference between them is that if you wanted to update the inner workings of an FPGA or add/remove functional blocks all you need to do is update it's firmware, this can't be done on ASICs as the inner workings have been committed to silicon, it is not reconfigurable.
So in short, with a micro processor you use the same hardware to run different programmes, with an FPGA you are reconfiguring the hardware to perform different functions and ASICs are like a micro controller in that the hardware cannot be changed but are usually designed to perform a single function extremely efficiently.
Both ASICs and FPGAs can contain micro controllers and if they do you can write programmes for them as you would a stand alone micro controller, an example of this is Altera's NIOS II embedded processor.
If this is still confusing, let me know what about it is unclear and I will do my best to clarify my answer.
Gipsy