RuyiSDK: Get ready for 1 million
RISC-V software developers
Wei Wu (吴伟)wuwei2016@iscas.ac.cn
Director of PLCT Lab, ISCASAbout Me (@lazyparser)●RISC-V ambassador (^o^)/●

PLCT Lab (2019-): Compilers, Runtimes, and Simulators○

TARSIER Project (2022-): Make RISC-V a tier-1 support for FOSS community.

●

Member of RISC-V International Foundation (RVI) Technical Committee (TSC)●

RISC-V China Community (CNRV) Core Organizer (2020-)●

Member of LLVM BoD (2022-)●Chair of HelloGCC(2013-) and HelloLLVM (2018-2022)

Agenda
1.
2.
3.
4.
5.

RISC-V is the future. We're seeing it.
Why RuyiSDK: The Motivation
The Mission of RuyiSDK
RuyiSDK architecture and components
Beyond RuyiSDKRISC-V is the future. We're seeing it.

Three Basic Observations (Axioms)

1.

Moore's Law has physical limits, but there is no limit to the demand for computing power.

2.

The complexity of a software system grows superlinearly.

3.

The number of developers capable of managing the complexity of software development is limited.

RISC-V is the future. We're seeing it.

A few conclusions deduced from three basic observations●Domain Speciﬁc Architecture (DSA) will be everywhere.
○●There will inevitably be many (free and open) instruction sets.

Open source software eats everything.
○

Only a few open source communities can survive in every ﬁeld.

○

Only a few instruction sets will be maintained by the open source community for a long timewith high quality.

RISC-V is the future. We're seeing it.

RISC-V is the future. We're seeing it.

RISC-V is the future. We're seeing it.
Once you choose RISC-V, you will immediately have all the software tools you need.

Mark Himelstein, https://github.com/cnrv/RVSC2022-Slides/blob/main/Mark-Himelstein-Keynote.pdf

RISC-V is the future. We're seeing it.
Open source software in several mature commercial areas already supports RISC-V.

Mark Himelstein, https://github.com/cnrv/RVSC2022-Slides/blob/main/Mark-Himelstein-Keynote.pdf

RISC-V is the future. We're seeing it.

But…
Is RISC-V an Embedded Thing (yet)?

RISC-V is the future. We're seeing it.

But…
Is RISC-V an Embedded Thing (yet)?
Since 2023, The Answer is NO.
Now we can have SG2042(Workstation/Server) and TH1520(Netbook) in hands.

RISC-V is the future. We're seeing it.

Up to 1204
RISC-V Cores
in one Rack

RISC-V is the future. We're seeing it.

Nerds Talking to Nerds About RISC-V (Day-1) →https://www.bilibili.com/video/BV1z84y1T7Vi/

RISC-V is the future. We're seeing it.

RISC-V is the future. We're seeing it.

In 2022, (almost) all the popular Linux distros support RISC-V. Linux Desktop is almost there.

Distros

Lang &Runtime

UbuntuopenKylin

DeepinopenEuler

OpenCloudOS

DebianFedoraGentooArch LinuxFreeBSD

C/C++/Fortran/Rust
GNU GCC, Clang/LLVM

Java
OpenJDKOpenWRT
openAnolis

JavaScript
V8, NodeJS, Spidermonkey

OpenBSD

RT-Thread

Yocto

ChromiumOS

FreeRTOS

Buildroot

Go / WASM
Upstreamed

Dart
Upstreamed

C# / .NET
N/A

Very Good Support
Good Support
Basic Support
N/A

RISC-V is the future. We're seeing it.

Web Browsers (Chromium and Firefox), Mail Clients, Eclipse, LibreOﬃce, MultiMedia Player, etc.

RISC-V is the future. We're seeing it.

Now we need to get ready forthe next 1 million RISC-V
software developers
Application Developers &Middleware Developers
Dev Apps on RISC-V(≥94m worldwide/github[1])(≥8m in mainland China[2])Compiler Engineers &System Developers
Porting to RISC-V(10k~100k)[1] https://octoverse.github.com/[2] https://zhuanlan.zhihu.com/p/637787110

Why RuyiSDK: The Motivation
The initial idea (and pain) behind RuyiSDK●The RISC-V instruction set is modular. This is good.

●However, if the user wants to try different combinations,●So how much does it cost?

●Plus vendor-deﬁned extensions?

The initial idea (and pain) behind RuyiSDKBack to 2020, PLCT Lab was working on implementing a few ISA extensions like K, B, and V, etc.
We thought it wouldn't be that hard in the beginning…

Family Bucket Project: Allow users to test all combinations of instruction set extensions

If a customer wants to try out the effects andpros and cons of different instruction set
extension combinations, what should he donow

Source Code → Compiler → Simulator → FPGA

Privilege Mode → Boot/Hyper/Kernel → Simulator → FPGA
Source: PLCT OpenDay 2021,
co-located with The 1st RISC-V Summit China
Current status: QEMU has a public fork and is working on it; GCC is also working on it

The initial idea (and pain) behind RuyiSDK●You need to compile the toolchain yourself, andmaybe the Kernel, uboot, openSBI, etc.

●Vendors may have closed-source binary toolchains
which provides some feature that open source
solutions lacked.
○and "vendor-speciﬁc" bugs and crashes○

There are subtle differences in command-line
arguments between different tools, and evenbetween different versions of the same tool.

●

Need to distinguish between native compilation andcross-compilation.

●

Many downstream or out-of-tree patches.
○

Beware of versions of different system tools
and libs!

The Mission of RuyiSDK●For non-system developers, it simpliﬁes falling into as many implementation details as possible,
and at the same time allows developers to see the principles and processes behind it.

●

Provide the same development process, so that users can easily switch between different open
source tools and vendor-customized toolchains.

●Simplify the environment construction of cross-compilation and native compilation.

●Provides a set of templates that can start with an existing example

RuyiSDK architecture and components

Will support most RISC-V devices available on the market

RuyiSDK architecture and components

RuyiSDK architecture and components•Downstream
https://github.com/ruyisdk/llvm-project•RVV0.7.1•Backend Optimization•Contributors•LiaoChunyu chunyu@iscas.ac.cn•luxufan luxufan@iscas.ac.cn•Shao-Ce SUN sunshaoce@iscas.ac.cn•Qihan Cai qcai8733@uni.sydney.edu.au•Yingwei Zheng dtcxzyw2333@gmail.com•melonedo funanzeng@gmail.com•vincentWu vincenttttwu@gmail.com•Emmmer yjhdandan@163.com

RuyiSDK architecture and components

RuyiSDK architecture and components

RuyiSDK architecture and components

Beyond RuyiSDKThe Next "Big Project"≥ 100 chip & OS companies｜≥ 200 app comanies｜≥18 ﬁeld｜≤5 years

Questions?