24
\$\begingroup\$

I have read this post and it does not answer my question in its entirety:

I think of a microcontroller as anything that has some memory, registers, and can process a set of instructions such as LOAD, STORE and ADD. It contains logic gates and such to perform its role, but its main task is to be a universal processor of bits. I think of a Microntroller as a system of interconnected ASIC designs to create the ability to store and process instructions.

I think of an ASIC device as a circuit that has been specifically constructed using logical and electrical components to perform one single task, with no other task in mind nor extra hardware included.

I think of an FPGA device as an ASIC device (a low-level device) + a bunch of unused stuff left over, used to implement a particular truth table.

Despite its name, an FGPA feels very "application-specific", since it must be rewired to perform a new and different task. This leads to confusion with ASIC. Albeit, in the case of rewiring an FPGA, all necessary hardware should be present. Also, FPGA's are meant to be programmable, but isn't that what a Microcontroller is meant for?

The post above I referenced also mentions HDL, with which I am familiar. Can't HDL be used for both ASIC and FPGA, and by proxy to design an entire microcontroller?

\$\endgroup\$
  • 1
    \$\begingroup\$ It's not very clear what your question is. Have you read related questions on FPGA vs ASIC? HDL is indeed actually used to design ASICs and FPGA implementations, and you can design a microcontroller in HDL. \$\endgroup\$ – pjc50 Jan 20 '15 at 10:58
  • 2
    \$\begingroup\$ Altera offers a free ebook called FPGAs for Dummies, which explains the difference between FPGAs, ASICs, and microcontrollers well. \$\endgroup\$ – kkrambo Jan 20 '15 at 13:35
  • \$\begingroup\$ @kkrambo You callin' me a dummy? :) Sorry, couldn't resist... I will check it out. \$\endgroup\$ – user58446 Jan 20 '15 at 23:40
  • \$\begingroup\$ I added the word 'similarities' to the question title, because it seems that there are minute technical jargon details which may confuse how the three different devices relate: for instance one device may contain one of the other two devices, or it may contain many similar components but differ in some important aspect. This has already been touched on by some of the existing answers. Thank you. \$\endgroup\$ – user58446 Jan 20 '15 at 23:59
26
\$\begingroup\$

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: enter image description here enter image description here

FPGA vs Microcontrollers, on this very forum

\$\endgroup\$
14
\$\begingroup\$

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)

\$\endgroup\$
  • \$\begingroup\$ I don't think the FPGA/ASIC distinction is fuzzy; in an FPGA, the circuits whose "wiring" can be changed operate simultaneously and independently. An MCU has a large quantity of circuitry whose wiring cannot be changed, whose behavior is controlled through information which is accessed piecemeal from a programmable memory array. At any moment in time, a CPU will generally only be able to perform one operation from a list of a few thousand to a few billion choices, but the MCU will be designed so that putting such operations together in sequence will make it possible to do useful work. \$\endgroup\$ – supercat Jan 20 '15 at 20:52
  • \$\begingroup\$ Thank you. VERY close to becoming the answer... albeit 10 months later. +1 to make ammends. \$\endgroup\$ – user58446 Nov 26 '15 at 1:59
6
\$\begingroup\$

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

\$\endgroup\$
3
\$\begingroup\$

well, no an FPGA is programmed by electrical signals if behave like a specific collection of gates, some FPGAs include flash memory to store this configuration, some do not and must be reprogrammed after every power reset.

An ASIC comes off the production line already configured.

FPGA bugs can be fixed with a firmware upgrade, ASIC bugs can't economically be repaired.

\$\endgroup\$
2
\$\begingroup\$

Despite its name, an FGPA feels very "applcation-specific", since it must be rewired to perform a new and different task.

That's the opposite of what "application-specific" means. You can use an FPGA for more than one application by rewiring it. You cannot change an ASIC, so it can only be applied to one task (that task may be implementing a microcontroller).

Albeit, in the case of rewiring an FPGA, all necessary hardware should be present.

Not sure what this means. Usually there's a software interface for reprogramming an FPGA. It's an ASIC that requires millions of [currency unit]s of hardware.

FPGA's are meant to be programmable, but isn't that what a Microcontroller is meant for?

A microcontroller allows you to program sequential software for a fixed hardware. Just like a normal computer, but very small and resource limited. An FPGA allows you to program any hardware you want using an HDL.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.