CNRV

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

View the Project on GitHub

RISC-V 雙周簡報 (2018-02-01)

要點新聞:

RV新聞

glibc 的risc-v port upstreamed

經過七個版本,glibc的risc-v port終於趕上 glibc 2.27的release了。目前的glibc包括 rv64imac/lp64, rv64G/lp64, 和 rv64imafdc/lp64d。glibc穩定後,將有助於 Debian 和 Fedora等軟體的穩定。

Links:

UltraSoC 推出業內首個RISC-V Trace IP

UltraSoC最近開始提供RISC-V Trace IP用來讓處理器內部的行為更加可視化。不僅如此,UltraSoC的IP還支持幾乎所有能夠找到的RISC-V CPU廠商。UltraSoC同時也是RISC-V相關標準的積極參與者。

Processor trace functionality allows the behavior of a program to be viewed in detail, instruction-by-instruction, and is a key requirement for system developers. The UltraSoC RISC-V trace encoder supports both 32 and 64-bit RISC-V designs and the IP block integrates smoothly with the rest of the UltraSoC portfolio, supporting open and industry standard architectures to put self-analytic capabilities at the heart of SoCs. UltraSoC’s embedded analytics supports design teams, helping to manage complexity and improving time to market, design costs, reliability, safety and security in applications from automotive to enterprise IT and the IoT.

Link: UltraSoC delivers industry’s first RISC-V processor trace IP

技術討論

為RISC-V添加 process 間的隔離表

繼幽靈漏洞被曝光後,RISC-V社區提出了一個 process 間資料隔離的方案。 幽靈漏洞實際上是一個很難防禦的問題。 一方面幽靈漏洞依賴於預測執行,而預測執行是高性能處理器不可或缺的特性之一。 另外,幽靈利用預測執行去 access 本來不應 access 的資料。 這裏的資料很可能不受硬體保護,比如說攻擊者和被攻擊資料在同一個優先級。 但是軟體保護則不太可能去阻止預測執行對資料的 access 。 這便揭示了一個關鍵問題,現在的計算機系統缺少一種比頁更細粒度的保護和隔離機制。

RISC-V社區提出的 process 間資料隔離表即是為了這個目的而提出。 它建議使用一個類似 page table 的結構,構造一張平行的表。 在 page table 樹的leaf node ,資料隔離表記錄頁內資料區間的權限標志和 access 控制。 每一個 page table entry大小的隔離entry可將一個頁分為4個獨立區間。 這樣就將保護粒度降低到1/4頁。

RISC-V社區針對該提議展開了非常仔細的討論,其中有很多觀點都非常有意思。

isolation is easy, sharing is hard. 隔離比較簡單,但是共享卻很難(簡單隔離比較容易做到,但是考慮共享資料的隔離問題,就變得覆雜了)。

The software problems are a lot harder, because most programming languages really like being able to share objects (whatever that means in the language), not page sized memory buffers, between components. 關於隔離的軟體問題更加覆雜。這是因為編程語言(程序)希望能共享類似對象的資料結構,而不是一個以頁為單位的內存緩沖區。

It’s worth noting that the result from Mondrian Memory Protection was a clear statement that useful translation boundaries and useful protection boundaries rarely align. This is particularly apparent on modern systems, where superpages give a significant reduction in TLB pressure, but give you 2MB+ translations, which are far too large for any kind of fine-grained protection. address translation 和內存保護的邊界往往不統一。這個問題在現代系統中更加突出。 比如說為了減少 address translation 對TLB的影響,現代系統傾向於給 process 分配大頁,而大頁對於內存保護來說簡直是太大了!

具體的討論請參看:https://groups.google.com/a/groups.riscv.org/d/msg/isa-dev/l08WGeesdB4/UDTa8W6mAQAJ

為Rocket和BOOM添加 prefetch 機制

在RISC-V的硬體郵件列表中,Max Hayden Chiz詳細討論了如何為Rocket和BOOM添加硬體 prefetch 機制。 他給出了很多 prefetch 設計需要考慮的問題和大量的參考文獻:

As for the L1 cache, the general belief in the modern literature is that it’s less important because an OoO core can generally hide the latency of an L1 miss.

Links:

在和Andrew Waterman討論之後,Max準備先實現一個prefetch buffer,一個在一級和二級緩存之間的buffer,由一級緩存的miss來觸發 prefetch 並存放資料。 當一級緩存miss時,則可以更快地從prefetch buffer讀到資料。 這樣設計的好處是 prefetch module 暫時和其他module 沒有直接聯系,具有更好的module 性。

對一個in-order處理添加10%的面積能達到一個OoO處理器90%的性能?

最近有人在征集可以用於碩士開題的關於RISC-V的點子。 於是這麽一個腦洞清新的題目就被提出來了。 大概意思是,用兩個in-order的處理器合並在一起做成一個OoO處理器,就能獲得大多數OoO的性能。 具體的想法可以看這篇文章:http://www.cs.virginia.edu/~skadron/Papers/boyer_federation_taco.pdf

另外,有人也提出,可以做基於FPGA的TLB優化。 FPGA有大量的BRAM,但是CAM實現非常的消耗資源。 傳統使用CAM來做associative的TLB在FPGA上性能不高。 但是我們可以用BRAM來做directly mapped緩存,使用其他方法(the nearly-associative memory from UPenn)提高directly mapped緩存的associativity,則性能就能匹配CAM設計的TLB。

具體討論鏈接:https://groups.google.com/a/groups.riscv.org/d/msg/hw-dev/T6IRGlQhs1o/oUUmaD19AwAJ

代碼更新

linux kernel 4.15-rc9 和 4.15 的更新

在4.15 rc 的尾聲,只有一個小變化。risc-v port 現在有個新的 mailing list 和git repo了。

