龙芯CPU(9)–龙芯2号处理器的微结构

Sina WeiboBaiduLinkedInQQGoogle+RedditEvernote分享




考察一个CPU处理器的设计,通常的方法论为:首先看其结构(Architecture),再看其微结构(Micro-Architecture)。而最重要的是其微结构。 本文是科学院计算所胡伟武与其2个博士生2005年3月发表在Journal of Computer Science and Technology计算机科学技术学报(英文版)的一篇综述文章,较详细的介绍了龙芯2号(编者注:应该是GodSon-2C)的微结构。下面是其英文摘要:

Abstract: The Godson project is the first attempt to design high performance general-purpose microprocessors in China. This paper introduces the microarchitecture of the Godson-2 processor which is a 64-bit, 4-issue, out-of-order execution RISC processor that implements the 64-bit MIPS-like instruction set. The adoption of the aggressive out-of-order execution techniques(such as register mapping, branch prediction, and dynamic scheduling) and cache techniqueus(such as non-blocking cache, load speculation, dynamic memory disambiguation) helps the Godson-2 processor to achieve high perfoormance even at not so high frequency. The Godson-2 processor has been physically implemented on a 6-mental 0.18um CMOS technology based on the automatic placing and routing flow with the help of some crafted library cells and macros. The area of the chip is 6,700 micrometers by 6,200 micrometers and the clock cycle at typical corner is 2.3ns.

【编者注:】 从文章的摘要来看,这个CPU本身并没有什么巨大的研究创新突破,当然这也不是计算所做龙芯的目的,例如,其中描述的各种技术都已经是广泛的被采用在现代CPU处理器的设计中。但是对计算所的工程价值是巨大的。这一点是不容置疑的。做龙芯确实不是为了发表几篇文章。这里的4发射在微结构上指的是Godson是一个超标量(superScalar)结构,拥有两个整数加法器(ALU)两个浮点运算器,一个Load/Store MEM部件。

在这个摘要中,对于编者而言,这个“MIPS-like”是非常细微的(subtle)但不容忽略的。在谈论一个处理器的指令集ISA时,MIPS- like还是MIPS-Compatible的ISA是区别很大的。当然,有没有区别,或者区别在哪里,都会在最后编译器,例如gcc,的后端 (backend)被体现出来。那么在这篇发表于2005年的文章中的“MIPS-Like” 里面蕴含了什么奥秘呢?编者通过调研,得出的结论是:MIPS的专利和法律问题。

在2005年,或者说龙芯2C之前,计算所并没有MIPS的许可证。MIPS的ISA中,有4个被专利保护的指令。因此,龙芯是不能实现这4条指令的。不实现这4条被专利保护的指令,在市场上就只能称为MIPS-Like的处理器。这个没法越过的鸿沟就是美国专利 4,814,976。这4个MIPS I的指令分别是:lwl, lwr, swl, and swr。该专利的一些摘要信息如下:

Patent Name:RISC computer with unaligned reference handling and method for the same

Abstract
In a RISC device a set of four instructions are provided which allow either the loading or the storage of an unaligned reference. The instructions are overlapped to reduce the overall execution time of the device. A circuit is also provided for executing the instruction set.

Patent number: 4814976
Filing date: Dec 23, 1986
Issue date: Mar 21, 1989
Inventors: Craig C. Hansen, Thomas J. Riordan
Assignees: Mips Computer Systems, Inc.
Primary Examiner: Kevin A. Kriess

2007年,为龙芯流片的欧洲公司 ST Microelectronic买下了MIPS的许可证。MIPS公司与计算所达成协议。从此龙芯可以成为MIPS兼容的处理器。有兴趣的读者可以参阅2007年3月28日MIPS公司的新闻稿

下载:龙芯2号处理器的微结构

(2个打分, 平均:5.00 / 5)

雁过留声

“龙芯CPU(9)–龙芯2号处理器的微结构”有1个回复

  1. 龙芯 于 2012-02-22 4:17 下午

    胡伟武是一个编程大牛。在他手下做过。很为计算所有这样的人才骄傲