CNRV

关注RISC-V和Chisel以及开源IC和EDA在中国的发展

View the Project on GitHub

RISC-V 双周简报 (2018-03-30)

要点一览:

小编杂谈

小编首先是看到了EETimes的这篇文章《Time for ‘Open Innovation,’ Not Just Open Source》讲开放式创新,又恰好和一朋友聊到了相关的话题,所以在这里简单唠叨两句。

如果我们问自己,RISC-V的出现到底给我们带来了什么,仅仅是一个不要钱的指令集?还是一场革命?

我们能够看到,过去十几年以Linux为代表的开源运动的广泛发展打开了很多锁着的黑盒子,那些仍然保守和封闭的公司要么选择开放、要么慢慢的失去市场。而反观整个IC产业链,自底向上从Fab到IP Vendors/EDA公司再到Fabless,处在中间位置的很多IP Vendors和EDA巨头都无比的封闭,甚至可以说形成了一堵巨大的阻碍创新的墙。

而RISC-V的出现就向一个核弹头一样,不仅打开的开放ISA的这扇大门,而且还会在方法学、设计开发验证流程等领域形成一股新的力量。这股力量现在看来或许很渺小和微不足道,但当技术资料的交换以及技术人员交流的门槛因开源和互联网而显著降低的时候,背后的推动力或许是惊人的。就像当温度接近绝对0度的时候,导体中的电阻变为0时所能产生的巨大磁场能够推动带电粒子接近光速一样,你可千万别小看它!

行业视角

开放式创新的时代已经到来,开源只是冰山一角

eFabless的CEO Mike Wishart最近在EETime发表了文章《Time for ‘Open Innovation,’ Not Just Open Source》,让我们跳出来去看看我们正在经历的一切。这当中提到了开源以及开放式创新。我们看到的开源或许只是冰山一角,我们正处在开放式创新的新时代里。

That said, the real story is open innovation, of which open source licenses are simply one part. Open innovation means looking outside traditional corporate silos to harness the collective knowledge of a global community of developers and using that community to create new and transformative things. Open innovation in software is enabled by many things: GitHub, app stores and crowdsourcing platforms like Topcoder (founded by our investor and director Jack Hughes) being just a few. Once enabled, though, the innovation potential of this crowd is mind boggling.

当然,Mike也为我们描绘了一副未来的景象,芯片行业的封闭状态或许会有所改变。

This is just the start. We imagine the potential of an online marketplace with a complete design platform open to a global community of experienced designers with remarkable ingenuity and capabilities. The online innovation platform will offer the designer community access to everything required to take IP and ICs from idea to manufacturing. It will be easy for community members and customers to:

  • Formulate, communicate and agree on design requirements;
  • Quantitatively evaluate the successful completion of design specifications and
  • Access foundry mulit-project wafers (MPWs) to deliver prototypes.

The framework will allow community to share and modify chips. The marketplace will include customizable reference chip designs and community, third-party and foundry IP. Designers can access the community for analog, digital and mixed-signal IP on demand.

Links:

RV新闻

David A. Patterson和John L. Hennessy喜获图灵奖

恭喜计算机两位宗师级大师获得2017年图灵奖!

Links: ACM报道

Google, Tesla Get Behind Challenge to Arm Chip Design

目前RISC-V基金会的成员已有80个左右,其中有很多芯片领域和互联网巨头,而谷歌和最近加入的特斯拉,最近吸引了不少人的眼球。不论是在舆论和行动层面,大家都非常认可RISC-V的未来发展。

MIT Technology Review的文章《Some of tech’s biggest firms hope to save money with open-source chip designs》用很简短的几句话道清了当前的状况。

The company that masterminded the processor inside your smartphone may find that a set of free-to-use alternative designs erode some of its future success.

  • Backstory: Chip designer Arm developed the processors used in virtually all the world’s mobile devices. It’s also trying to use its chops—in particular, an ability to create low-power but high-performance processors—to become a leading supplier of silicon designs used in more specialized applications, such as artificial intelligence and autonomous vehicles.
  • What’s new: The Information ($) reports that many startups and larger tech firms—totaling 80, and including Nvidia, Google, and Tesla—are looking to use a new set of open-source chip designs, known as RISC-V, in future products. The main motivation: RISC-V is free to use, Arm designs are expensive to license, and there’s still scope for using the open-source designs to create chips for many upcoming applications.
  • Why it matters: It’s unlikely that many firms will ditch using Arm designs to power smartphones and other mobile devices—the technology is so established that switching would be a headache. But as Moore’s Law falters and chips become more specialized, Arm could find that it has competition not just from chipmakers like Intel and AMD, but also from RISC-V.

