Is the switch of MIPS to RISC-V the beginning of Godson’s new journey?

Last week, EDN reported on MIPS Technologies’ announcement that it would abandon the design of MIPS processors in favor of RISC-V. Details “MIPS switched to the RISC-V camp, how did one of the three major chip architectures in the world go down the altar? 》

After MIPS joined the RISC-V camp, some people advocated that Godson should be finished, but in fact, this is completely speculation without understanding the specific situation of Godson. Especially after Loongson developed the independent instruction set LoongArch, it has embarked on the road of independence and autonomy in the instruction set. Tie Liu believes that MIPS’ investment in RISC-V is the beginning of a new journey for Godson.

MIPS’ investment in RISC-V has no effect on Godson

After MIPS joined the RISC-V camp, some people advocated that Godson should be finished, but in fact, this is completely a speculation without understanding the specific situation of Godson. It is to apply the situation of CPU companies of the ARM camp to Godson.

Because MIPS has a strong academic style, it is relatively open in terms of technical authorization. On the one hand, the openness of technology makes MIPS popular among academics, and many universities still use MIPS for teaching. On the other hand, customers can freely add instruction sets, which directly leads to the ecological fragmentation of MIPS.

ARM is more open in business, but it is very strict in technology. In the ARM32 era, ARM has only authorized the ARM32 instruction set to no more than 5 companies such as Apple and Qualcomm, and customers are prohibited from modifying and adding instructions. It is an IP core license. It is true that ARM64 is much more open than ARM32 in terms of licensing, but the price is extremely expensive, and there are many additional terms, such as the scope of use is limited to the server CPU, the prohibition of modifying and adding instructions, and so on. ARM is more conservative than MIPS in terms of technology licensing, but it is precisely this conservative measure, such as prohibiting customers from modifying and adding instructions, which enables ARM to avoid the fate of MIPS ecological fragmentation.

At present, the vast majority of ARM chips on the market are the public version of the architecture purchased from ARM, and the mobile phone chips of Qualcomm, MediaTek, Kirin, and Zhanrui are basically IP authorized. Taking Kirin as an example, from the earliest K3 to the latest Kirin 9000, in the past ten years, all the CPU cores of Kirin chips have been purchased from ARM.

Since mobile phone chip manufacturers are highly dependent on ARM on CPU, once they cannot buy ARM’s latest IP, it means falling behind in technical iteration. Taking the Kirin chip as an example, when the U.S. imposed sanctions that year, the BBC broke the news of ARM’s internal documents, saying that ARM had cut off technical cooperation with HW. The Kirin 990 after that continued to use the A76 on the Kirin 980, while the rival chips used the A77. Recently, the Kirin 9000 has used the A77, and competitors have used the A78.

In contrast, Loongson does not have this problem. Since Loongson’s IP has been independently developed from the beginning, it has developed several generations of CPUs such as GS132, GS132e, GS232, GS232e/GS264, GS464, GS464e, GS464V after 20 years. core, as well as some minor changes that are not officially named (3A2000 and 3A3000 are both based on GS464e, but they are actually two versions, and the IPC has increased by 15%; 3A4000 and 3A5000 are both GS464v in the public information, but in fact even the instruction set They are not the same, they are completely two versions, and the IPC is improved by more than 15%). Based on these CPU cores, dozens of CPUs have been developed. Since Godson has realized the complete independent design of the core IP, Godson does not rely on MIPS IP. Therefore, whether MIPS continues to develop MIPS processors has no effect on Godson. Compared with many ARM camp mobile phone chip manufacturers who need to continue to purchase IP from ARM to ensure technical iteration, Godson does not need to purchase IP cores from MIPS.

Godson’s goal is to be completely autonomous and controllable

In the early days, Loongson designed CPU based on MIPS, and then continued to add instructions. In more than ten years, Loongson added more than 1,000 instructions based on MIPS to form LoongISA. The processors before Loongson 3A4000 were all based on LoongISA.

However, MIPS is an American company after all. Even if MIPS is permanently authorized, there are still unknown risks in the event of an emergency. In addition, MIPS is the first commercial RISC processor. Since it has always maintained backward compatibility, it has accumulated a lot of historical baggage, and many criticized problems have not been modified due to compatibility reasons. In the context of the rapid development of technology, only adding instructions based on MIPS can no longer meet the needs of Godson. Under the dual stimulation of external risk and internal demand, Loongson developed its own instruction set, LoongArch.

Since many people suspected that LoongArch was another MIPS-based magic modification by Godson, Tie Liu deliberately asked a researcher from the Institute of Computing Technology of the Chinese Academy of Sciences for verification, and the reply was “LoongArch custom instruction set, compatible with MIPS through binary translation technology”. The researcher is a supporter of RISC-V and has made great contributions to the promotion of RISC-V in China. Given that this researcher has no interest in Godson, his statement is extremely reliable.

