CNRV

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

View the Project on GitHub

RISC-V 双周简报 (2018-02-15)

要点新闻:

写在前面

2018农历新年还没过,我们就看到两个好消息,SiFive和PULP都有和可运行Linux的CPU的好消息,如果说去年RISC-V在MCU上遍地开花,那么今年这个RISC-V Linux元年也一定会很精彩。新的平台和新的板子总能够让软件开发人员为之兴奋,小编已经迫不及待跃跃欲试。下半年我预计就会看到大量的操作系统移植,开源显卡是不是也离我们不远了哈哈。

CNRV祝大家狗年旺旺旺!

RV新闻

SiFive的HiFive Unleashed开发板和Freedom U540 SoC芯片

SiFive最近发布了其HiFive Unleashed开发板,并在Crowdsupply上开始同步预售,最早一批75块开发板将于3月30日发货。

在这块开发板上搭载的是SiFive最新的Freedom U540 SoC芯片,小编估计其早期版本搭载的是MPW工程样片,后面则开始发售搭载量产版本的芯片。

HiFive Unleashed

关于Freedom U540 SoC,SiFive官方发布的Spec如下:

这块开发板目前还支持通过FMC接口来连接FPGA开发板等外部接口卡,小编猜测是可以通过ChipLink来直接和片外的FPGA进行高速通信。

与此同时,在FOSDEM’18上,来自SiFive的Palmer和Yunsup还发表演讲向大家公开了更多的相关细节。现场还通过在搭载在FPGA上的显示模块和接口向观众演示了FPS游戏Quake比如,SiFive还将开源他们的L2$设计,之前的rocket-chip中L2 Cache的设计被发现存在问题,所以社区也一直等待在这方面能够有所进展。

Links:

以下是业界对HiFive Unleashed的一些相关评论:

DataCenterKnowledge网站在看到RISC-V和HiFive的演讲后发表了《Is Open Source RISC-V Ready to Take on Intel, AMD, and ARM in the Data Center?》的文章,其在文章中表示:

While software is eating the world, open source hardware might soon be eating the data center. Definitely not tomorrow or next month, and probably not even next year, but sooner than you think, there might be as much open source hardware as the old-fashioned proprietary kind running data centers.

Need proof? Take a look at RISC-V, an open processor architecture.

Link: Is Open Source RISC-V Ready to Take on Intel, AMD, and ARM in the Data Center?

LinuxGizmos网站则发表了文章《RISC-V gains momentum as it moves from MCUs to Linux-friendly SoCs》,当中提到封闭的ARM和Intel x86限制了创新、减缓了上市时间并且增加了成本。

RISC-V’s timing seems to be right, as the growing acceptance of open source software and hardware logically leads to a desire to open up of the processor. Opaque chip designs often create obstacles and blind spots — not only for open source projects, but also semiconductor vendors. Conceivably, hidden issues such as Intel’s Spectre and Meltdown security problems might have come to light more quickly in the open source spotlight.

There’s also a sense that the dominance of two closed source architectures — ARM and Intel x86 — is limiting innovation, slowing time to market, and increasing cost. In addition, RISC-V advocates claim that both ARM and x86 platforms are burdened by legacy code. By comparison, RISC-V is starting with a clean slate of modern components.

Link: RISC-V gains momentum as it moves from MCUs to Linux-friendly SoCs

DesignNews发表了《First Open-Source RISC-V SoC for Linux Released》,当中提到:

But how does SiFive expect an open-source board to stand out in an ever-crowding market? And why should a company, particularly in a space like IoT, choose open source over any of the other solutions available? “ I certainly believe IoT will be solved by having lots of customization,” Kang said. “I believe IoT inherently is not a one-size-fits-all type of market. What that means is you’re not going to be able to have one killer chip that does everything. What you’re going to need is to be able to customize or get your partners to customize the silicon to meet the specific problems that will come up. And I will argue that RISC-V is great for customization.”

Link: First Open-Source RISC-V SoC for Linux Released

PULP家族新增64-bit处理器Ariane

PULP的研发团队最近设计了一款6级流水线的可以运行Linux或者Unix操作系统的RISC-V处理器。

相关Spec如下:

PULP Ariane

Github Repo

PULPissimo

PULP团队在最近发布了一个新的单核SoC平台PULPissimo。

PULPissimo是一个类似PULPino的平台。相比与PULPino,PULPissimo是在完整性和复杂性上有明显的进步,事实上PULPissimo系统是最近所有多核PULP芯片的主要SoC控制器。

PULPissimo架构包含:

此外,其I/O接口中小编还看到了Camera Interface (CPI)。简单评价一下的话,小编认为这个平台的目标是为了IoT应用而量身打造的,自管理的I/O子系统能够很好的解决低功耗的问题,而丰富的接口则能够支持图像采集等应用。

Link:

PULP代号Mr. Wolf流片成功

前面提到了PULPissimo,最近有新闻就表示PULP基于TSMC 40LP工艺的群核(cluster based processor)芯片,内含8个RIC5Y处理器和1个zero-riscy处理器。8个大核支持RV32IMCF以及PULP自有的DSP指令扩展。