Links:

OURS Technology公司利用RISC-V实现其产品

Ours Tech,一家硅谷的初创公司最近宣布进军中国市场,公司的创始人Tan Zhangxi是David Patterson的学生。曾经参与了RISC-V和硅光芯片项目的开发。

这家公司已经在去年完成了A和A-1轮融资,并且已经多次流片。小编很看好其未来表现。

当然36kr似乎很明显没有读懂到底他们在做什么,标题《用硅光I/O技术做RISC-V指令架构CPU,「OURS」想让机器以3D方式感知世界》让我们以为快要进入二次元。

不专业的小编猜测他们是结合硅光技术来实现FMCW LiDAR,并且在芯片内使用RISC-V处理器来降低成本以及提高灵活性。

Links:

RV新闻

RISC-V Fast Interrupt Task group

Prof Krste Asanovic 最近在 isa-dev 上宣布了 Fast Interrupt Task group 成立的消息。Krste 和来自 Andes 的 Kevin Chen 是这个小组的chair 和 vice chair。以指令集本身来说,Cache instruction 和 Fast Interrupt 一直是在RISC-V 中常常被讨论的问题。Krste 在邮件中介绍了这个小组的目标。

Develop a low-latency, vectored, priority-based, preemptive interrupt scheme for interrupts directed to a single hart, compatible with the existing RISC-V standards and extensible to multi-core. Provide both hardware specifications and software ABIs/APIs. Standardize compiler conventions for annotating interrupt handler functions.

有兴趣参与讨论的基金会成员或公司可以多多关注。

生态发展

RV64 port 被加入 debian-ports

经过许久的努力,最近 RV64 port 被加进了debian-ports。虽然还没进入 main Debian archive,但这代表未来在 Infrastructure 方面,Debian的贡献者们能省力许多。

Links:

meta-riscv - A Yocto/OpenEmbedded Layer for RISC-V

Khrm Raj 最近在 sw-dev 上介绍了 meta-riscv 这个 Yocto Layer。meta-riscv能跟 Yocto 最新的版本兼容。看来生态圈的发展慢慢扩展到BSP等地方了。

Link1 : meta-riscv - A Yocto/OpenEmbedded Layer for RISC-V

技术讨论

兼容性测试的准则

RISC-V兼容性测试(compliance suites)是测试一个RISC-V处理器满足RISC-V标准的测试程序集,也是使用RISC-V trade mark的前提之一。 最近在关于处理器同时支持RV32和RV64时,必须支持的压缩指令集扩展的问题上,兼容性测试的设计准则问题被问了出来。 比如说,一个处理器号称支持RV64I,但是却将RV64M中的MUL指令用于了其他用途。这样的处理可以算作兼容吗? 根据Krste的解释,这也许是兼容的(如果小编理解正确了):

isa-dev邮件:

Consensus is that compliance suites will need to have versions, and if at some later date, there’s agreement on truly useful forward-compatibility checks, we can add them in later version.

Meanwhile, we should stick to compliance tests only checking for existence and not checking for non-existence.

翻译:兼容测试会有版本来逐步确定前向兼容检查的具体内容。同时,我们应当坚持测试必须被支持的指令被正确支持了,而不是测试不被支持的指令没有被支持。

isa-dev邮件:

The compliance test should test for known illegal opcodes (16 0s, and ILEN bits of all 1s), but not for reserved opcodes.

There is an important difference between reserved and custom opcodes. Future standards can never use “custom” opcodes, while “reserved” are reserved for future standards use.

翻译:兼容测试应该测试已知的非法操作数(指令)但并不检测被预留的操作数。预留操作数和可定制(custom)操作数有着重要区别。 将来的指令级扩展一定不会使用可定制操作数,但是预留操作数则是专门为将来的指令预留的。

在讨论的过程中,也冒出这么一个有趣的问题

