On June 6, 2022, under the guidance of the network security industry development center of the Ministry of industry and information technology, the "2022 loongarch ecological development and Tongming Lake innovation and Application Forum" was held online, which was jointly hosted by the National Information Technology Park of Beijing Economic Development Zone and Longxin Zhongke. At the meeting, Loongson launched Loongson 3c5000 server processor and jointly released a new generation of domestic server basic software and hardware platform with ecological partners.
Overcome the slave mentality and be your own command system
In recent years, with the national attention and support, domestic CPUs have also ushered in rapid development. Huawei, Feiteng, haiguang, Zhaoxin, Longxin and Shenwei are among the few domestic CPU manufacturers in China. However, Huawei, Feiteng, haiguang, Zhaoxin, Longxin and Shenwei all chose to use the relatively mature CPU instruction set architecture previously, whether for independent control, commercialization or ecological considerations.
For example, Huawei and Feiteng both choose to develop their own CPUs based on armv8 instruction set architecture authorization of arm company; Haiguang and Zhaoxin respectively established joint ventures with AMD and via to obtain x86 instruction set authorization to develop their own CPUs; Godson was originally based on MIPS instructions, while Shenwei was based on alpha instruction set.
Up to now, x86 and arm instruction set architectures are still the two most mainstream instruction set architectures, while MIPs, alpha, SPARC, power and other instruction set architectures have declined. In addition, there are also emerging new instruction set architectures, such as the familiar open source risc-v. at present, many chip manufacturers in China are developing their own CPUs based on risc-v instruction set architecture. Selecting the existing open-source or open authorization CPU instruction set architecture means that there is no need to start from scratch. On the basis of meeting certain domestic independent and controllable requirements, the existing software and hardware ecology can be used to develop rapidly.
However, in the view of huweiwu, chairman of Loongson Zhongke, whether x86, arm, risc-v, or the MISP instruction set architecture previously adopted by Loongson, there are uncontrollable risks in the instruction set architecture of foreign countries, especially in the context of the US trade war and science and technology war against China. Especially for the information innovation industry with higher requirements for self-control, if the CPU based on foreign instruction set architecture is adopted, it is still difficult to change the situation that the core technology is controlled by others.
For example, in recent years, due to the pressure of the United States on the domestic chip industry, Huawei, Feiteng, haiguang, Shenwei and other domestic CPU manufacturers have been listed in the entity list by the U.S. Department of Commerce, which also restricts their authorization to obtain the new instruction set architecture. For example, the latest armv9 architecture of arm has not been authorized by any domestic manufacturer so far.
"Instruction system, basic industry (process materials and equipment) It is the two most important cornerstones of the information industry. The information industry based on foreign instruction systems cannot support the great rejuvenation of the Chinese nation. We Chinese can write articles in English, but it is impossible to develop our own national culture based on English. Similarly, we Chinese can also use foreign command systems to make products, but we can't expect to use foreign command systems to make our own ecology. " Huweiwu frankly said that the development of Godson over the years is a vivid example, "It's OK to be an attendant, but it's impossible to surpass. Godson CPU used to have the highest performance in MIPS architecture. In terms of software ecology, Godson is also slowly becoming the leader in MIPS field, but MISP doesn't think it's allowed for Godson to surpass them. Servant girls are still servant girls with a generation of child keys. Therefore, we need to overcome the slave mentality and make our own instruction system."
Huweiwu, chairman of Longxin Zhongke
Huweiwu further pointed out: "I often hear people in the market say that Godson's independent instruction set architecture chip is not good, not as good as x86 and arm. It is the x86 and arm instruction set architecture that is the mainstream of the market. How can Godson have done x86 and arm? This is a kind of slave mentality, and we should overcome this kind of slave mentality."
Loongarch is becoming a top-level open source ecosystem alongside x86/arm
In fact, whether the CPU instruction system needs independent research and development was discussed many years ago. It has been at least 15 years now. Independent research and development has the advantages of independent research and development, but the biggest problem lies in ecological construction. The advantage of adopting or compatible with foreign instruction sets is that it can directly share the software and hardware ecology of the existing foreign instruction sets. After 20 years, Godson chose to be independent and compatible.
In April, 2021, loongarch, an independent instruction system architecture, was officially released by Godson. While fully autonomous and controllable, loongarch's instruction set is also compatible with a variety of international mainstream instruction systems.
Huweiwu said that in order to be fully autonomous and compatible, we need the ten basic software capabilities of "2 + 3 + 3 + 2". Namely, two core software: BIOS and operating system kernel (including driver and virtualization); Three compilers: GCC, llvm and golang; Three virtual machines: Java, JavaScript NET; Two binary translation systems: x86 and arm. "We should not only build our own software ecosystem vertically, but also connect x86 and arm horizontally."
"The loongarch instruction system is becoming an international mainstream instruction system like x86 and arm. It will open source in the future, but it is different from risc-v. the open source of risc-v is dominated by Americans, and our loongarch open source is our own open source instruction system. Although some independently developed instruction systems in China have failed in the past, I believe our loongarch can succeed." Huweiwu said.
It is reported that loongarch architecture has been widely recognized and supported by the international open source software community, and has applied to the GNU organization for ELF machine number (No. 258), I.e. "ID card" of loongarch "; the Linux kernel community version will also continue to support loongarch CPUs and Bridge chips. Basic tools such as binutils and GDB have implemented native support for loongarch, and the ACPI international standard has included support for loongarch architecture features; GCC has implemented native support for loongarch architecture, and llvm and go have initially implemented native community support for loongarch architecture; loongarch has worked closely with.Net, V8, Mozilla and other communities to implement Java, JavaScript Net.
Godson 3c5000 server processor release: 16 core performance is comparable to arm 64 core processor
In July, 2021, Godson officially released the first Godson 3a5000 processor chip based on the independently developed instruction system loongarch, which achieved a significant leap in performance, representing the latest milestone in China's independent CPU design field.
As the first Godson 3a5000 processor based on loongarch instruction set system, its main frequency is 2.3ghz-2.5ghz, including 4 processor cores. Each processor core adopts 64 bit superscalar gs464v autonomous micro structure, including 4 fixed-point units, 2 256 bit vector operation units and 2 memory access units. Godson 3a5000 integrates two 64 bit ddr4-3200 controllers that support ECC verification and four HyperTransport 3.0 controllers that support multiprocessor data consistency. Godson 3a5000 supports fine power management functions such as dynamic clock shutdown of main modules, dynamic frequency conversion in main clock domain and dynamic voltage regulation in main voltage domain.
According to the test results of the domestic third-party testing institutions published by Godson Zhongke, the fixed-point and floating-point single core base scores of Godson 3a5000 processor running spec cpu2006 in GCC compilation environment are above 26 points, and the four core scores are above 80 points. The UnixBench single thread score of Godson 3a5000 desktop system based on the domestic operating system is more than 1700 points, and the four thread score is more than 4200 points. The above test scores have approached the level of mainstream desktop CPUs in the market and are in a leading position among domestic desktop CPUs.
Compared with the previous generation of Godson 3a4000 processor, Godson 3a5000 processor has improved performance by more than 50% and reduced power consumption by more than 30% on the basis of maintaining pin compatibility.
According to Zhang Ge, vice president of Loongson Zhongke, the Loongson 3c5000 series released this time is a high-performance general-purpose processor that loongarch, a brand-new loongarch autonomous instruction system, has the characteristics of super computing power and excellent performance, and can meet the computing needs of the cloud computing center of the large-scale general computing data center.
Zhangge, vice president of Longxin Zhongke
In terms of chip design, Godson 3c5000 integrates four 3a5000 silicon chips through packaging to form a 16 core processor, focusing on optimizing the multi-core and multi-channel interconnection efficiency. The UnixBench score of a single chip is more than 9500, and the double precision computing capacity reaches 560gflops. The peak performance of the 16 core processor is equivalent to that of the typical arm 64 core processor, and supports up to 16 channels of interconnection. With the new generation of Godson 7a2000 bridge chips, the PCIe throughput bandwidth is more than 400% higher than that of the previous generation. It can meet the computing needs of general computing, large data centers and cloud computing centers.
In addition, through the chip level security mechanism, Godson 3c5000 can provide CPU level endogenous support for ISO 2.0, trusted computing, national secret algorithm substitution, network security vulnerability protection, etc.
The main contradiction of Godson at this stage: application ecology
Throughout the development of Godson CPU, huweiwu believes that it can be divided into three stages:
Before 2019, the main contradiction faced by Godson is insufficient CPU performance. For example, from 2013 to 2015, the general processing performance of Godson's first generation products (3a1000 and 3b1500) was only 1/10 of that of the mainstream products in the market, and then the second generation products (3a2000 and 3a3000) were launched in 2016-2018. The performance of the 3a3000 was four times that of the 3a1000, which solved the stability problem of the interface between the operating system and the hardware and reached basic availability.
From 2019 to 2021, Godson launched the third generation products (3a4000, 3a5000, 3c5000). In particular, the 3a5000 performance of the independent loongarch instruction set has reached three times that of the 3a3000. Compared with the previous generation of 3a4000, the performance has also been improved by more than 50%, and the power consumption has been reduced by more than 30%, which is close to the level of mainstream products in the market and has reached the level of ease of use.
However, the supporting domestic operating system became the main contradiction faced by Godson at that time. At that time, many "small and scattered" domestic operating system development teams gradually integrated into two domestic operating system teams, Tongxin and Qilin, each with a scale of 2000-3000 people. In this process, Godson needs to solve the compatibility problem between the operating system and the hardware, and eliminate the "explosion" of the combination of the operating system and hardware.
"There was a time when each operating system was adapted to each complete machine. Now we have an operating system. No matter whose complete machine is installed, for example, as long as Godson CPU is installed, it can run." Huweiwu said.
With the launch of the 3a5000 series of the independent loongarch instruction set, Godson will also launch the fourth generation products (3a6000 and 3a7000), which will reach the level of mainstream products in the market at that time.
According to huweiwu, the 3a6000 will adopt the same sanctions process (12NM) as the 3a5000, and the performance will be improved mainly through design optimization. Based on the simulation results, the fixed-point / floating-point base score (GCC) of the 3a6000 processor single core spec CPU 2006 will be increased from 26/28 to 35/45, and the stream bandwidth (peak 51.2gbps) of the dual DDR4 will also be increased from 25gbps to 38gbps.
With the continuous improvement of Godson CPU performance, the main contradiction of Godson technology platform has also begun to turn to application ecology since 2022. The focus of Godson basic software has also shifted from the combination of operating system and hardware to the combination of operating system and application.
Three measures to build loongarch application ecology
In this regard, Godson has taken three measures: one is to consolidate the foundation; Second, it is widely compatible, not only with Linux, but also with X86 and arm; Third, develop independent applications to form an independent programming framework and programming language.
For this reason, in addition to continuing to cooperate with domestic operating system manufacturers such as Tongxin and Kirin, Godson has also launched loongnix and loongos for information applications, industrial control and terminal applications respectively.
Godson has also completed the construction of loongarch basic software system (LBF), which can natively support all mainstream basic software and application environments of Linux. That is to say, on the Linux platform, there are x86 and arm, as well as Godson.
Of course, the openness of the Linux platform has also caused many application compatibility problems, including incompatible packaging formats, incompatible API environments, incompatibility caused by kernel upgrades, and so on. To solve this problem, Godson has launched the Godson application compatibility framework (LCF) to achieve cross Linux application compatibility.
In order to be compatible with various x86 and arm applications, Godson has also launched its own x86 architecture translation system (latx) and arm architecture translation system. Huweiwu said that many core technologies need to be used here: first, some x86 and arm functions must be added to the loongarch instruction, so that the translation can be efficient; Secondly, we should build an efficient binary translator from x86 architecture to loongarch architecture; Third, simulate windows Environment.
It is reported that Godson is advancing at the pace of "3 + 10 + X" in terms of compatibility with x86/windows applications. "3" refers to windows printers (many printer drivers on Linux platform do not exist), ie compatible browsers Net virtual machine; "10" refers to 10 common basic applications.
Huweiwu said: "in accordance with the rhythm of 3 + 10 + X, we should first do a good job in compatibility, secondly optimize the performance, and finally do a good job in the whole common platform. I think maybe 3 + 10 can be done well this year, and we can do X well next year."
In addition, in order to solve the browser problems often encountered by some users in the Linux and windows ecosystem, Godson also launched its own ie compatible Godson browser. For example, a large number of historical applications (various web page elements and plug-ins) developed based on ie/windows system cannot run on current chrome and other browsers. For example, many users will encounter similar problems when logging in to online banking. Godson browser is compatible with IE through key technologies such as plug-in compatibility technology, binary translation, web element compatibility transcoding, etc.
Huweiwu proudly said: "I believe that on the global Linux platform, only Godson browser can successfully log in to our online banks. Therefore, I often say that ecology is made, not followed. It does not mean that I am compatible with X86. My ecology is certainly good, because people's ecology is not necessarily good."
Finally, with regard to the endless migration and adaptation of complete products of independent CPUs and operating systems in the domestic information innovation field, Godson is also promoting the establishment of independent programming framework and programming language.
Huweiwu pointed out that the complete products of independent CPUs and domestic operating systems need endless migration and adaptation because the applications running on them are written based on foreign programming frameworks. However, there is no adaptation problem for windows, Android and IOS platforms, because they have their own programming framework.
Huweiwu emphasized that autonomous instruction system + autonomous programming framework is the base of autonomous software ecology. Autonomous programming framework is an important feature of autonomous operating system. The current domestic operating systems are not autonomous operating systems in the true sense, but independent distribution versions of open source operating systems. App developers can completely solve the endless adaptation problem by using the independent programming framework.
To solve this problem, Godson plans to launch its own Loongson application development framework (LDF). It is reported that Godson is currently investigating the characteristics of windows, IOS and Android programming frameworks to form Godson's independent programming framework and strive to launch it in 2023/2024.
"After 20 years of development, Godson will basically complete supplementary courses for its own CPU and OS by 2021, and the application software ecology of its own CPU is becoming better and better. During the 14th Five Year Plan period, Godson will strive to complete 'three transformations': the transformation from technology' supplementary courses' to ecological construction; the transformation from policy market to open market; and the transformation from the 'Kingdom of necessity' of follow-up development to the 'Kingdom of freedom' of independent development." Huweiwu concluded.