Start at 7 o'clock and let you quickly master FPGA development

Any hardware engineer is no stranger to FPGA, just like C language is a compulsory course for software engineers. As long as it is an electronic related student, you must learn the program of programmable logic. The full name of FPGA in English is Field Programmable Gate Array, which is a field programmable gate array. It is a product of further development based on programmable devices such as PAL, GAL and EPLD.

From the appearance, the word Programmable really describes the characteristics of FPGA well, but it also makes many beginners take a lot of detours. When it comes to programming, you can't help but think of coding, because the idea of ​​software programming is already ingrained for engineers. Therefore, many beginners will ask the same question. Which of the two hardware programming languages ​​VHDL and Verilog should be learned? Even if you know which design language to learn, you will go into the vast grammar and go astray. Some beginners wrote a lot of code, ran n trials on the Demo board, but still can't understand the FPGA, or even the difference between it and the microcontroller. Why is that? In fact, this all comes down to one reason, that is, the three words "programmable" are confusing, that is, there is no clear understanding of the nature of the FPGA. Therefore, there is no way to learn about FPGAs. It takes half a bit of work and wastes a lot of time, but it still does not work.

FPGA emerged as a semi-custom circuit in the field of application-specific integrated circuits (ASIC), which not only solves the shortcomings of custom circuits, but also overcomes the shortcomings of the limited number of original programmable device gates. Therefore, from the bottom, FPGA is still in the category of integrated circuits. As far as current technology is concerned, the use of FPGA development projects is still based on digital circuit design. Therefore, the "programmable" of FPGAs is to implement different digital circuit logic. This is fundamentally different from the so-called software programming! After all, FPGA design is circuit design. Therefore, for each FPGA engineer, it is important to have a circuit in the brain when designing. So, how do you learn FPGAs effectively? In fact, it is very simple, as long as you start from the following 7 points, step by step, over time, you can fully understand the FPGA design.

1. First, you must understand the structure and performance of your FPGA. Different manufacturers, different series of FPGA chips have different structures and performances, but they are inseparable. At the beginning, I started with mastering several typical high-end chips, such as Altera's StraTIx III and Xilinx's Virtex 5. After that, it is easy to understand other series of chips. As for the chips of LatTIce and Actel, it is not too late to know when using them, because learning mainstream things will be more effective! Many FPGA-related textbooks use several commonly used chips as examples to describe the basic structure and principles of FPGAs. After the beginners saw it, they always felt too abstract and a little unintelligible. Therefore, in order to deeply understand the FPGA, you must have a solid digital circuit foundation! In digital circuits, the most basic is logic and timing. Engineers must understand the relationship between the internal logic structure of the FPGA and the basic circuit structure of the digital circuit. For example, the combinational logic of any of the four input signals can be implemented with a 4-input LUT provided by the FPGA. If you use a Xilinx chip, the shift register can be implemented either by cascade of multiple flip-flops or by a LUT. Often, beginners can design the right logic, but it's easy to ignore timing. In the design of I/O ports, timing-related defects are fatal to the product and can affect product reliability. Therefore, after mastering the structure, you must also pay attention to some important timing parameters of the chip, such as the setup time of the I/O port clock, the hold time, and the delay time from the flip-flop to the output, and the maximum frequency of the internal working clock of the chip. . Only by fully grasping the structure and performance of the chip used can a reasonable system be designed to ensure reliable and stable FPGA design. A large amount of documentation provided by FPGA vendors is a good learning material.

2. Since FPGA is "programmable", it is naturally inseparable from programming languages. In fact, most of the early engineers used the schematic input method for logic design, which is a design approach closer to circuit design. This design approach is highly demanding for designers and is not conducive to porting and maintenance, so VHDL and Verilog are gradually becoming popular. These two languages ​​don't matter how good or bad, but Verilog is better than VHDL, and it is more in line with SystemVerilog, which may dominate the world in the future. They are all hardware description languages. Since it is called hardware description language, it is naturally different from programming in the software world. Therefore, beginners can't learn it as a software programming language, otherwise it will be ruined. If you're just doing FPGA logic design and doing simple functional simulations, just learning the simplest syntax is enough. The syntax for writing verification scripts is completely unnecessary, and it is basically not used. Language is just a tool, especially in hardware design. The code is not beautiful, it doesn't matter. The most important thing is the design idea. Remember, FPGA engineers are designing circuits, not "programming"!

