The combination of CPU, GPU and FPGA capabilities is the future of chips!

Many fans ask me, how about FPGA in embedded direction? What’s the income like?

preface

Before we talk about FPGA, let’s talk about zte’s sanctions.

Former U.S. President Donald Trump issued a ban on SALES of FPGA chips to ZTE by any U.S. or foreign company because zte violated a U.S. regulation.At this time, there will be young people who say, I have seen the domestic production of FPGA chip, but also used it. When confronted with this kind of criticism, I usually say: You’re right!

Then ZTE had no choice but to compromise, and the United States sent people to ZTE and signed some agreements. In the end, the original relationship was restored.

Want to know CPU, GPU, FPGA three ability sum is chip future!

FPGA threshold is unparalleled in the chip industry.

FPGA is a skill cluster industry, without solid skill foundation, it is difficult to create competitive products.

Ok, let’s introduce what FPGA is!

What is FPGA?

FPGA is a hardware reconfigurable architecture. Its full English name isField Programmable Gate ArrayThe Chinese name isField programmable gate array.

An FPGA is a chip that can be programmed to change its internal structure. Fpgas have been used for years as a small-volume replacement for dedicated chips (asics),

At the same time, it is also deployed in the data centers of Microsoft, Baidu and other companies on a large scale to provide both powerful computing power and enough flexibility.

Before fpGas, to implement a design idea for a new computing architecture,

An ASIC had to be developed as a prototype, with many bulky ics installed on the panel.

However, unlike these approaches, which require significant cost and effort, once a user has created a prototype board with multiple FPgas, the new architecture of your design can be run immediately.

It is also easy to modify and change specifications.

You know, the price of flow is not low!

As a result, a lot of new architectures were created and as a result, research on reconfigurable processors and new FPGA architectures began to flourish,

Since then, FPGA has been widely praised for its flexibility and applicability in the field of communication/image processing, and has been applied to routers and other devices in communication networks.

In contrast to the concept of ASIC, the concept of FPGA is to enable users to get the desired logic in a short time at low cost.

Xilinx Company

Programmable FPGA technology was invented by Xilinx company of The United States in the early 1980s.

Xilinx first launched the commercial product “XC2000” in 1985.

Over the past 40 years, there have been more than 60 companies engaged in the DEVELOPMENT of FPGA technology and products.

Including Intel, IBM, AMD, TI, GE, AT&T, MOTOROLA, Lucent, Samsung, Toshiba, Philips and other powerful large companies,

But most fail after spending hundreds of millions of dollars!

Europe, Japan, South Korea and other economic powers and China’s Taiwan and other regions have not really mastered its core technology.

Two, FPGA application scenarios

FPGA is a small field in the large integrated circuit industry, 5G and AI provide certainty for the growth of the industry, and the growth of the home-made substitute superposition industry, and the home-made FPGA market is about to take off.

Scale Trend and future forecast of global FPGA market:

With the help of 5G, autonomous driving, AI, FPGA demand is still gradually increasing, the future space is still very large.

1. Communications.

In the field of communication, high-speed communication protocol processing is needed. On the other hand, the communication protocol is always changing, so it is not suitable for special chips. Therefore, FPGA with flexible functions has become the first choice

The telecom industry has been making heavy use of FPGas. Telecommunications standards are constantly changing and it is very difficult to build telecommunications equipment, so the company that provides telecommunications solutions first tends to capture the largest market share. Because ASics take a long time to build, FPGas offer opportunities for shortcuts. The first versions of telecom equipment started using FPGas, which led to FPGA price conflicts. While the price of FPGas is irrelevant to the ASIC simulation market, the price of telecom chips is. Many years ago, AT&T and Lucent made their own FPgas called ORCA (Optimized Reconfigurable Cell Array), but they weren’t competitive with Xilinx or Altera in terms of speed or size of silicon wafers.

2. Algorithm field.

FPGA has a strong ability to deal with complex signals and can process multi-dimensional signals.

3. Embedded domain.

Using FPGA to build an embedded underlying environment, and then write some embedded software on this, transactional operation is more complex, less to FPGA operation.

4, in the field of security monitoring

At present, CPU is difficult to do multi-channel processing and only detection and analysis, but with FPGA, it can be easily solved, especially in the field of graphics algorithm has unique advantages.

5. In industrial automation

FPGA can achieve multi-channel motor control. At present, motor power consumption occupies the majority of global energy consumption. Under the trend of energy conservation and environmental protection, all kinds of precise control motors will be adopted in the future, and a single FPGA can control a large number of motors.

Third, the company

FPGA has been monopolized by four giants Xilinx, Altera, Lattice and Microsemi for many years.

And some small companies are barely surviving between the cracks.

