Skip to content

Loongson and China's CPU Quest

Abstract

Loongson (龙芯, “Dragon Core”, called Godson in early English papers) is the processor line that Hu Weiwu began in 2001 at the Institute of Computing Technology of the Chinese Academy of Sciences with a start-up grant of one million yuan. Godson-1 booted an operating system on 10 August 2002 and was China’s first high-performance general-purpose CPU. For almost two decades the chips imitated the MIPS architecture, first without a licence and from 2009 with one; in 2021 the company switched to its own instruction set, LoongArch. Loongson Technology listed on Shanghai’s STAR Market in June 2022 and was put on the US Entity List in March 2023. Its story runs alongside a darker one: the Hanxin chips of Shanghai Jiao Tong University, celebrated in 2003 as a national breakthrough and exposed in 2006 as Motorola parts with the logos sanded off.

KL China Godson 2C
A Godson-2C processor from the Institute of Computing Technology. Image: Konstantin Lanzet, CC BY-SA 3.0, via Wikimedia Commons.

A Login Prompt at Six in the Morning

Hu Weiwu (胡伟武) studied at the University of Science and Technology of China, graduating in 1991, and took his doctorate at the Institute of Computing Technology (ICT) in 1996 under Xia Peisu, who had built China’s first home-designed computer in 1960 (see China’s Tech Industry). In early 2001 the institute gave him, then 33 and without any experience of processor design, the task of building a domestic CPU and one million yuan to start. The lab had less than 60 square metres; the team ranged from fresh graduates to a chip veteran in his seventies.

The logic design first ran on an FPGA on 19 August 2001, a date Loongson still treats as its birthday. At 6:08 on the morning of 10 August 2002, in room 105 of the institute’s north building, a computer with the first real chip printed “login:” on its screen. The chip was unveiled on 28 September 2002 as Godson-1, nicknamed “Xia 50” for Xia Peisu’s fifty years in computing, and members of China’s two national academies chose it as one of the country’s ten scientific advances of 2002.

Godson-1 was a 32-bit processor that ran at 266 MHz, made in a 0.18-micron process with 8 KB caches for instructions and data. Hu later described the project’s aim as “high-performance microprocessors. It’s low performance compared with Intel’s or IBM’s, but it’s high performance compared to ourselves.” Early press reports called it x86-compatible. It was not: it copied the MIPS III instruction set (see RISC vs. CISC and Hennessy and Patterson), minus a few unaligned load and store instructions that MIPS Technologies had patented and had used in 1999 to sue Lexra, an American maker of MIPS-like cores. A start-up founded with the institute, BLX IC Design, took the chip to market for thin clients and embedded systems.

Godson-2 and the MIPS Question

The second chip was much larger. Godson-2, launched at the Great Hall of the People in 2005, was a 64-bit, four-issue, out-of-order processor modelled on the MIPS IV instruction set. Microprocessor Report compared it point by point with the MIPS R10000 of 1995 and found it matched or exceeded that design in almost every respect; made by SMIC in Shanghai on the same 0.18-micron process, it reached 400 to 500 MHz and drew 3 to 4 watts. ICT made only a few hundred samples of each design before handing it to BLX, and in an interview with the magazine that June Hu said: “It’s very easy to design an aggressive CPU like Godson-2, but it’s much harder to sell it.”

MIPS Technologies objected to the phrase “MIPS-like” and did not license ICT. Hu’s answer was a tool that rewrote MIPS executables, replacing each patented instruction with two or three ordinary ones. The dispute ended with licences. In 2007 STMicroelectronics, a MIPS licensee, chose the MIPS64 architecture to support Loongson development, and on 15 June 2009 MIPS announced that ICT had licensed the MIPS32 and MIPS64 architectures directly. Loongson Technology took its own licence on 8 August 2011.

The best-known Godson-2 machine outside China was the Lemote Yeeloong, a netbook with an 8.9-inch screen and a Loongson 2F. Richard Stallman used one because, as he put it in January 2010, “I can run it with 100% free software even at the BIOS level.”

Godson-3 and the Company

Hu had told Microprocessor Report in 2005 that Godson-3 should have at least four cores. The quad-core design, which Hu and five co-authors described in IEEE Micro in 2009, ran at 1 GHz in a 65-nanometre process and carried hardware support for emulating x86 code. The eight-core Godson-3B that followed was rated at 128 gigaflops at 1 GHz and 40 watts, and Hu said in 2010 that it would go into the Dawning 6000 supercomputer the next year.

