Our Latest News

FPGA Basics

FPGA full name is Field-Programmable Gate Array, that is, field-programmable gate array.

1、Compared with microcontroller

The structure is different.

1.1. The number of pins, resources and internal multipliers of a microcontroller is determined, which means its hardware is determined. Its functions can be realized by software programming.

1.2 , The internal circuit of FPGA is uncertain, it can change the internal structure of the chip by programming. The number of internal multipliers, dividers and registers can be changed by programming.

This image has an empty alt attribute; its file name is image-137.png

Summary.

A. The microcontroller does not change the hardware structure, but implements the functions we need by changing the order in which its instructions are executed. (Instructions include read, write or jump instructions).

B. The programming and design of FPGA is to change the hardware circuit structure inside the chip to achieve the functions we need.

The points of consideration are different.

1.3, when doing microcontroller or computer programming, it is not necessary to consider the timing, as long as there is a function, and then there is a programming code to achieve it. Write a function, repeated calls can achieve a lot of functions.

For example, a function, the microcontroller only takes an hour, but the FPGA may spend a day or even months of time. Because the FPGA not only has to think about the function, but also the circuit and timing. It is a detailed approach to design that needs to be slowly keyed in one by one clock.

Therefore, FPGA development is far more difficult than microcontrollers.

Difficulty factor comparison from high to low: ASIC integrated circuit > FPGA > microcontroller

FPGA is specializing in the development and design of the bottom layer, specializing in the bottom optimization work, FPGA is very difficult, which is a characteristic of it.

2、FPGA application scenario

2.1, FPGA is powerful and difficult to test, generally used in the design of communication interfaces and digital signal processing and other relatively high-end (large amount of data, fast data transmission, high precision requirements) occasions.

Daily applications, the requirements are not particularly high occasions widely used microcontroller to achieve.

2.2, FPGA also has a special application, that is, the ASIC prototype verification.

How to understand? Integrated circuit development process is long and risky, when doing an integrated circuit development, from code writing to simulation verification, to PCB layout and wiring, and then to the final production are required to go through a long time cycle.

In order to ensure the success rate, hope that once through, before production can run on the FPGA to verify whether the function is normal.

2.3, FPGA non-standard occasions (occasions with low usage, often used in the military industry).

For example, USB and other interface standards are fixed. But there are some special occasions, its market demand itself is not large, it is also some kind of special definition of the interface, this interface in the market is difficult to find the corresponding chip to achieve this interface, then FPGA can be useful, you can design their own internal structure circuit with this interface for docking.

2.4, the new use of new technology.

When a new technology is not clear whether there is a market prospect, certainly not a mass production of a chip, you can first use FPGA to test, to be the market needs a lot of demand and then mass production.

Summary.

Compared with the dedicated ASIC, FPGA tools in the development of much less difficult, and greatly shorten the development cycle, and because the FPGA is reprogrammable, its development costs and risks than ASIC to reduce many, more suitable for complex and variable data applications.

3、Disadvantages of FPGA

The disadvantage of FPGA is the high cost, why say so? A dedicated circuit must be used all the circuits to achieve the functions we need. FPGA has to meet the functions of A, B and C at the same time. But to meet A certain functions on B or C is certainly not used, so its utilization is relatively low, which can also be interpreted as its high cost.

Therefore, FPGA can only do some high-end and less volume utilization. When it is found that the market prospect is very good and want to reduce the cost, the code of FPGA can be turned into integrated circuit to produce.

4、The basic structure of FPGA

FPGA is not like a dedicated ASIC through a fixed logic gate circuit to complete, but can only use a repeatable configuration of the structure to achieve, look-up table (LUT) can be very good to meet this requirement.

What is a Look-Up-Table? It is essentially a RAM memory.

As an example, take the digital logic Y=A&B&C as an example. In a dedicated ASIC, the logic gates are predetermined in order to implement this logic, as shown in the following figure.

c5e9b0b0-50fa-11ed-a3b6-dac502259ad0.png

The implementation structure of Y=A&B&C is different in FPGA.

In FPGA it is different. a, b, c can be any relationship by programming. The design process is as follows.