Xilinx(Xilinx) is the world’s leading supplier of programmable logic complete solutions. Xilinx develops, manufactures, and markets a wide range of advanced integrated circuits, software design tools, and IP cores as predefined system-level functions.

The foreign triumvirate accounts for 90% of the global market, with domestic manufacturers lagging behind.

The FPGA market presents a duopoly pattern, Xilinx and Altera occupy 56% and 31% of the global market respectively.

In China’s FPGA market, accounted for 52% and 28%,

Due to the barriers in technology, capital and talent and the economies of scale brought by FPGA mass production, the industry leader is relatively stable.

Domestic manufacturers currently account for about 4% of the Chinese market. In the future, with technological breakthroughs made by domestic manufacturers,

The FPGA field of domestic replacement or will be tens of billions of opportunities, the replacement space is broad.

Altera is currently being acquired by Intel, and AMD is in the process of acquiring Syris, which is expected to be completed by the end of 2021.

China FPGA Company

  • 1. Jili: second venture, aiming at the edge of AI cloud
  • 2. Shanghai Solog: From compilation software to ecological chain
  • 3. Guangdong Gaoyun: 28nm medium-high density FPGA
  • 4. Shenzhen Unisplendour Co – creation: High-performance FPGA has been mass-produced for commercial use
  • 5. Xi ‘an Zhi Duo Jing: Xiaomi is the fourth largest shareholder
  • 6, Shanghai Anlu Technology: 28nm batch supply this year
  • Chengdu Huawei Technology: from the national “909” project
  • 8. Shanghai Fudan Microelectronics: Ultra large scale 100 million gate FPGA

Five, the IP core

The most important concept of FPGA is IP core.

Intelligent Property (IP) core is the general name of integrated circuit core with intellectual Property core. It is a macro module with specific functions that has been verified repeatedly. It has nothing to do with chip manufacturing process and can be transplanted into different semiconductor process.

If you don’t, think of it as a software module, or a building block.

For example, Silas has designed UDP core, PCIE xDMA core and UART core based on FPGA. We just need to add others’ core to our project, which is equivalent to supporting this function with our board.

For FPGA development software, the richer the IP core it provides, the more convenient the user’s design will be, and the higher its market occupancy rate will be.

In a word: IP cores are valuable!

Language and examples

Talk is cheap, show you code!

Let’s take an example

Here we use Verilog to implement carry ahead adder:

Example 1: the generation principle of carry ahead signal

Ab =1 --> co =1 A +b =1 and CI =1 --> co =1 Carry output co(I) can represent the bits coi= AIbi +(ai+bi)(cii) Write the logical expressions of the I's and S (I) from the truth table of the total adder: Si = AIbi 'cii' + AI 'bicii' + AI 'bi' cii+(ai+bi)cii: si= AI ⊕ BI ⊕ciiCopy the code

Code:

module carry_look_aheadadder( output [3:0] s, output co, input [3:0] a, input [3:0] b, input ci ); wire [3:0] co_tmp; wire [3:0] cin; assign cin[3:0] = {co_tmp[2:0],ci}; / / calculate the middle carry the assign co_tmp [0] = [0] a [0] & b | | (a [0] | | b [0]) & (cin [0]). assign co_tmp[1] = a[1]&b[1] || (a[1] || b[1])&(cin[1]); assign co_tmp[2] = a[2]&b[2] || (a[2] || b[2])&(cin[2]); assign co_tmp[3] = a[3]&b[3] || (a[3] || b[3])&(cin[3]); // Assign s[0] = a[0] ^ b[0] ^ cin[0]; assign s[1] = a[1] ^ b[1] ^ cin[1]; assign s[2] = a[2] ^ b[2] ^ cin[2]; assign s[3] = a[3] ^ b[3] ^ cin[3]; assign co = co_tmp[3]; endmoduleCopy the code
module carry_look_aheadadder_tb;
wire      [3:0]       s;
wire                  co;
reg       [3:0]       a;
reg       [3:0]       b;
reg                   ci;

initial
begin
          a = 4'b0000; b = 4'b0000; ci = 0; 
    #10 a = 4'b1111; b = 4'b1111; ci = 0;
    #10 a = 4'b1100; b = 4'b1001; ci = 0;
    #10 a = 4'b0111; b = 4'b0110; ci = 0;
    #10 a = 4'b0101; b = 4'b0101; ci = 1;
    #10 a = 4'b1110; b = 4'b1001; ci = 1;
    #10 a = 4'b0010; b = 4'b0110; ci = 1;
    #10 a = 4'b0110; b = 4'b1100; ci = 1;
    #10 $finish;
end

