FPGA vs. Microcontroller

Field Programmable Gate Array (FPGA) Vs. Microcontroller - What's the Difference?

A field-programmable gate or grid array (FPGA) and a microcontroller are similar, but not the same. They are both essentially “small computers” or integrated circuits embedded in other devices and products. The main difference is in the title. Users can program the hardware of FPGAs after manufacture, making them “field-programmable,” while microcontrollers are only customizable on a more superficial level. Additionally, FPGAs can handle parallel inputs while microcontrollers read one line of code at a time.

Because they allow for a greater level of personalization, FPGAs are both more expensive and more difficult to program. In contrast, microcontrollers are cost-effective but much less customizable. Learn more about the similarities and differences between microcontrollers and FPGAs. One is not necessarily better than the other — when deciding which to use, consider multiple factors.

 

WHAT IS A MICROCONTROLLER?

A microcontroller (MCU) is basically a small computer. It has all the same elements as other computers, including a central processing unit (CPU), some random-access memory (RAM) and input and output devices. Unlike a desktop computer, which can run thousands of different programs, a microcontroller is a special-purpose device that performs one program.

It’s made to do one thing repeatedly, automatically or at user request. It’s embedded in some other device, whether a consumer, manufacturer, medical or other type of product. It runs on low energy — its power consumption is measurable in milliamps. As a result, microcontrollers tend to be affordable. The device in which it’s embedded can vary greatly in cost, however.

You find microcontrollers all around you in your everyday life. Here are a few of the consumer devices in which a microcontroller is embedded:

Keyboards

Monitors

Printers

Copiers

Fax machines

Telephones

Television remote controls

Microwaves

Washers and dryers

Lawn sprinklers

Children’s toys

 

In addition to consumer items, microcontrollers are also embedded within the following devices:

Traffic lights

Car engine control systems

Power tools

Implantable medical devices

These are only a few examples — microcontrollers are embedded within all kinds of devices we rely on in modern society. Each microcontroller has a specific, repetitive purpose. It can operate automatically using a feedback control system, as you would find with traffic lights. Or, it can operate at user input signals, like flipping a switch or pressing a button. This latter concept is true for your microwave, laundry machine and television remote control.

WHAT IS A FIELD PROGRAMMABLE GRID ARRAY?

A field-programmable gate or grid array is a little more complicated than a microcontroller. Most of the time, a chip comes pre-programmed. As the user, you can change software, but not hardware. This brings us to the defining element of an FPGA — you, the user, can configure its hardware after purchase.

Engineers find this especially useful for prototyping their own application-specific integrated circuits. In fact, Intel uses a form of FPGA to streamline their own prototyping process. FPGAs are also useful because the devices in which FPGAs are embedded can be altered without needing all-new hardware.

Engineers find this especially useful for prototyping their own application-specific integrated circuits.

Per the example given by “FPGAs for Dummies,” regulations might change to demand that vehicle rear-view cameras operate faster. If these cameras run on FPGAs, manufacturers can make this change without installing expensive, all-new hardware. They can simply reprogram the FPGA in each car’s rear-view camera. Cars that are already on the road can be altered rather than rendered obsolete.

 

How Does It Work?

FPGAs have an “array” of integrated hardware circuits — these arrays are groups of programmable logic blocks. During manufacturing, an FPGA has not been configured to have any particular function. Instead, the user can configure it and later reconfigure it however they choose.

The user does this using a hardware description language (HDL). An FPGA has logic blocks, like AND and XOR, which the user can piece together with interconnects. Modern FPGAs have many logic gates and RAM blocks, so they can accommodate complex computations. Some FPGAs also have analog-to-digital converters or digital-to-analog converters, similar to field-programmable analog arrays (FPAAs).

HOW THEY’RE SIMILAR

Both FPGAs and microcontrollers have the same basic purpose — they are both built in a way that allows a manufacturer or end-user to determine their function. They both perform specific applications and are embedded within other devices, whether a traffic light or laundry machine. This versatility is why you can find them all around you. Everything we do is easier thanks to these little integrated circuits.

To an untrained eye, they look roughly the same. Both are flat, square, tiny chips surrounded by programmable pins. They’re both essentially miniature computers, programmed for a distinct purpose. For this reason, neither an FPGA nor a microcontroller can serve as a personal or desktop computer. Instead, they follow commands to perform one function at varying levels of complexity.

Basic Components

These devices have several fundamental similarities. In fact, they’re comprised of the same basic components. An FPGA and a microcontroller are both integrated circuits that operate using computer logic and binary.