Commercially the decade was thin. Hu later reckoned that from 2001 to 2010 the project spent more than 400 million yuan and achieved breakthroughs in some areas but nothing significant overall. Loongson Technology (龙芯中科) was registered in 2008 with money from the Academy and the Beijing municipal government, and from 2010 the team ran as a company instead of a research group. Hu turned down offers from foreign chip firms to license their designs or form joint ventures, and in 2009 and again in 2011 he declined ICT’s nomination for membership of the Chinese Academy of Sciences. In 2015 Loongson’s sales passed 100 million yuan for the first time and it broke even.

LoongArch and the Stock Market

By 2018, Hu said, licensing a foreign instruction set had become untenable under pressure from Western governments. Work on an in-house instruction set began in late 2019. Loongson presented LoongArch in April 2021: nearly 2,000 instructions, binary translation for MIPS, ARM, and x86 programs, and a report from an unnamed “domestic third-party intellectual property evaluation agency” that found it “obviously different” from every major architecture. Linux kernel developers were less sure; Marc Zyngier described the code Loongson submitted that summer as “the same antiquated, broken MIPS code, only with a different name.” The first LoongArch chip, the quad-core 3A5000, launched in July 2021. Even so, MIPS-based chips still brought in about 70 percent of revenue in the three years before the stock-market listing.

Loongson listed on the STAR Market on 24 June 2022 at 60.06 yuan a share. It opened 60 percent higher, but raised 2.46 billion yuan against the 3.51 billion it had planned. On 2 March 2023 the US Commerce Department added Loongson to its Entity List, citing support for China’s military modernisation. The 3A6000, launched in Beijing on 28 November 2023, has four LA664 cores at 2.5 GHz with two threads each, and Loongson claimed overall performance comparable to Intel’s tenth-generation quad-core processors of 2020.

Sales did not follow the chips. Revenue rose from 486 million yuan in 2019 to 1.2 billion in 2021, then fell to 506 million in 2023, when the company lost 329 million. For 2024 it forecast flat revenue and a loss of about 619 million, explaining that recovering e-government orders could not make up for a stalled industrial-control market. Asked about his dream around 2001, Hu had answered: “to build a Chinese Wintel alliance.”

Dead End: Hanxin and Arca

On 26 February 2003 the Shanghai government’s press office presented Hanxin-1 (汉芯一号), a digital signal processor designed at Shanghai Jiao Tong University by Chen Jin (陈进), a returnee with a doctorate from the University of Texas at Austin and a background at Motorola. An expert panel of academicians declared it a domestic first at an international advanced level. Hanxin-2, -3, and -4 followed, Chen became dean of the university’s School of Microelectronics, and the project received funding from the Ministry of Science and Technology, which later accounts put at over 100 million yuan.

In December 2005 a letter alleging fraud reached officials, and in January 2006 an anonymous post on a Tsinghua University forum, “The Hanxin Black Curtain”, spread the details. The chip Chen’s team had designed could not run real applications. For demonstrations, Motorola DSP56800-series chips had been bought in the United States and workers had sanded off the Motorola logo and printed “Hanxin” in its place; the Motorola package had 144 pins, the team’s own chip 208. A two-month investigation by the Ministry of Science and Technology, the Ministry of Education, and the Shanghai government found that none of the four chips met its claimed specifications; the “dual-core” Hanxin-4 contained one core, taken from another company. In May 2006 the university dismissed Chen as dean and ended his professorship, and he was ordered to repay the government funds. No criminal charges were reported.

The other failed path was Arca (方舟), a Beijing company founded by the returnee designer Li Delei, whose 32-bit Arca-1 processor was announced in 2001 at a briefing sponsored by four state bodies, among them two ministries. Ni Guangnan, removed as Legend’s chief engineer in 1995, worked for it without pay and won it subsidies and purchase orders. Buyers found almost no software for the chip, and the company eventually went under (see Liu Chuanzhi and Lenovo). Loongson outlasted both: it shipped working silicon, kept the MIPS software base until it could afford to leave it, and found its customers in industrial control and e-government.

📚 Sources