FPGA (Field-Programmable Gate Array), the field programmable gate array, is a product of further development based on programmable devices such as PAL, GAL, and CPLD. It emerged as a semi-custom circuit in the field of application-specific integrated circuits (ASIC), which not only solves the deficiencies of custom circuits, but also overcomes the shortcomings of the limited number of gate circuits of the original programmable devices. Therefore, if you want to play with FPGA, you must understand the internal working principle of FPGA and learn how to use these units to realize complex logic design.

Detailed explanation of FPGA design and application knowledge

(1) The working principle of FPGA

FPGAs are generally slower than ASICs (dedicated integrated chips) and cannot complete complex designs, but they have lower power consumption. But they also have many advantages such as fast finished products, can be modified to correct errors in the program and cheaper cost. Manufacturers may also provide cheap FPGAs with poor editing capabilities. Because these chips have poor editing capabilities, the development of these designs is completed on ordinary FPGAs, and then the design is transferred to a chip similar to ASIC on.

FPGA adopts the concept of logic cell array LCA (Logic Cell Array), which includes three parts: Configurable Logic Block (CLB), IOB (Input Output Block), 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 a different structure. FPGA uses a small look-up table (16×1RAM) to implement combinational logic. Each look-up table is connected to the input of a D flip-flop, and the flip-flop drives other logic circuits or I/O, thus forming a combination that can be realized The logic function can also realize the basic logic unit modules of the sequential logic function, and these modules are connected to each other or I/O modules by metal wires. FPGA logic is realized by loading programming data into the internal static storage unit. The value stored in the memory unit determines the logic function of the logic unit and the connection between modules or between modules and I/O, and finally determines FPGA can realize the function, FPGA allows unlimited programming.

(2) Basic issues of FPGA design

The basis of FPGA is digital circuit and VHDL language. Those who want to learn FPGA well, it is recommended to have a digital circuit book at the bedside. No matter which version it is, this is the basis. Knowing more about it also helps to form the idea of ​​hardware design. In terms of language, it is recommended that beginners learn the Verilog language. The VHDL language has strict grammar specifications and is very slow to debug. The Verilog language is easy to learn. Moreover, most large enterprises use the Verilog language. The VHDL language specification is easy to read, so the general military industry All use VHDL.

1. Tools

It is enough to be familiar with a few commonly used ones. The development environment QuartusII or ISE is enough. These two are basically interlinked. If you know one, the other is very easy. It is recommended to use Modelsim for functional simulation. If you are making chips, you can learn other simulation tools. For FPGA, Modelsim is enough. Synplify is generally used as a synthesis tool. For beginners, you don't need to care too much about this. You can use Quartus to synthesize it.

2. Thoughts

For beginners, especially those who transfer from software, the designed program is resource-consuming and slow, and it is very likely that it cannot be integrated. This requires us to be familiar with the writing of some fixed modules, which can be integrated in many books. There are all language introductions. Don't use software thinking to write hardware.

3. Habits

FPGA learning requires more practice, more simulation, signaltapII is a good tool, you can see the true value of each signal, it is recommended that beginners must do it by themselves, just reading a book is useless. Regarding English documents, if you want to learn all the functions of Quartus II, just look at its handbook, which is very detailed. For people in the IT industry, most of the knowledge sources are English documents. You must be patient and you will gain a lot from it. of.

4. Algorithm problem

As an FPGA engineer, you usually specialize in algorithms in the end. These basic knowledge are easily grasped. If you are not prepared for theory, learning FPGA can only stay at the initial stage. For beginners, digital signal processing is the foundation and should be understood well. Go deeper and don’t need to learn everything. According to the direction you will be engaged in in the future, such as communication, image processing, radar, sonar, navigation and positioning, etc.

(Three) FPGA configuration mode

FPGA has a variety of configuration modes: the parallel master mode is one FPGA plus one EPROM; the master-slave mode can support one PROM to program multiple FPGAs; the serial mode can use serial PROM to program the FPGA; the peripheral mode can use the FPGA as a micro The peripherals of the processor are programmed by the microprocessor.

How to achieve fast timing closure, reduce power consumption and cost, optimize clock management, and reduce the complexity of FPGA and PCB parallel design has always been a key issue for system design engineers using FPGAs. Nowadays, as FPGAs develop toward higher density, larger capacity, lower power consumption, and more IP integration, system design engineers have to face the unprecedented performance and performance of FPGAs while benefiting from these excellent performance. New design challenges brought about by ability level.

(4) Three rules of FPGA design

Interchange of first area and speed

The area here refers to the chip resources of the FPGA, including logic resources and I/O resources, etc.; the speed here refers to the highest frequency of FPGA work (unlike DSP or ARM, the working frequency of FPGA design is not fixed, and Is closely related to the delay of the design itself). In actual design, using the smallest area to design the highest speed is the goal pursued by every developer, but "fish and bear's paw can't have both", the choice between shows the wisdom of a developer.

1. Speed ​​change area

The speed advantage can be exchanged for area savings. The smaller the area, it means that the function of the product can be realized at a lower cost. The principle of speed for area is often used in some more complex algorithm designs. In these algorithm designs, pipeline design is often a technique that must be used. In the design of the pipeline, these modules that are reused but used differently will occupy a lot of FPGA resources. The FPGA design technology is modified to extract the smallest multiplexing unit from the reused algorithm modules, and use this smallest high speed to replace the modules that are reused but different times in the original design. Of course, in the process of transformation, some other resources will inevitably be added to realize this replacement process. But as long as the speed has advantages, the added logic can still achieve the purpose of reducing area and increasing speed.