An integrated circuit is a set of electronic circuits on one flat chip, which consists of semiconductor material — often silicon. It can perform calculations and store data. Integrated circuits use either digital or analog technology — as mentioned above, some FPGAs can convert between the two. Digital technology utilizes binary logic, while analog technology determines a linear function of an input to calculate an output.

This basic concept, input determining output, describes how all computers work. Digital technology incorporates a two-valued logic system, or binary — one or zero, on or off, yes or no. It’s important to understand the basics of computer logic when programming either a microcontroller or an FPGA.

Customization

Additionally, both FPGAs and microcontrollers are programmable after production to some extent — meaning either a manufacturer or end-user can design their function and embed them as needed. This is why these devices have so many applications in a broad array of industries.

The extent to which you can customize an FPGA sets it apart, which is why these are most useful for complicated, highly technical applications. On the other hand, a microcontroller is better for simpler applications.

HOW THEY’RE DIFFERENT

The main difference between an FPGA and microcontroller is the level of customization and complexity. They also vary in price and ease of use. Essentially, an FPGA allows for greater customization and more complex processes, as well as retroactive changes to hardware. A user needs more skill and know-how to use an FPGA.

While FPGAs have their advantages, microcontrollers cost less and are easier to use. Most hobbyists or beginners would benefit from purchasing microcontrollers, while engineering companies and manufacturers may prefer FPGAs.

Microcontrollers

The defining characteristics of microcontrollers include:

They’re easy to use: Anyone with a basic understanding of coding can program a microcontroller. You can program a microcontroller using an assembly language like Javascript or Python, which you can teach yourself through online courses.

They’re affordable: Because they’re simpler to mass-produce, the upfront cost is less for a microcontroller than for an FPGA.

They’re not always ideal for complex applications: The dedicated processor of a microcontroller handles all inputs and outputs. As a result, bottlenecks can occur as processes have to wait for others to resolve. Because they do not allow for parallel functions, microcontrollers are better for simpler purposes.

They’re ideal for simple applications: Think about your laundry machine. After you put in your clothes, you customize two or three settings, and then you press start. Similarly, your computer mouse only needs to know how to interpret a few inputs — scroll up, scroll down, left click and right click. For simple, unchanging applications like these, a microcontroller is ideal.

Microcontrollers - The defining characteristics of microcontrollers

FPGAs

Some defining characteristics of FPGAs include:

They require more skill to use: You’ll need more than a basic understanding of coding language to program an FPGA. In addition to knowledge of a coding language, you’ll need to be able to track mass amounts of variables. You’ll also need to understand a hardware description language. Designing and redesigning hardware is not a task for beginners.

They allow for more parallelism: An FPGA has thousands of logic blocks, all of which you can program. You can create processes independent of one another, decreasing instances of bottlenecking as with microcontrollers.

They allow for a higher level of customization: Simply put, if you know what you’re doing, you can do a lot more with an FPGA than a microcontroller. If you want to program something complicated, you’ll need more customizability than a microcontroller provides.

They tend to cost more: One drawback of FPGAs is that they tend to be more expensive than microcontrollers. Despite higher upfront costs, they can save money for industries that may need to make retroactive changes — think of the rear-view camera example.

They’re ideal for more complex applications: Because FPGAs allow for parallel processes, you can implement more inputs with an FPGA than with a microcontroller, without running into a bottlenecking issue. This makes them ideal for more complex operations.

They allow for later alteration: One of the biggest benefits of an FPGA is that the hardware itself can be changed after its initial programming. For this reason, you can change a device’s function without completely replacing its hardware. This is more cost-effective in the long run, especially for mass-producing industries.

SHOULD I USE A MICROCONTROLLER OR AN FPGA IN MY PRINTED CIRCUIT BOARD (PCB)?

A printed circuit board brings a schematic drawing to life. The more conductive layers the board has, the more connections you can make. A four-layer board will have four conductive layers, with insulating layers between. Assembling a PCB requires a decent bit of technical knowledge, so read up on the jargon if you’re assembling one for the first time. You may opt to rely on a professional PCB production service or PCB supplier.

Whether you use a microcontroller or an FPGA in your PCB should depend on several factors, including:

The necessary level of complexity. Your level of expertise. Your budget, especially if you need to buy in bulk.

Retroactive alterations you may need to make.

The Necessary Level of Complexity

