Recommended reading: How to learn FPGA

Hello everyone. It's time for a day of study. Many people recently asked me how to learn FPGAs. So let's talk today.

First, get started first to master HDL (HDL = verilog + VHDL).

The first sentence is: If you haven’t learned how to count electricity, you must first learn how to count. Then you can choose verilog or VHDL, which is based on C language. It is recommended to select VHDL. Because verilog is too much like C, it is easy to confuse. Finally, you will find that you spend a lot of time to distinguish the two languages, rather than learning how to use it. Of course, you can turn your mind, you can also choose verilog, after all, in the domestic verilog more used.

Next, first find the example code. The significance of copying code lies in the familiarity with grammar rules and compilers (here the compiler is a silicon compiler, also known as a synthesizer, commonly used compilers are: Quartus, ISE, Vivado, Design Compiler, Synopsys VCS, iverilog, Diamond Lattice, Microsemi/Actel's Libero, Synplify pro), then imitate writing, and finally write it without reading. After compiling the code, open the RTL diagram and see what kind of circuit is integrated.

HDL is a hardware description language that highlights the characteristics of hardware. Therefore, we must use digital thinking to think about HDL instead of using C or other high-level languages. If we can't understand this sentence, we can see what is hardware and what is software". At this stage, the recommended textbook is "Verilog Legend", "Verilog HDL Advanced Digital Design" or "VHDL for Logical Synthesis". You can write a three-stage state machine without reading a book and you can enter the next stage.

In addition, you must have official Verilog or VHDL documentation, "verilog_IEEE official standards manual -2005_IEEE_P1364", "IEEE Standard VHDL Language_2008", so that you can check when you encounter some grammatical problems.

Second, independently complete the small and medium-sized digital circuit design.

Now, you can design some digital circuits like traffic lights, keyboards, DDS, etc. The recommended textbook is Xia Lao's Verilog Digital System Design Tutorial (3rd Edition). At this stage, what you need to do is: Give you an indicator requirement or timing diagram. You can use HDL design circuitry to implement it. Here you need a development board, you can choose Altera's cycloone IV series, or Xilinx's Spantan 6. Never buy a development board before you have mastered HDL, because it is useless to buy it back. Here you do not need to download code every time you compile, let's use modelsim (in addition to QuestaSim, NC verilog, Diamond's Active-HDL, VCS, Debussy/Verdi and other simulation tools), if the simulation can not pass then there is no need to download Well, certainly not. It is sufficient to master the simple testbench here. The recommended teaching material is "WRITING TESTBENCHES Functional Verification of HDL Models".

Third, master design methods and design principles.

You may find that your integrated circuit is correct, but there are many warnings. At this time, you must learn to synchronize design principles and optimize circuits, whether it is speed or area priority, how the clock tree should be designed, how to synchronize two different clocks, and so on. The recommended textbooks are the "Fundamentals of FPGA Authorization," "IP Core Aspiration - Digital Logic Design Ideas," and "Altera FPGA/CPLD Design," the second edition of the basic and advanced chapters. Learn to speed up compilation (incremental compilation, LogicLock), static timing analysis (timequest), and embedded logic analyzer (signaltap) even through customs clearance. If there is something that you do not understand, you can skip it for the time being, because this part also requires a sufficient amount of practice to gain a deeper understanding.

Fourth, learn to improve development efficiency.

Because the editor function of Quartus and ISE is too weak, it affects the development efficiency. It is therefore recommended to use the function of code snippets in the Sublime text editor to reduce repetitive labor. Modelsim is also a commonly used simulation tool that learns TCL/TK to write a DO file that suits itself, making the simulation automatic. The recommended textbook is “TCL/TK Primer Classic”. You may back up the code manually, but professionals use version controllers. Therefore, in order to increase work efficiency, you must master GIT. The file comparator Beyond Compare is also a relatively common tool. In addition, you can use System Verilog instead of testbench, which will be more efficient. If you are doing IC verification, you must master System Verilog and verification methodology (UVM). The recommended textbooks are "Writing Testbenches using SystemVerilog", "The UVM Primer", and "System Verilog1800-2012 Grammar Manual".

After mastering TCL/TK, you can learn virtual Jtag (ISE has a similar tool) to make your own debugging tool. In addition, if you have time, you'd better learn Python. The script means once and for all.

Fifth, enhance the theoretical basis.

At this time, you will already be using an FPGA, but there are still a lot of things you can't do (for example, FIR filters, PID algorithms, OFDM, etc.) because the theory is not learned. I can give you a rough idea in several directions, followed by a theoretical lesson to master.

1. Signal Processing - Signals and Systems, Digital Signal Processing, Digital Image Processing, Modern Digital Signal Processing, Blind Signal Processing, Adaptive Filter Principles, Radar Signal Processing

Interface applications - such as: UART, SPI, IIC, USB, CAN, PCIE, Rapid IO, DDR, TCP/IP, SPI4.2 (10G Ethernet interface), SATA, Fiber, DisplayPort

3, wireless communication - signal and system, digital signal processing, communication principle, mobile communication basis, random process, information theory and coding

4, CPU design - the principle of computer composition, microcontroller, computer architecture, compiler theory

5, instrumentation - analog electronic technology, high-frequency electronic circuits, electronic measurement technology, intelligent instrument theory and application

6. Control System - Automatic Control Theory, Modern Control Theory, Process Control Engineering, Fuzzy Controller Theory and Applications

7. Compression, Encoding, Encryption - Principles of Number Theory, Abstract Algebra, Modern Encoding, Information Theory and Coding, Introduction to Data Compression, Applied Cryptography, Audio Information Processing, Digital Video Coding Technology

Now you find that the original FPGA will involve so much knowledge, you can choose a direction of interest, but the work is likely to use some of the knowledge in several directions, so the theory or learn as much as possible. If you want to go one step further, math and English are inevitable.

Six, learn to use MATLAB simulation.

When designing an FPGA algorithm, MATLAB is used more or less, such as a CRC coefficient matrix, digital filter coefficients, various forms, and text processing. In addition, MATLAB can also be used to debug HDL (a step-by-step comparison of MATLAB's calculations with HDL can be used to find out what went wrong). Recommended textbooks are "MATLAB Collection" and Du Yong's "Digital Filter MATLAB and FPGA Implementation."

Seven, a sufficient amount of practice.

This time you have read at least a few chip manuals (the official website has), and then you can do a certain amount of practice for your own direction (to maintain a good code style, increase the readability of the component instantiation statement, draw a flowchart / Timing chart, the habit of writing documents. For example, the communication class can do modulation and demodulation algorithms, and the meter class can do bus analyzers. However, these algorithms only give formulas and block diagrams in the book, and they are very different from the actual ones. You may even think that everything in the book is superficial. Well, you can find relevant information in HowNet, Baidu Library, EETOP Forum, Opencores, ChinaAET, Q Group Sharing, and Blog (you can buy a HowNet account at Taobao.) In fact, when you reach this stage, you have reached the professional level. If you are free, you will know more about cutting-edge technologies. This will help your career planning.

At work, you may need to pay attention to many protocols and industry standards. The agreement can be found in EETOP. Standards (such as national standards GB and GB/T, and international standards ISO) recommend "Standard Network" and "Standard Sharing Network". .

Eight, image processing. (This part is only for friends who want to learn image processing, but it is also a shallow route.)

1, Photoshop. It took a week or two to learn PS, had a general understanding of image processing, knew the basic concepts of various image formats, histograms, hue, channels, filters, splicing, and could use it. This part is based on 0. The purpose is to let everyone have a perceptual understanding of image processing, rather than a variety of formulas derived from it. Recommended "Photoshop CS6 complete self-study tutorial."

2. Image processing based on MATLAB or OpenCV. Basic C/C++ can learn OpenCV, otherwise, it is recommended to learn MATLAB. At this stage, as long as you learn to simply call functions, you don't need to delve into the details of the implementation. Recommended "digital image processing matlab Edition", "learning OpenCV."

3, the basic theory of image processing. This part of the theory is the need for high number, complex variable, linear algebra, signals and systems, digital signal processing and other basic, if the foundation is not good, it is recommended to make up the basis of supplements. Can not understand the theory can also be put down for the time being, perhaps after learning it will naturally open up. Recommended "digital image processing."

4, FPGA-based image processing. Apply the previously learned theory to the FPGA. If you have the level of the previous seventh stage, you will easily complete the image algorithm design independently. (The image processing is inseparable from the interface. The fifth stage above says ). Recommended "FPGA-based embedded image processing system design", "FPGA-based digital image processing principles and applications."

5, further study mathematics. To be more advanced in the algorithm, it will inevitably require more mathematics, so it is recommended to study real analysis, universal culvert analysis, wavelet analysis, and so on.

The following two stages are introduced to interested friends.

Nine, the end of the number of electricity is a model electricity.

Now that things inside the FPGA are difficult for you, but signals out of the FPGA, you can't control them. At this time, you must learn the analog mode. For example: circuit analysis, analog electronic technology, high-frequency electronic circuits, PCB design, EMC, SI, PI, etc., can design a FPGA development board with two DDR3, even if the customs clearance. The specific learning route can refer to "How to Learn Hardware Design - Theory" and "How to Learn Hardware Design - Practice" in this blog.

X. There is no end to learning.

Being able to reach this realm means that you are already very powerful, but there are still many things to learn because FPGAs often have to interact with CPUs, which means that you often have to communicate with software engineers, so you also need to understand software knowledge. Such as ARM (Xilinx ZYNQ and Altera's SOC will use ARM's hard core, please refer to this blog "how to learn embedded software"), DSP, Linux, Android, host computer (QT, C#, JAVA) can learn For a moment, there is no end to learning.

Eleven, other issues.

a. Why is it not recommended to learn soft cores such as NIOS II and MicroBlaze?


1, the cost performance is not high, the general soft-core performance is probably similar with the Cortex M3 or M4, so expensive to use FPGA to do a general-performance CPU, in engineering is very uneconomical. It is better to add another M3.

2. Adding soft cores may affect other logical functions. This is due to the fact that resources are not sufficient and soft cores are added, making layout and wiring difficult.

3, soft core is not open source, when the Bug, it is not easy to debug.

4, rarely used in engineering, is likely to be sent to use.

b. Why is it not recommended to learn basic ZYNQ or SOC?

1, easy to make people have different psychological. Consensual psychology refers to a person who, by exaggerating the excellence of a person who has a close relationship with himself, conceals and compensates for his own deficiencies in this aspect, thereby obtaining a psychological balance. I'm learning a lot of things myself and then I feel very powerful, but it's just an illusion.

2. Beginners should learn as simple as possible, either concentrate on learning ARM or concentrate on learning FPGA. This is more likely to have a sense of accomplishment and increase confidence.

3, ZYNQ and SOC applications are not widely used, there are many people have not heard of this kind of thing, leading to job hunting.

4, development tools, long compilation time, wasting more time.

5, the vast majority of work, are only responsible for one aspect, that is to say, on the other hand, is likely to be of no use.

c. Why are there so many IP cores still need to write HDL?

1, ask this kind of question, it is student generally, they have not made the product, have not encountered engineering problem.

2, IP core is not a panacea, can not meet all needs.

3. Minimize the use of closed-source IP cores. Once a problem arises, this black box is likely to make the product difficult to produce.

4. In-depth understanding of the bottom level, you can better use the high level. This rule can apply to all programming languages.

Talk to you today, everyone, come on.

Portable Power Station

portable charging power station 80000 mAh Portable Power Station portable power station 300w

with LED Light 1000W Digital Display Multifunctional Portable Power Station Fast Charging Power Bank

Portable Power station 800W 1000W 5000W

Boluo Xurong Electronics Co., Ltd. , https://www.greenleaf-pc.com