3. Many engineers talk about the importance of algorithms and think that they must know a lot of algorithms. That's right, a good algorithm is just like a weapon for design. However, research algorithms and how to implement algorithms are two different concepts. Researching algorithms is doing math problems, and implementing algorithms is the responsibility of engineers. This is not to say that FPGA engineers do not have to study algorithms, but rather emphasize the responsibility. Different algorithms, our requirements for the study and understanding of their principles are also different. For example, 8B/10B encoding, as long as you know where to use it is enough, ready-made IP Core can be called directly. However, algorithms such as FEC codec can only know how to implement it if you understand the basic principles. For algorithms, the focus of FPGA engineers is on "how to achieve!" . In addition, in addition to algorithms, the design methods commonly used in logic design must be understood, such as ping-pong operations, pipeline design, and time-multiplexing. There are also commonly used logic modules, such as asynchronous FIFOs and state machines, which are actually the most basic things in digital circuits, but for beginners, they may not be used correctly when doing FPGA design.

4. FPGA design must have a good design flow to support. After the code is written, it takes a lot of time to do a complete functional simulation and verification. However, some engineers do not pay attention to simulation and verification, but can't wait for the board to debug. After encountering the BUG, ​​it is tinkered in the code. If you are lucky, the BUG is solved on the surface. The reason for the deep level may not be found, leaving a hidden danger to the product. A good design flow requires that most bugs must be resolved in the early work. Functional simulation and verification is a very effective and important step. In addition to simulation verification, synthesis and cabling must also be taken care of, which requires us to carefully review the compilation report and timing report, because many timing issues can be reflected in the report. Sometimes, some engineers encounter timing problems. Just doing clock inversion to adjust the phase relationship between data and clock, or modifying the parameters of synthesis and routing, still can't solve the problem. Especially in designs that use high-speed clocks, in most cases, we only have to modify the logic in the code to meet the timing requirements of the design. These can only be diagnosed after careful analysis of the report. In addition, for most synchronous logic designs, timing simulation is not necessary and this step can be omitted.

5. At this stage, the three major directions for FPGA development are SOC, high-speed I/O and DSP. In a limited time, it is necessary to choose a field to carry out the main attack. Only when the goal is clear, will it be more invested. SOC design requires designers to understand software programming, CPU principles, and even operating systems, because SOC is a combination of software and hardware. High-speed I/O design requires designers to master the basics of many analog circuits and some common communication protocols, such as SDH, GbE, PCI-E, and so on. The use of FPGAs in the field of DSP is a development direction that has emerged in recent years. Due to its inherent parallelism, FPGA can realize modules with large computational complexity in DSP algorithms with high efficiency. It is very suitable for emerging applications such as video and image processing, which require higher and higher DSP performance. Designers need to master digital signals. Handle common algorithms. These three directions are completely different, don't swallow the dates, all through! "There is a specialization in the industry," and senior senior engineers can hardly achieve success in many directions. Of course, it would be better if you could have a deeper research in one area and a certain understanding of the other two areas.

6. An excellent FPGA engineer must do “one special multi-function”. The so-called "one special" certainly refers to the professional depth in the field of FPGA design, and "multi-energy" requires engineers to understand and master other professional fields. For example, for designing an SOC system, the C language must be learned, otherwise the architecture of the system on chip may be unreasonable. In addition, for engineers designing high-speed I/O ports, board schematic design and PCB design need to be understood. Only mastering the concepts related to analog circuits such as pre-emphasis, equalization, and impedance matching can be handy in design and debugging.

7. The last and most difficult point is that the key to moving to a senior engineer is that FPGA design requires a good system architecture and reasonable modularity. This helps FPGA debugging and maintenance, and is also easy for many people to develop together, especially when using large-scale FPGAs, which is often referred to as Top-Down design. Divide a large and complex design into several small modules, and the level should be clear and not flat. This requires the designer to have a comprehensive and profound understanding of the design. A cluttered design is catastrophic for later maintenance, especially for the receiver, if you want to modify a certain logic, it can be said to be miserable. From this point of view, beginners' questions can be found here. What is FPGA learning? It is to learn the system level circuit design. Therefore, the development direction of FPGA engineers is system engineers.

If you can have a deep understanding of the above 7 points, you can see the essence of FPGA. The rapid changes in the market require that electronic products must be highly sensitive to the market, and the time from product design to market launch is becoming shorter and shorter, and FPGAs are indispensable. In addition, in the face of Cost Down, FPGA also plays an indispensable role. In today's era, FPGAs have been widely used in communications, data processing, networking, instrumentation, industrial control, military and aerospace. With the further reduction of power consumption and cost, FPGA will enter more application fields, and it is believed that FPGA engineers will have a wider space for display.

Other household electric appliance

gree , https://www.greegroups.com

This entry was posted in on