First write Y=A&B&C in code, and then analyze this line of code with EDA tools (QUARTUS or other development tools) to derive the values of Y for A, B, and C under different input combinations (8 in total) with the truth table shown below.

c6027c08-50fa-11ed-a3b6-dac502259ad0.png

The software tool then writes all the results to a lookup table (LUT), which enables the code to function.

c6185618-50fa-11ed-a3b6-dac502259ad0.png

Basic structure of FPGA implementation of Y=A&B&C

This is the principle of FPGA implementation.

5、Knowledge Supplement

5.1, there are soft cores and hard cores inside FPGA.

Soft core: a circuit that can be built up by gate circuits at will to achieve a certain function. For example, if a counter logic is implemented inside the chip, the functions used in the process of constructing the counter logic can be called “soft functions”.

Hard core: A chip that implements a fixed function. The circuitry is fixed and implemented in hardware. For example: PLL clock unit, its circuit is fixed, because the clock is activated by the external crystal, and then multiplied by the internal PLL clock, which is not realized by the digital circuit, but by the analog circuit, and the AD chip and DA chip are also analog chips, which also need fixed resources.

5.2, a new SOC FPGA (FPGA with embedded processor)

Inside the FPGA there is storage unit on-chip RAM block, data is stored in RAM and set working state by it, if you want the FPGA to work, you have to program RAM, and if there is a lot of data to interact externally, you have to store the data temporarily by adding peripherals, such as SDRAM memory or DDR3 memory, the data temporarily in the peripherals is also eventually to The data temporarily stored in the peripherals is eventually stored and processed through the internal RAM of the FPGA.

Currently, the mainstream FPGAs are based on SRAM process, and in most development boards are in serial configuration mode. Since SRAM loses internal data when power is lost, an external off-chip memory capable of saving data when power is lost is often used to save the program. In this way, the FPGA reads the data from the external memory into the on-chip RAM to complete the configuration when power is applied, and then enters the working state after programming the FPGA.

At present, there are already some chip circuits inside the FPGA, not only the interface, gate circuit, there are ARM and other CPUs and so on have been brought into the embedded processor function.

We will find the board function has ARM + FPGA or DSP + FPGA cooperation, a chip to achieve the processor + FPGA function, this is our more powerful embedded processor features.

Advantages.

1, more conducive to PCB layout, smaller area, more powerful.

2.2, ARM embedded inside the chip, there are more buses and communication methods between ARM and FPGA, the speed can be faster.

5.3、The way of storing and configuring data

Once the program is designed on the EDA tool, it is necessary to burn the program on the software into the internal FPGA. Through different configuration modes, the FPGA will have different programming methods, the following are several common configuration modes.

1、Parallel mode: FPGA is configured by parallel PROM or Flash, that is to say, the program of FPGA is written into PROM or Flash first, and the value inside will be read automatically when power is applied to configure FPGA.

c6311c48-50fa-11ed-a3b6-dac502259ad0.png

2、Master-slave mode: use one PROM to configure multiple FPGAs.

3、Serial mode: Serial PROM to configure FPGAs.

4、Peripheral mode: use FPGA as peripheral of microprocessor CPU, programmed by microprocessor.

c64d000c-50fa-11ed-a3b6-dac502259ad0.png

One is the FPGA and one is the CPU. The CPU writes the FPGA through the interface and then implements the required functions through the FPGA. So where does the data for the CPU to configure the FPGA parameters come from?

You can add a RAM or FLASH, the CPU reads the content inside and then writes to the FPGA internally, and the FPGA works to implement the needed functions. This is one of the more common ways.

What is the difference between this way and the CPU directly controlling the FPGA? That is, after power on the FPGA directly read the data of the PROM is not good, why do we need an additional CPU?

c660f94a-50fa-11ed-a3b6-dac502259ad0.png

One of the reasons is that some programs of FPGA are encrypted, the CPU reads the data and decrypts it before sending it to the FPGA, which then comes to implement the function.

    GET A FREE QUOTE

    FPGA IC & FULL BOM LIST

    We'd love to

    hear from you

    Highlight multiple sections with this eye-catching call to action style.

      Contact Us

      Exhibition Bay South Squre, Fuhai Bao’an Shenzhen China

      • Sales@ebics.com
      • +86.755.27389663