此外PULP团队也提到

“We actually plan to release the entire Mr. Wolf code later this year. Of course, various NDAs prohibit us from releasing technology specific data, our releases contain only System Verilog code, testbenches and associated files for verification,” Gurkaynak.

Link: RISC-V processor Mr Wolf arrives to solve problems

開源軟件更新

OpenJDK RISC-V port ?

在 glibc和linux合併主线以后,许多人开始关注软件上的下一步,像是OpenEmbedded/Yocto, Debian, 和Java/OpenJDK。像是Palmer 最近就在sw-dev开始讨论如何开始移植OpenJDK的问题。

有兴趣参与或讨论的请参考邮件列表: Project proposal: RISC-V port

技术讨论

到底什么是一个 hart?

去年11月底,邮件列表上针对 hart 的精确定义以及 core 和 hart 之间的区别有一个热烈的讨论。由于在许多RISC-V 文档中,core 和 hart 常常被交互使用,Liviu Ionescu 提议在 ISA manual 中加上 hart 的精确定义。 Prof Krste 最近提交了这个更新。其中,core 和 hart 分别定义如下:

Core:

A component is termed a core if it contains an independent instruction fetch unit. A RISC-V-compatible core might support multiple RISC-V-compatible hardware threads, or harts, through multithreading.

Hart:(部分撷取)

From the perspective of software running in a given execution environment, a hart is a resource that independently fetches and executes RISC-V instructions within that execution environment. In this respect, a hart behaves like a hardware thread resource even if time-multiplexed onto real hardware by the execution environment.

从定义中,hart 代表的是在环境中让程式执行的资源,至于底层是Emulation、硬件、还是用M:N的方式 multiplexed,对于程式来说,都是没有影响的。Core 则是指有 IFU 的 component。目前看来,hart的定义是清晰了许多。

已被支持的硬件性能监视功能

也许大家都和小编一样没有注意到现有的Rocket-Chip已经支持较为复杂的性能计数器了。 在最近关于Rocket-Chip的一个问答中,透露出现有Rocket-Chip,或者更准确的说基于Rocket-Chip的SiFive扩展已经集成了较为复杂的功能计数功能。 这个功能由mhpmevent CSR控制,其计数器的值则有mhpmcounter CSR提供。 mhpmevent的低8位可以取三种取值:0,指令事件;1,微结构事件;2,内存系统事件。同一时刻,性能计数器只能记一种类型的事件。 在每种类型中,mhpmevent的高56位是一个选取细节事件的bitmap,如果任何一个bitmap使能的事件发生,则会导致mhpmcounter自增。

Link: 详细的性能记数配置

代码更新

用户和内核页表分离方案被提交到riscv-isa-manual并预进入priv spec v1.11

一月下旬,Jacob Bachmeyer将上个月在rv-dev邮件列表中讨论的用户和内核页表分离方案提交到了RISC-V ISA的Git Repo。 根据他和Andrew的对话,该方案很有希望作为一个指令集扩展被写入Priveleged Spec v1.11版,即即将公布的下一版本。 具体的方案现在都可以在PR看到:https://github.com/riscv/riscv-isa-manual/pull/128

简单说,这个方案提出了一个名为Sdas (Standard Extension for Disjoint User/Supervisor)的扩展。 该扩展增加了一个名为suatp的新CSR。该CSR指向用户空间的页表基址。 如果该扩展不被支持,即仍然使用以往用户和内核共享空间的页表方式,suapt和satp的值严格相等,都指向共享页表的基址。 如果使用该扩展,satp指向内核页表的基址,suapt指向用户页表的基址。内核页表和用户页表使用不同的ASID防止TLB刷新。

同时为了支持兼容性,无论是否支持扩展,当内核写satp时,suatp的值都会对应改变,保证在兼容情况下不需要处理suatp。 在支持扩展的时候,由于内核空间一般被多个进程共享,所以上下文切换并不需要修改SATP,而只需要更改用户页表,即修改suatp。

具体细节请参见PR

QEMU port v4 and v5

Michael Clark 最近提交了QEMU port 的第四版和第五版。在这两版中,他修改了不少Richard Henderson所发现的bug,同时做了些code cleanup。由于Michael目前在Sifive工作,这些QEMU patch中,还包含了SiFive Freedom U500 RISC-V Machine等实现的 Emulation。期待QEMU能早日合併主线。

Link: RISC-V port v4 & v5

Linux 内核 : RISC-V changes for 4.16

最近的更新中包含了一些重要的基础建设更新。像是:

以小编对内核微薄的理解,ZONE_DMA32 和 ftrace都是内核非常基础的功能。可见RISC-V port 还有许多路要走,但另一个角度讲,对于有兴趣送 patch的同学,也是个大好机会,可以多多把握。

CNRV网站更新

会议征稿

CARRV 第二届 @ ISCA 2018

CARRV workshop (Computer Architecture Research with RISC-V) 开始徵稿了。这次是在六月的ISCA 2018举办。有兴趣的同学可以把握机会!

暴走事件

二月

三月

五月

六月

招聘简讯

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


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


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

CNRV微信公众号


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