It can be seen that the key to speed change area is the multiplexing of high-speed basic units.

2. Area change speed

In this method, area replication can be exchanged for an increase in speed. The higher the supported speed, it means that higher product performance can be achieved. Some application fields focusing on product performance can use parallel processing technology to achieve area conversion speed.

The second hardware achievable principle

FPGA design usually uses HDL language, such as Verilog HDL or VHDL. When using HDL language to describe a hardware circuit function, you must ensure that the circuit described by the code is hardware achievable.

The syntax of Verilog HDL language is very similar to C language, but there are essential differences between them. C language is a high-level language based on procedures, which can be run on the CPU after compilation. The Verilog HDL language describes the hardware structure itself, and it is the hardware circuit after compilation. Therefore, some statements are not problematic in the application of the C language environment, but the results will be incorrect or unsatisfactory in the HDL language environment.

There is no problem in running in C language, but compiling under the environment of Verilog HDL will cause serious waste of resources after synthesis.

Third synchronization design principle

Synchronous circuit and asynchronous circuit are two basic circuit structures designed by FPGA.

The biggest disadvantage of asynchronous circuits is that they produce glitches. The core circuit of synchronous design is composed of various flip-flops. Any output of this type of circuit is generated by driving a flip-flop on the edge of a certain clock. Therefore, the synchronous design can well avoid the generation of burrs.

(5) The main application of FPGA design

1. Circuit design

Connection logic and control logic are areas where FPGAs played a larger role in the early days and are the cornerstones of FPGA applications. In fact, it is still relatively difficult to apply FPGA in circuit design. This requires developers to have corresponding hardware knowledge (circuit knowledge) and software application capabilities (development tools). Talents in this area are always in short supply, and they are often engaged in new technologies. , Successful product development of new products will become mainstream basic products in the market for product designers to apply. In the near future, the design of general and dedicated IP will become a hot industry! The prerequisite for circuit design is to have certain hardware knowledge. At this level, the emphasis is on learning. Of course, getting started quickly is very important. The better the seat, the less waiting for people. Circuit development is the golden rice bowl.

2. Product design

Apply relatively mature technology to certain specific fields such as communications, video, information processing, etc. to develop products that meet industry needs and can be accepted by industry customers. This aspect is mainly the combination of FPGA technology and professional technology, and there is also Interface issues with professional customers. Product design also includes professional tool products and civilian products. The former focuses on performance, while the latter is designed for price-sensitive products with product functions as the main purpose. FPGA technology is an implementation method in this field. FPGA is because With the characteristics of interface, control, functional IP, embedded CPU, etc., it is possible to realize a simple structure, high degree of solidification, and full-featured system product design will be the most widely used market for FPGA technology, and it has a huge explosive demand space product Design requires relatively high technical personnel, and the journey is relatively long. But now the entire industry is in the state of forming a "starting team", as long as you join, the future is bright. Product design is a career development orientation, not a simple hobby. Arrived! The field of product design will create a large number of enterprises and entrepreneurs, which is a hot spot and opportunity for development.

3. System level

The system-level application is the combination of FPGA and traditional computer technology to realize an FPGA version of the computer system and realize a basic environment. On this platform, LINUX and other systems are run. This system also supports various standard peripherals and functional interfaces ( Image interface) This is very helpful for quickly forming a large-scale FPGA system. The early advantages of this kind of "counterfeit" system may not be obvious. It is similar to the situation of the ARM system, but if the advantages of FPGA can be used slowly, it is also a development direction to gradually realize some characteristic systems. If in system-level applications, developers do not have the ability to expand the development of the system, it is meaningless to engage in programming. Of course, the development of device drivers is another situation. System-level applications seem to have a high starting point, but they don’t. Deep development capabilities are likely to become enthusiasts, just as many people can do web pages but cannot be called programming. Similar to the above are a few personal opinions, I hope to help people who want to learn FPGA but are at a loss to understand their ideas. This is a good industry with a good opportunity for personal success. But it must be a highly competitive industry. The key is speed and depth, as well as market adaptability.

ZGAR Aurora 3000 Puffs

ZGAR Aurora 3000 Puffs


ZGAR electronic cigarette uses high-tech R&D, food grade disposable pod device and high-quality raw material. All package designs are Original IP. Our designer team is from Hong Kong. We have very high requirements for product quality, flavors taste and packaging design. The E-liquid is imported, materials are food grade, and assembly plant is medical-grade dust-free workshops.


Our products include disposable e-cigarettes, rechargeable e-cigarettes, rechargreable disposable vape pen, and various of flavors of cigarette cartridges. From 600puffs to 5000puffs, ZGAR bar Disposable offer high-tech R&D, E-cigarette improves battery capacity, We offer various of flavors and support customization. And printing designs can be customized. We have our own professional team and competitive quotations for any OEM or ODM works.


We supply OEM rechargeable disposable vape pen,OEM disposable electronic cigarette,ODM disposable vape pen,ODM disposable electronic cigarette,OEM/ODM vape pen e-cigarette,OEM/ODM atomizer device.

Aurora 3000 Puffs,Pod System Vape,Pos Systems Touch Screen,Empty Disposable Vape Pod System,3000Puffs Pod Vape System

ZGAR INTERNATIONAL(HK)CO., LIMITED , https://www.zgarvape.com