FPGAs can execute multiple lines of code at once, allowing for independent, parallel processes. For highly advanced applications, this capability is a necessity. An FPGA can handle more complicated inputs and can perform simultaneous operations. The drawback is that FPGAs require perfect timing and accuracy to function properly. A tiny mistake can render the whole system useless.

 

Microcontrollers only read one like of code at a time, processing commands in sequence.

 

In contrast, microcontrollers only read one line of code at a time, processing commands in sequence. Though this can lead to a bottlenecking issue, it has its advantages. Because they’re less complicated, microcontrollers are easier to program and reprogram using a trial-and-error method. For simple applications, an FPGA may be more complicated than necessary, and it may make programming harder than it needs to be.

If a mistake is made in the programming of an FPGA, repairs are much more complex. This brings us to our next point, which is that your choice between an FPGA vs. a microcontroller will need to depend on your level of expertise.

Your Level of Expertise

In simple terms, an FPGA is not the right choice for a beginner. Hardware description languages take more time and experience to learn than assembly languages. A greater level of customization means more skill is required. If you have a lot of experience with computer engineering, an FPGA will afford you an attractive level of customizability.

Your Budget

Keep in mind that FPGAs do tend to be more expensive in their initial cost than microcontrollers. If you’re looking to program something simple, like an auto-dimming light or a temperature sensor, a relatively cost-effective microcontroller might be the better option.

Though their initial cost is greater, FPGAs can reduce expenses later — especially in mass-produced objects that may need to be altered after original assembly.

Your Need for Retroactive Alteration

For any number of reasons, you may find you need to alter the hardware of your application. In that case, you’ll be glad to have an FPGA. This is part of why so many industries prefer FPGAs. When laws, standards, regulations or needs change, it’s much less expensive and time-consuming to alter existing FPGAs rather than implement all-new hardware systems.

LEARN MORE BY CONTACTING MILLENNIUM CIRCUITS

Both FPGAs and microcontrollers are valuable for a wide variety of purposes. Their versatility lends them to thousands of applications, some of which we use every single day. Understanding the similarities and differences between them will help you determine which is the best option for your purposes.

While they consist of the same basic components, they’re different in their level of customization, complexity, price and required level of expertise. Choosing one over the other should depend on multiple factors. Each solution has unique benefits and potential drawbacks.

Whether you’re designing a do-it-yourself project, creating a prototype for a new product or looking to streamline a technical process, one of these integrated circuits is bound to be useful. If you have any questions about FPGA or microcontroller technology used on bare PCBs, contact the experts at Millennium Circuits Limited for more information.

Five FPGA Design Techniques

Developing FPGA solutions can be a challenge and as a consultant, We often see designs which are facing difficulties late in the development cycle. Oddly enough, often the challenge isn’t implementing the functionality but instead, achieving a solution which is on schedule, cost, and quality. Of course, schedule and cost are closely linked. If we run over on schedule, the costs will increase. However, costs will also increase if we try to increase engineering resources in order to maintain the schedule, start looking at third-party IP, or do any number of mitigations. Increases in cost eats into a company’s profit margins and ability to perform future developments, while late schedule delivery impacts their reputation and the future project pipeline.

 

The third element, which is the quality aspect, is also critically important. Poor quality design will not only drive schedule and cost, but also prevents the ability to leverage the design or elements of the design for future iterations or derivatives. This is often called technical debt, meaning when we know something is not that great but it helps us achieve the deadlines, so we accept it. Of course, we always intend to go back and fix it, but don’t often do. Examples of technical debt include not creating test benches for modules and testing on the hardware, or allowing designs to get unwieldy as the deadlines loom thereby making future maintenance difficult.

Having thought about this a little, We think there are several elements which can be used by engineering teams to help reduce the technical and programmatic risk on FPGA development.

 

1. Schedule – The development schedule should be defined from metrics and based upon previous development experience of similar IP blocks, FPGAs and verification standards. These metrics should be easily available, provided engineers record the hours spent on a project. Regardless of company size, this is important to record and track to ensure the project is not going over budget. However, even if it does go over budget, do not be tempted to “cheat” and stop recording the hours or assign them to another task. If you have an accurate recording of the hours a development took, then you can use these for estimation on future developments and not go over budget. Over the years we have created a fairly simple excel spread sheet that enables us to assign a complexity to a block (complex, medium, simple) and use metric-based figures to determine the estimate. This estimation also enables customization for design and verification flow (e.g., light weight prototyping or full ESA / DO254 certification etc.).

 

