AUTHORITATIVE GUIDE: FPGA VS MICROCONTROLLER
Microcontroller and FPGA are widely used in the field of electronic chip design. Although FPGA has gradually become a star in chip design field in recent years, MCU still plays its role in many fields. This article focuses on the characteristics and differences between FPGA and MCU, and how to choose them in the actual chip design.
1.Authoritative knowledge of FPGA
A. what is an FPGA ?
FPGA (Field Programmable Gate Array), namely field programmable gate array, is the product of further development on the basis of programmable devices such as PAL, GAL, CPLD, etc. As a semi customized circuit in the field of application specific integrated circuit (ASIC), it not only solves the shortcomings of customized circuit, but also overcomes the shortcomings of the limited number of original programmable device gate circuits.
B. How FPGA Works
FPGA adopts the concept of logic cell array (LCA), which includes three parts: configurable logic block (CLB), output and input block (IOB), and interconnect.
Field programmable gate array (FPGA) is a programmable device. Compared with traditional logic circuits and gate arrays (such as PAL, GAL and CPLD devices), FPGA has different structures. The FPGA uses a small lookup table (16 × 1 RAM), each look-up table is connected to the input end of a D flip-flop, and the flip-flop drives other logic circuits or drives I/O, thus forming a basic logic unit module that can realize both the combined logic function and the sequential logic function. These modules are connected to each other or connected to the I/O module by metal wires. FPGA logic is realized by loading programming data to the internal static storage unit. The value stored in the memory unit determines the logic function of the logic unit and the connection mode between modules or between modules and I/O, and ultimately determines the functions that can be realized by FPGA. FPGA allows unlimited programming.
C. Characteristics of FPGA
- Using FPGA to design ASIC circuits (special integrated circuits), users can get shared chips without chip production
- FPGA can be used as the middle sample chip of other full custom or semi custom ASIC circuits.
- FPGA has rich triggers and I/O pins
- FPGA is one of the devices with the shortest design cycle, lowest development cost and lowest risk in ASIC circuits.
- FPGA adopts high-speed CMOS technology, with low power consumption, and can be compatible with CMOS and TTL levels.
2. Authoritative knowledge of Microcontroller
A. what is an Microcontroller ?
Single chip microcomputer, which is called single chip microcomputer or microcontroller, is a microcomputer that integrates central processing unit, memory, timer/counter, various input/output interfaces, etc. on an integrated circuit chip. Its biggest advantage is that it is small in size and can be placed inside the instrument, but it has small storage capacity, simple input and output interfaces and low functions. Because of its rapid development, the old definition of SCM can not meet the requirements, so it is called a broader range of microcontroller in many applications.
B. How Microcontroller Work ?
The process of the SCM automatically completing the tasks assigned to it, that is, the process of the SCM executing the program, that is, the process of executing the instructions one by one. The so-called instructions are written down in the form of commands for various operations that the SCM is required to perform, which is determined by the instruction system assigned to it by the designer. One instruction corresponds to one basic operation; All the instructions that can be executed by a single chip computer are the instruction system of the single chip computer. Different types of single chip computers have different instruction systems.
In order to enable the single chip microcomputer to automatically complete a specific task, the problem to be solved must be compiled into a series of instructions (these instructions must be the instructions that can be recognized and executed by the selected single chip microcomputer). The set of these instructions becomes a program, and the program needs to be stored in the memory part with storage function in advance.
The memory is composed of many storage units (the smallest storage unit), just like a building has many rooms, the instructions are stored in these units, and the instructions in the units are taken out and executed just like each room in the building is assigned to a unique room number, each storage unit must also be assigned to a unique address number, which is called the address of the storage unit, In this way, once you know the address of the storage unit, you can find the storage unit, and the instructions stored in the storage unit can be taken out and then executed.
C. Characteristics of Microcontroller
- Small size and simple structure
- Strong control ability
- Low voltage, low power consumption
- Excellent performance and price ratio
3. Differences between FPGA and MCU
A. Structural differences
- Microcontroller is a kind of microprocessor, which is similar to computer CPU. It generally adopts Harvard bus structure or Von Neumann structure. To a large extent, the programming of microcontroller should take its structure and the role of each register into account. Microcontroller is widely used, generally used to control the pipeline.
- The structure of FPGA is a look-up table structure. Its program does not need to consider the structure of the chip too much. It should pay attention to the timing problem. Its structure is relatively complex, and its functions are also very powerful. It is generally used in the communication field and other high-end occasions.
- The single chip microcomputer is a microcontroller, which realizes some functions by loading module software. The single chip microcomputer is a molded chip;
- FPGA is a chip used to design chips.
B. Difference in speed
Because FPGA is a hardware circuit, its running speed directly depends on the crystal speed, and the system is stable, especially suitable for high-speed interface circuits. Because the microcontroller is single thread, even the M3 series pipeline is single thread execution, and program statements need to wait for the cycle of the microcontroller to execute.
C. Essential difference
- The difference between FPGA and MCU is essentially the difference between software and hardware. FPGA is more inclined to hardware circuit, while MCU is more inclined to software.
- SCM design belongs to the software category; Its hardware (single chip microcomputer chip) is fixed, and the execution of software instructions on the hardware chip is described by software programming language;
- FPGA design belongs to the category of hardware. Its hardware (FPGA) is programmable, which is a process of customizing integrated circuits on FPGA chips through hardware description language;
D. Differences in application
In the end, all instructions of MCU (Microcontroller Unit) are executed sequentially in one MCU, while FPGA is a logic unit, so it is easy to execute in parallel.
MCU: Microcontroller unit (MCU), also known as single chip microcomputer or single chip microcomputer, is to reduce the frequency and specification of central process unit (CPU) appropriately, and integrate memory, timer, USB, A/D conversion, UART, PLC, DMA and other peripheral interfaces, and even LCD drive circuits on a single chip to form a chip level computer, Do different combination control for different applications.
The above is the difference between MCU and FPGA. I hope you can make the right choice. If you need chips or other electronic components and other products, please contact us in time. We have an ultra-high cost performance spot chip supply and look forward to cooperating with you