initial begin
  $fsdbDumpfile("test.fsdb");
  $fsdbDumpvars(a); end carry_look_aheadadder u_carry_look_aheadadder( .s(s), .co(co), .a(a), .b(b), .ci(ci) ); endmoduleCopy the code

Results:

As you can see, this is quite different from normal high-level languages.

Learning FPGA must have a strong hardware circuit foundation.

Example 2:

The above is a LATTICE FPGA architecture. You can think of it as a hardware circuit board full of electronic components. The components on the “circuit board” include IIC and SPI core interface “devices”, NVCM program storage “devices”, RAM data storage “devices”, and the smallest unit LUT (lookup table) devices.

Generally, FPGA engineers will use hardware description language Verilog or VHDL to “program” FPGA, and then through the synthesis, layout and wiring of FPGA development tools provided by the manufacturer (Diamond, Radiant, Vivado), a bit file or bin file will be generated.

If the engineer downloads the resulting bit file or bin file to the FPGA, it is equivalent to a hardware engineer wiring the FPGA chip on the “circuit board” where “components” have been placed. (That is, connecting unrelated devices with copper wire)

After downloading the program FPGA, we can not simply call it “circuit board”.

For example, the FPGA realizes the function of SPI to parallel port, so this FPGA can be called “SPI interface conversion board”.

Of course, an FPGA and a “circuit board” are different after all, and an FPGA can be programmed repeatedly, the equivalent of a circuit board that can be wired repeatedly.

Why is the efficiency so high?

1. The difference between FPGA and GPU is essentially the difference of architecture

CPU and GPU belong to von Neumann structure, instruction decoding and execution, shared memory.

FPGA is essentially an instruction – free, shared memory – free architecture.

  1. Differences between CPU and FPGA (instructions) :

CPU structure – with instructions: In the Fung structure, since the execution unit (such as the CPU core) may execute arbitrary instructions, it is necessary to have instruction memory, decoder, arithmetic unit for various instructions, branch jump processing logic. Since the control logic of instruction stream is complex, it is impossible to have too many independent instruction streams, so THE GPU uses SIMD (single instruction stream multiple data streams) to allow multiple execution units to process different data at the same pace, and the CPU also supports SIMD instructions. FPGA architecture — No instructions: The functionality of each logical unit of the FPGA is determined during reprogramming (burning) and no instructions are required.

  1. Difference between CPU and FPGA (memory)

CPU architecture – Quorum vs. Shared memory: The Fung architecture uses memory for two purposes. One is to preserve state, and the other is to communicate between execution units. Since memory is shared, access arbitration is required. To take advantage of access locality, each execution unit has a private cache, which is required to maintain cache consistency across execution components.

FPGA architecture — No quorum and shared memory: Registers and on-chip memory (BRAM) in FPGA belong to their own control logic for state preservation, without unnecessary quorum and caching. For communication requirements, the connection between each FPGA logic unit and surrounding logic units has been determined in reprogramming (burn), and there is no need to communicate through shared memory.

Fpgas have both pipeline parallelism and data parallelism, while Gpus have almost only data parallelism (pipeline depth is limited).

  1. FPGA pipeline and data parallel processing:

For example, there are 10 steps to process a data packet. FPGA can build a 10-level pipeline. Different levels of the pipeline process different data packets, and each packet is processed after passing through 10 levels. As soon as a packet is processed, it is output.

  1. GPU data parallel processing:

The data parallelism method of GPU is to make 10 computing units, each of which is also processing different data packets.

However, all computing units must follow a uniform pace and do the same thing (SIMD, Single Instruction Multiple Data).

This requires that 10 packets must be input and output at the same time, and the input and output delay increases.

In a word, many algorithms need a lot of instructions to complete if they are implemented with pure software. If they are implemented with FPGA, they only need to be completed in a limited number of clock cycles, and the speed is not half a dozen.

Eight, income,

FPGA is widely used in military products. Basically, any product involving wireless communication will involve FPGA development.

Especially in universities, the application is very wide, this field, especially easy to publish papers (doctoral thesis)

There are other areas that are small companies, industrial robotics, 3D imaging, naked eye 3D companies, LED splicing screen companies,

Communication field is used more, but also some big data, for example, Tencent and Baidu also have similar positions to do data mining

Eqijun conveniently intercepted the FPGA post information in Nanjing, Shanghai and Shenzhen released by an APP.

So the average income is 20,000 to 50,000,

Compared to Internet oligarchs making millions a year,

It doesn’t compare to financial income,

As a whole, it’s just right!

Compared with the software industry, which has a lower salary but longer experience,

The salary will be very high, the older the more powerful, later than the software salary.

Yijun once communicated with the technical staff of Loongson, and the mainstay of them were all from FPGA!