As for the remarks made by some netizens who suspect that LoongArch is Godson’s public relations crisis, in fact, as long as you have a little understanding of Loongson, you can crush this rumor. Because the 3A5000 is designed based on LoongArch, and there are already samples, it will be put on the market in 2021. From determining the new instruction set, to designing a CPU based on the new instructions, to completing the tape-out, it will take a long period of time. It was predicted years ago that MIPS would announce its involvement in RISC-V in March 2021. Obviously, LoongArch is the result of Godson’s long-standing planning, and it is by no means a “mortgage open source” product used by some manufacturers to deal with crisis public relations.

Due to the use of LoongArch, some of the criticized problems of the MIPS instruction set have been completely eliminated. Some Loongson custom instructions are better than MIPS instructions, and the code execution efficiency is higher, so there is a partial (not all better) binary translation. After that, not only there is no performance loss, but the performance is even better than using MIPS directly. To this end, Tie Liu consulted industry professionals, and the reply was that “in the field of binary translation, the post-translation efficiency exceeds 100%, which has precedent.”

A developer told: LoongArch has nothing to do with MIPS. The new instruction set LoongArch basically corresponds to MIPS one-to-one. Currently, loongArch is very mature. After a year of running-in, basically all packages are compiled. The system is the same as our commonly used ubuntu system, apt-get install can be installed, and it does not feel like a new instruction set.

From the initial addition of instructions based on MIPS, to the development of LoongISA based on MIPS, and then to the latest LoongArch, the purpose of Loongson is very clear and obvious, that is to do everything possible to grasp the dominant power and unswervingly follow the road of independence .

3A5000 is a milestone for Loongson to open up instruction set autonomy

In the past few years, neither Imagination nor Wave Computing have invested much resources in MIPS, they are just making money from MIPS IP, extracting the residual value of MIPS as much as possible, and focusing on their main business – GPU and AI chips. The direct result is that the development of MIPS CPU is very slow. Now, the performance of Loongson 3A4000 has greatly surpassed that of MIPS CPU, and Loongson 3A5000 has further improved the performance of bare CPU by 50% to 60% compared with Loongson 3A4000, which is the best at the moment. Autonomous CPU.

Imagination and Wave Computing are like this in hardware and also in software. In terms of software ecology, due to the inaction of Imagination and Wave Computing in the past few years, Godson has already taken the lead in many aspects.

When Loongson transplanted and optimized many software, it did not forget to bring the support of other MIPS processors at the same time. In JIT virtual machines such as v8 and OpenJDK, Loongson has become the code maintainer of the entire MIPS architecture. Six months ago, UOS also put the Loongson core in parallel with the x86 core and the ARM core. One of the updates was to add support for the Loongson 3A4000.

In the past, Loongson has gained a certain dominance in the MIPS software ecosystem. Godson is complete. NET has become a major contributor to the Java runtime environment OpenJDK 13, and now maintains the upstream MIPS architecture and Loongson extension code. Many multimedia libraries, such as FFmpeg, libvpx, OpenH264, libyuv, etc., have been optimized by Godson for their own MMI and MIPS MSA and other vector instructions and submitted to the upstream. Some libraries support Godson extension instructions even earlier than MIPS extension instructions. The upstream of the Linux kernel is also maintained by members of the Loongson ecological chain. Loongson has gained a certain say and control over open source software.

Most of the original ecology of MIPS is already history. The current software ecology of Loongson mainly comes from various open source projects maintained by Loongson itself, as well as the transplantation of products by various domestic software developers. Essentially, it can no longer be called MIPS software ecology. , but should be called Godson Ecology. In fact, when porting some software, it is necessary to distinguish the Loongson version and the MIPS version.

LoongArch is a product that Loongson has planned for many years, which can be seen from the fact that LoongArch was unveiled after the 3A5000 CPU was taped out. After Loongson established LoongArch, Loongson and MIPS have parted ways and have nothing to do with each other. For Loongson, whether MIPS exists or not, it does not affect Loongson’s independent construction of an ecosystem. Loongson has done this in the past, still does it now, and will do it in the future.

In the past few years, Loongson is a player who is still developing MIPS high-performance processors in the world. After Loongson quit MIPS and erected the LoongArch banner, Loongson 3A4000 is very likely to be fixed as the strongest MIPS processor. After losing the player of Godson and MIPS defecting to RISC-V, MIPS will also become history. LoongArch is the basic point of the independent ecology, and 3A5000 is the milestone for Loongson to start the new journey of LoongArch.


The Links:   FM50DY-10 STS5DPF20L MIG200J6CMB1W