2. Development Plan – Knowing how to design an FPGA is only part of being an FPGA engineer. A key element is knowing how you are going to go from the concept and the requirements to a completed and verified design. The best way to work this out is to write a development plan. It doesn’t have to be War and Peace but it should be based on your development processes and tailor them accordingly, aligned with the schedule. This will enable team member to know what is expected of them in the development, when reviews are going to performed, and what is expected as the inputs and results of those reviews.

 

3. Architecture – One of the key skills of an FPGA developer is to be able to work out the system solution and the architecture. This architecture should be as simple and elegant as possible and follow the KISS principle. Anyone can make a complex architecture but a skilled and experienced engineer can implement complex solutions within simple, modular and flexible architecture. One of the key points of the architecture is to make it as simple and easy to understand as possible for the benefit of other team members and reviewers, in addition to your future self when you come back in six to 12 months’ time. One of the key pitfalls to avoid is creating large flat designs, leveraging hierarchy, especially in IP Integrator is the key to a good design. Hierarchy has several advantages and enables the design to be split into the functional modules, grouping needed functions together. This can make understanding the design and debugging much simpler. Hierarchy can also be very useful when combined with an IP reuse strategy. When using IP Integrator, we can create reusable hierarchical blocks using TCL which allow common functions of IP to be quickly and easily recreated in future designs.

 

4. Technical De-Risking – We all know that the earlier we find an issue, the easier and less costly it is to fix it. In FPGA development, we often use development boards to prototype algorithms and functions we think will present a technical risk in order to retire the risk early in the program. If we are developing custom boards for our FPGA, some technical risk carries in until we get the board and the final FPGA design and then try to achieve timing closure. This can be the point where of a lot of pain and stress is experienced because it’s where things get very expensive to the schedule and cost if there are issues. In order to retire the risk of timing closure early in the project, we can pin plan the project and also write the IO structures of the FPGA design as early as possible in addition to performing trail synthesis and place and route to ensure timing closure can be achieved. This retires the risk where you get to the end if the project and experience IO timing closure issues. The best way to do this is to implement your timing structures in RTL etc. and then create a simple logic structure behind them to stop optimization during synthesis. You can then apply the necessary timing constraints and reduce the risk of reaching the end of development and there being no timing closure possible.

 

5. Standard Interfaces - This one goes back to most of the points We have made so far in this blog. To be able to achieve on-time development with reduced risk, it’s critical to reuse as much IP as possible. To create this library and enable maximal reuse, you need to define a standard interface for the IP blocks. This allows you to keep the architecture simple because you are using a standard interface and also enables reuse on future projects. We try to focus on using either AXI, AXI Lite or AXI Stream because these easily integrate with IP provided in Vivado as well as purchased third-party IP. If you write an IP block which is in demand, and you have standard interfaces, you can always leverage it and offer it for sale.

Learn more by contacting Millennium Circuits

                                                                FPGA-Based Systems Increase Motor Control Performance.pdf

 

 

                                                          Business Alliances

lbtgfk

The Intel® Intelligent Systems Alliance is one of the world's most recognized and trusted technology ecosystems, with more than 200 leading solution and service providers from a broad range of industries. CEMTEK is an Associate member of the Intel Intelligent Systems Alliance, and offers the latest technologies based on Intel Embedded platforms.

61bnut

Partnership with AMD allows CEMTEK to stay at the forefront of embedded solutions based on graphic rich x86-based AMD Embedded processors. AMD Embedded solutions give designers ample flexibility to design scalable and feature rich products for multimedia and graphic intensive applications.

vbsb91

Microsoft is dedicated to delivering the best set of embedded technology, end-to-end development tools, support, and resources, so you can build reliable, powerful, and intelligent embedded devices for your customers. Windows Embedded operating systems are designed to do more than help you build a better embedded device - it help you provide highly customized device designs on a flexible platform with easy-to-use development tools.

qd1qxp

EnOcean GmbH is the originator of the patented energy harvesting wireless technology. The company manufactures and markets maintenance-free wireless sensor solutions for use in in building, smart home and industrial applications as well as for the Internet of Things. EnOcean solutions are based on miniaturized energy converters, ultra-low-power electronic circuitry and reliable wireless. Combining these elements enables EnOcean and its product partners to offer sensor systems that are fundamental for automation systems and innovative networks. Today wireless modules from EnOcean are chosen worldwide by more than 150 manufacturers. Wireless components are already in use in several hundreds of thousands buildings. EnOcean was founded in 2001 as a spin-off from Siemens AG.