Links:

在mailing list中,也已經有一些新的patch在討論。像是:

實用資料

RISC-V tokyo 的文檔公開

RISC-V tokyo的文檔公開了。許多公司像是 NSITEXE、Redhat 和 SHC 的演講都很有趣,可以參考。

Link: RISC-V Day 2017 Tokyo

“Automation and Reuse in RISC-V Verification Flow”

在最近的Verification Horizons Letter中,來自 Codasip 的 Marcela Zachariasova and Lubos Moravec 在這篇中介紹了他們公司使用的 Verification flow 和 他們的UVM架構。

Link: Automation and Reuse in RISC-V Verification Flow

關於RISC-V ISA的11個謬論

RISC-V基金會市場委員會的副主席Ted Marena最近在Electronic Design上發表了一片科普軟文,澄清了大眾的一些常見的誤區。

這11個謬論包括:

  1. RISC-V是另一個處理器設計
  2. RISC-V僅是為學術界設計的,而非工業界
  3. 目前還沒有任何可用的FPGA核或是集成設計環境能夠讓我用來評估RISC-V
  4. 要想使用RISC-V你必須支付License費
  5. 設計RISC-V核的公司必須要分享他們的IP給客戶
  6. 相比x86或者ARM,RISC-V並不會更快或更高效
  7. RISC-V的軟體工具並不存在
  8. 多個RISC-V核心並不能共存也不能被其他Core所操縱
  9. 信任RISC-V核是危險的
  10. Linux操作系統並不支持RISC-V
  11. 不可能從FPGA移植一個RISC-V設計到ASIC

感興趣的同學去點擊原文鏈接看答案吧~

Link:11 Myths About the RISC-V ISA

走在晶片“時尚前沿”的Nvidia和WD

在我腦中“時尚前沿”不僅僅是穿衣時常,採用最新最前沿的技術也是一種時尚,所以請原諒我如此 translation 。

Tiernan Ray在Barron’s上發表了一片簡短的文章,講述了他所看到的Nvidia和WD在RISC-V上的一些行動。

但最後一段很有意思:

Patterson, and RISC-V, made a big splash a year ago, when he described work that had been done at Alphabet’s (GOOGL) Google to develop the so-called “tensor processing unit” for Google’s cloud computing operations. The TPU, which Patterson and his team claim can achieve vast improvements in performance and efficiency versus Intel and Nvidia chips, was itself a result of work on RISC-V, as I explained in an article last summer in Barron’s print magazine.

Link: Nvidia, Western Digital at Chips’ Frontier

市場相關

Galois獲DARPA RISC-V相關合同

Galois最近獲得一份價值450萬美元的合同,合同的內容之一包括開發一系列的工具和方法來評估來自8個獨立SSITH團隊所使用的共計72個不同的RISC-V核的Security性,這些核有可能是用Bluespec、Chisel或者systemverilog寫的。

這是個極好的消息,如果經過這一波IntelSecurity漏洞風波以後,如果RISC-V能有一個被專業人士良好的定義Security測試集和方法學的話,那麽將會吸引更多有興趣的用戶。

Work includes the evaluation of security and suitability of up to 72 different RISC-V operating central processing units from eight individual SSITH teams.

The CPUs are designed to employ various system security methods and hardware design languages such as Bluespec, Chisel and System Verilog, Galois noted.

Galois’ Balancing Evaluation of System Security Properties with Industrial Needs project aims to measure hardware security protection with security metrics, methodology and framework.

BESSPIN will work to provide hardware security assurance capacities for CPU and semiconductor vendors, hardware manufacturers and DoD.

Link: Galois to Develop Hardware Security Tools, Methods Under DARPA Program

原Intel VP Sunil Shenoy加入SiFive

曾經參與過多個Intel重量級entry目的VP Sunil Shenoy最近加盟了SiFive。相信其在Intel多年的經驗會讓SiFive內力大增。

Shenoy brings more than 30 years of technology experience to SiFive, holding 16 patents in microprocessor design, and working on or leading notable projects including the Intel PentiumTM 4 generation of microprocessors, highly integrated multi-core Intel XeonTM microprocessors for datacenter and enterprise servers,and the family of massively parallel Intel Xeon PhiTM microprocessors. During his time at Intel, Shenoy led silicon development teams consisting of several thousand engineers across the world, helping to bring products successfully to market. He also drove collaborative programs with major EDA vendors.

Link: SiFive Welcomes Former Intel Corporate VP to Executive Team

Codasip發布其最新的Studio 7設計工具

Codasip最近發布了其最新的設計工具Studio 7,這是一個用來快速定制處理器的工具。一些有趣的特性包括支持用一種叫做CodAL的語言來描述定制化的指令及extension,在生成RTL和完整的SDK的同時也能夠生成system verilog描述的UVM驗證環境。

“Studio 7 is a big step forward for Codasip’s advanced processor creation technology, and will take the guesswork out of implementing the ever-expanding number of ISA options in the RISC-V specification. Studio can help generate processors well-suited to the widest range of application areas, from machine learning inference engines to host processor DSP offload, networking, and storage,” stated Karel Masařík, CEO and co-founder of Codasip. “With Studio 7, there is no need to settle for a one-size-fits-all processor.”

暴走事件

一月

二月

五月

六月

招聘簡訊

CNRV提供為行業公司提供公益性質的一句話的招聘信息發布,若有任何Architecture、IC設計、軟體開發的招聘信息,歡迎聯系我們!


整理編集: 宋威、黃柏瑋、郭雄飛


歡迎關註微信公眾號CNRV,接收最新最時尚的RISC-V訊息!

CNRV微信公眾號


創用 CC 授權條款
本著作係採用創用 CC 姓名標示-非商業性-相同方式分享 3.0 台灣 授權條款授權.