"FPGA full Step---Practical Walkthrough" first chapter of how to learn FPGA

Source: Internet
Author: User

For many beginners, most of them are anxious, cooked do not know the more anxious, eventually the more learn nothing, end empty-handed, to learn FPGA, must understand some of the nature of the FPGA content.

1.FPGA internal structure and basic principles

FPGAs can be programmed, and it is important to understand why FPGAs are programmable by understanding the internal structure of the FPGA. Learning FPGAs can not be like learning other CPU chips, see Verilog or vhdl like to see C language or other software programming language. One of the reading, the analysis of the strips. To break through the idea of software programming.

So why can FPGAs be "programmed"? First come to know what is called "Cheng". The revelation "Cheng" is just a bunch of 01 coding with a certain meaning. Programming, in fact, is to write these 01 encodings. But we now have a lot of development tools, usually not directly write these 01 encodings, but rather in the form of high-level language, and finally by the development tools to convert to this 01 encoding. For software programming, the processor will have a dedicated decoding circuit that translates these 01 codes into a variety of control signals, and then controls the internal circuitry to complete one operation or another. So the software is a one-piece read, because the operation of the software is done step-by-step. And the FPGA's programmable, the essence also relies on these 01 codes realizes its function change, but the difference is the FPGA can complete the different function, does not rely on like the software to translate 01 encoding to control an arithmetic circuit, the FPGA does not have these things. Figure 1.5 is the internal structure of the Cyclone IV chip.

Figure 1.5 Cyclone IV internal structure

The FPGA's internal main three blocks: Programmable logic unit, programmable wiring and programmable IO module. What is a programmable logic unit? The basic structure of some kind of memory (SRAM, flash, etc.) made of 4 input or 6 input 1 output ground "truth table" plus a D trigger composition. Any one 4 input 1 output combinational logic circuit, there is a corresponding "truth table", the same if using such a memory made of 4 input 1 output "truth table", only need to modify its "truth table" internal value can be equivalent to any 4 input 1 output combination logic. What are these "truth table" internal values? That's the 01 code. What if I want to implement a sequential logic circuit? This is no D flip-flop, any timing logic can be converted to a combined logic +d trigger to complete. But this only achieves 4 input 1 output logic circuit, usually the size of the logic circuit that is quite large oh. What about that? This is the time to use a programmable connection. There are many link points with memory control on these connections, which can be determined by rewriting the corresponding memory values to determine which lines are connected and which are disconnected. This allows the combination of many programmable logic units to form large logic circuits. The last is the programmable Io, which is actually the FPGA as a chip-level use must pay attention to. Any chip must have an input pin and an output pin. Programmable IO can optionally define a non-dedicated pin (the FPGA has a dedicated non-user-available test, download pin) for input or output, and the level standard for IO can be set. always in a word, FPGAs are programmable because they can be made into a "truth table" with a special 01 code and combine these "truth tables" to achieve large-scale logical functions . Figure 1.6 is the FPGA interior of the Cyclone IV le. Without understanding the internal structure of the FPGA, you cannot understand how the final code changes into the FPGA. It is not possible to gain insight into how the FPGA can be fully utilized. Now the FPGA, not only the front of the three block, there are many dedicated hardware functional units, how to use these units to achieve complex logic circuit design, from the novice to master the road must be overcome obstacles. And all of this, we must start with understanding the FPGA internal logic and its working principle.

Figure 1.6 Le structure of cyclone

2. Correctly understand the VERILOG/VHDL language and the relationship with the hardware structure

The full name of the HDL language is: Hardware Description Language, notice the word Description, not design. Why use the word description instead of design? Because HDL is really not used to design hardware, it's only used to describe hardware. The description of the word accurately reflects the nature of the HDL language, which is just a textual representation of a known hardware circuit, and only describes the future of the circuit in the form of text. Before writing the language, the hardware circuit should have been designed. Language is simply the conversion of this design into a form of literal expression. But a lot of people do not understand, since the hardware has been designed out, directly take to the production department is over, why also to convert to text expression form and then through the EDA tool these cumbersome flow? In fact, this is a lot of beginners do not understand the design of the abstract level of the problem, any design including what clothing, machinery, advertising design has an abstract level of the problem. Take the advertising design, the original design may be a concept, design this concept is also an idea, from the end of the advertising is still very far. Hardware design also has different levels of abstraction, each level needs to be designed.

The highest level of abstraction is the algorithm level, followed by the architecture level, the Register transport level, the gate level, the physical layout level. The advantage of using HDL is that we have designed a register transfer level of the circuit, then the HDL described later into the form of text, the remaining to a lower level of conversion can let EDA tools to do, which greatly reduces the workload. This is the concept of synthesis, that is, the description of the hardware unit at this level of abstraction can be understood by EDA tools and converted to the underlying gate-level circuit or other structure of the circuit. In FPGA design, it is to describe this abstract level of opinion as HDL language, it can be transformed into FPGA internal logic function realization form through FPGA development software.

HDL can also describe a higher level of abstraction such as an algorithmic or architectural level, but currently limited by the development of EDA software, EDA software can not understand such a high level of abstraction, so HDL describes such a level of abstraction can not be converted to a lower level of abstraction, which is called non-synthesis. So in reading or writing HDL language, especially the synthesis of HDL, should not see the language itself, but to see the language behind the corresponding hardware circuit structure. If you see the HDL is always a line of code, then this person will never get rid of the rookie's fate. If one day the code is no longer a line of code but a piece of hardware module, then congratulations out of the rookie level, into the bird level of not so dish.

3. Apply

The FPGA itself is nothing, it's all outside the FPGA. This is probably the most difficult to understand the novice FPGA. Who is the FPGA for? Many schools are explained to students majoring in microelectronics or integrated circuit design, in fact, this is just a lot of schools are limited by the funds, not to sell professional integrated circuit design tools and use FPGA tools instead. In fact, the FPGA is for the design of electronic systems engineers use. These engineers usually use the existing chips together to complete an electronic device, such as base station, set-top box, video surveillance equipment. When the existing chip can not meet the requirements of the system, it is necessary to use FPGA to quickly define a chip that can be used.

Previously said, the FPGA can not be some "truth table", triggers, various connections and some hardware resources, electronic system engineers use FPGA design is nothing but to consider how to combine these resources to achieve a certain logical function, It doesn't have to be like an IC design engineer to always be concerned about whether the chip can be manufactured in the end. In essence, there is no difference between using an existing chipset to synthesize different electronic systems, just to focus on the underlying resources. To use the FPGA is still simple, because it is nothing more than those resources, in understanding the front two points and then make a test board, run the experiment, do something simple is possible. And really want to use the FPGA, that light understanding point FPGA knowledge is far from enough. Because ultimately, how to combine the resources within the FPGA and what functions are needed to meet the needs of the system, you need to know more and more extensive knowledge.

For the digital circuits and analog circuits we have learned, if even the most basic knowledge of digital logic is problematic, the desire to learn FPGA is just a castle in the ground. If you can not know the digital logic knowledge in the heart, develop good design habits, learning FPGA to the end is still mirrors water in the moon, is always an empty.

"FPGA full Step---Practical Walkthrough" first chapter of how to learn FPGA

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.