I asked if the RISC-V Foundation would agree (in writing) to indemnify contributors (in the instance where the use of a compliance-conformant processor resulted in the death of a person, and the RISC-V Foundation was sued, would the RISC-V Foundation agree not to sue the contributors?), but i have not received a response.

翻译:我(提问者)问过基金会。基金会是否会保护贡献者(如果一个兼容测试通过的处理器导致了一个伤亡事故,基金会被告了,基金会会追究兼容测试集贡献者的责任吗?)基金会没有回答。

J 扩展指令集的讨论

J扩展指令集是指专门来加速即时编译JIT的指令集扩展,现在正在由J扩展指令集工作小组讨论开发中。 最近邮件列表上对J指令集扩展的研究内容进行了一番讨论,其中谈到了ARM的Jazelle指令集扩展和中国的龙芯,还挺有意思的。

ARM的Jazelle扩展指令集是用来动态解释执行Java字节码的ARM扩展指令(https://en.wikipedia.org/wiki/Jazelle), 后来被称为DBX(Direct Bytecode eXecution)。 现在据说用处不多了,原因是:“苹果不让iphone运行JAVA!” [Martin Schoeberl的邮件] 不过当年,基本所有运行塞班系统(大家都知道Symbian吧?)的手机都使用Jazelle来运行JAVA。 如果比较Jazelle的运行时解释执行和使用JIT的即时编译执行,当JIT的内存使用量小于4MB时,Jazelle的效率更高[David Chisnall的邮件]。 看来,硬件加速的解释执行在小内存系统中是非常必要的。 即使在使用JIT的系统中,加速的解释执行对提高用户体验也是非重要的。

David Chisnall建议RISC-V的J指令集扩展应该要解决这几个问题[David Chisnall的邮件]:

在相关的讨论中,计算所的龙芯也被提及。龙芯运行的是扩展的MIPS指令集。为了能更高效地仿真(emulate)x86指令,龙芯用扩展指令实现了接近200多条的x86浮点运算指令,将使用QEMU仿真执行x86测试程序的性能提高到了使用x86处理器执行的70%左右。(https://en.wikipedia.org/wiki/Loongson#Hardware-assisted_x86_emulation)

另外,小编也注意到,在JIT中,为了让新的代码能在缓存裡,是不是也该加上能把旧代码踢出缓存的指令呢(Cache Invalidate)?虽说如此, 但RISC-V 希望能对于硬件透明。因此,这部分未来如何进行,也是小编很感兴趣的地方。

直接缓存操作的安全问题

直接缓存操作,比如说flush和preload操作,可以被攻击者用来完成基于缓存的侧信道攻击。 高性能缓存对缓存直接操作的需求和系统安全的需求在这里便成为了直接冲突。 直接缓存操作如何在这两种需求中折衷还需认真讨论。

这两周,邮件列表上针对第5版直接缓存操作的安全问题有了较深入的讨论。 现在的讨论重点,集中于破坏性缓存操作。

比如,MEM.DISCARD 直接失效缓存区域(数据丢失,用于抛弃无用数据而避免写回)。 如果这些被软件认为是无用的数据可以被攻击者用来泄露关键信息,那么需要在抛弃数据后将数据置为无效值(比如清零)。 但是,清零之后需要将数据写回内存吗?有人认为这是必须的,因为内存中可能存在数据的旧值,攻击者可以利用非一致性的DMA从内存中读回旧值。 不过,熟悉操作系统的人说,现在的操作系统是不会允许用户态程序直接操作非一致性的DMA,所以这种担心是多余的。 好像都有道理。

实用资料

Porting Fedora to RISC-V on LWN

在第二篇中,Richard 介绍了它 bootstrap Fedora risc-v port 的过程,并简短分享他对于risc-v 的看法。

暴走事件

五月

六月

招聘简讯

CNRV提供为行业公司提供公益性质的一句话的招聘信息发布,若有任何体系结构、IC设计、软件开发的招聘信息,欢迎联系我们!


整理编集: 宋威、黄柏玮、郭雄飞


欢迎关注微信公众号CNRV,接收最新最时尚的RISC-V讯息!

CNRV微信公众号


知识共享许可协议
本作品采用知识共享署名-非商业性使用-相同方式共享 3.0 中国大陆许可协议进行许可。