├── .gitignore ├── README.cn.md ├── README.md └── Resources.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Node rules: 2 | ## Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 3 | .grunt 4 | 5 | ## Dependency directory 6 | ## Commenting this out is preferred by some people, see 7 | ## https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git 8 | node_modules 9 | 10 | # Book build output 11 | _book 12 | 13 | # eBook build output 14 | *.epub 15 | *.mobi 16 | *.pdf 17 | -------------------------------------------------------------------------------- /README.cn.md: -------------------------------------------------------------------------------- 1 | # RISC-V 培训项目 2 | 3 | 目前 PLCT 实验室主要提供编译器课程的培训。目前只有中文。欢迎通过实习形式加入到具体的项目开发中,或参与旁听 PLCT 编译技术讨论班(见下方)。 4 | 同时,英文版课程以及模拟器相关课程也在准备中,敬请期待。 5 | 6 | ## 淦 之 V8 移植系列讲座 7 | 8 | - 《淦!移植个V8不可能这么难!》:https://www.bilibili.com/video/BV1hp4y1t7Mx/ 9 | 10 | - 《淦!这个月V8又修改了什么?!》:https://www.bilibili.com/video/BV1DD421V7Vn/ 11 | 12 | ## 手搓 RISC-V 高性能模拟器 · 2023 年 4 月 13 | 14 | 在本课程中,我们将使用 C 语言从零开始实现一个高性能 RISC-V 64 位模拟器。在课程的最后,我们会得到一个代码量 4000 行左右的,零依赖的用户态程序模拟器,可以运行一些真实世界的程序,比如 Lua 4.0。如果读者好奇 JIT 模拟器的工作原理,那么本课程正是为你准备的。 15 | 16 | 视频地址: 17 | 18 | https://space.bilibili.com/296494084/channel/collectiondetail?sid=1245472 19 | 20 | 仓库地址: 21 | 22 | https://github.com/ksco/rvemu 23 | 24 | 课程网站: 25 | 26 | https://ksco.cc/rvemu/ 27 | 28 | ## 从零开始实现链接器 · 2022 年秋季 29 | 30 | 在本课程中,我们会从零开始使用 Go 语言实现一个 RV64GC(RISC-V 64 位)架构的链接器,可以正确地链接相对简单的 C 程序。通过学习本课程,我们可以掌握链接器最核心部分的工作原理。 31 | 32 | 视频地址: 33 | 34 | https://space.bilibili.com/296494084/channel/collectiondetail?sid=857032 35 | 36 | 仓库地址: 37 | 38 | https://github.com/ksco/rvld 39 | 40 | 课程网站: 41 | 42 | https://ksco.cc/rvld/ 43 | 44 | ## 徒手写一个 RISC-V 编译器 · 2022 年 7 月 45 | 46 | 本课程基于 rui314 的 chibicc,由原来的 X86 架构改写为 RISC-V 64 架构,同时加入了大量的中文注释,并且配有 316 节对应于每一个 commit 的课程,帮助读者可以层层推进、逐步深入地学习编译器的构造。 47 | 48 | 视频地址: 49 | 50 | https://space.bilibili.com/296494084/channel/collectiondetail?sid=571708 51 | 52 | 仓库地址: 53 | 54 | https://github.com/sunshaoce/rvcc 55 | 56 | 57 | ## 编译技术入门与实战·第三季·2021年4月 58 | 59 | 本期将在前两期的基础上,结合LLVM源代码,讲解10个常用算法。最后实现一个RISC-V优化的大作业。 60 | 61 | 视频地址: 62 | 63 | https://www.bilibili.com/video/BV14b4y1X7uX/ 64 | 65 | 仓库地址: 66 | 67 | https://github.com/lazyparser/becoming-a-compiler-engineer 68 | 69 | ## PLCT编译器设计讨论班(2020秋)aka 编译技术入门与实战·第二季 70 | 71 | 每周五、周六的下午3点到4点之间进行讨论课,线上腾讯会议的形式,欢迎加入讨论。进入方式是添加我(lazyparser)的微信 fangzhang1024 (备注编译课程)进入微信学习群,每次会议的通知会在群里发出来。以及一些资源也会在群里贴出。 72 | 73 | - 第16次讨论:RISC-V ABI 介绍 by 林思南 [video](https://www.bilibili.com/video/BV1bz4y1S71o) 74 | - 第15次讨论:GCC入门(二)RTL by 陈嘉炜 [video](https://www.bilibili.com/video/BV1gy4y1H7bg) 75 | - 第14次讨论:上手开发GCC-陈嘉炜 [video](https://www.bilibili.com/video/BV1Nf4y1y7Bz) 76 | - 第13次讨论:RVV-LLVM设计、shecc代码、RISCV反汇编器、EEMBC [video](https://www.bilibili.com/video/BV1Uz4y1r7sq) 77 | - 第13次讨论:RVV-LLVM设计、shecc代码、RISCV反汇编器、EEMBC [video](https://www.bilibili.com/video/BV1Uz4y1r7sq) 78 | - 第12次讨论:LLVM栈对齐、shecc libc、zfinx gdb反汇编支持 [video](https://www.bilibili.com/video/BV1AT4y1u7ys) 79 | - 第11次讨论:LLVM寄存器表示、RISC-V指令集学习方法 [video](https://www.bilibili.com/video/BV1kp4y1z7JU) 80 | - 第10次讨论:RV32Emu-Next [video](https://www.bilibili.com/video/BV1nv411r7yf) 81 | - 第09次讨论:LLVM GlobalISel、RISC-V Zfinx GNU Impl [video](https://www.bilibili.com/video/BV1iz4y1y7Xe) 82 | - 第08次讨论:OpenJ9、LLVM、RISC-V、Zfinx [video](https://www.bilibili.com/video/BV1hv411r7ns) 83 | - 第07次讨论:为 rvv-llvm 添加一个 intrinsic (廖春玉) [video](https://www.bilibili.com/video/bv1PA411j79G) 84 | - 第06次讨论:指令选择、Zfinx、MIT作业 [video](https://www.bilibili.com/video/BV1Tz4y1y7Ng) 85 | - 第05次讨论:Tiger编译器RISC-V后端、MLIR运行GEMM在蜂鸟FPGA评估版上 [video](https://www.bilibili.com/video/BV14t4y1e7nJ) 86 | - 第04次讨论:Register Scavenger、编译优化简介 [video](https://www.bilibili.com/video/BV1Qt4y1Y7yc) 87 | - 第03次讨论:LLVM、SDT、作业 [video](https://www.bilibili.com/video/bv1Ky4y1879o) 88 | - 第02次讨论:EaC ch4、LLVM IR、shecc 教学编译器 [video](https://www.bilibili.com/video/BV1zA41177SH) 89 | - 第01次讨论:《编译器设计》前三章回顾 [video](https://www.bilibili.com/video/BV1454y1m7EF) 90 | 91 | ## 编译技术入门与实战·第一季·2019秋 92 | 93 | 所有的课程视频可以通过以下入口访问,后续课程会通过增加分p的方式陆续上传: 94 | 95 | https://www.bilibili.com/video/av78503049 96 | 97 | 本仓库地址是 98 | 99 | https://github.com/lazyparser/becoming-a-compiler-engineer 100 | 101 | 计划更新至2020年8月(收到COVID-19影响延长2个月)。 102 | 103 | https://github.com/lazyparser/becoming-a-compiler-engineer-codes 104 | 105 | 可以参考的学生作业 106 | 107 | https://github.com/wenwensong114/scanner 108 | 109 | 可以参考的教材: 110 | 111 | https://pandolia.net/tinyc/index.html 112 | 113 | 偏实战,用简单和易于实现的实例来描述基本的编译原理及过程 114 | 115 | 116 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RISCV-Training 2 | 3 | Currently our training materials are in Chinese language. Please check [Zh-CN](README.cn.md) for more contents. 4 | Also check [our seminar recordings on Bilibili](https://space.bilibili.com/296494084). 5 | The English version is coming soon. 6 | 7 | The PLCT Lab is a toolchain team focusing on RISC-V related compilers, emulators, and language virtual machines. 8 | It is part of Intelligence Software Research Center (ISRC), which is part of Institute of Software, 9 | Chinese Academy of Sciences (ISCAS). 10 | 11 | The PLCT Lab is providing RISC-V related skill training, including: 12 | - Write LLVM Backend for RISC-V custom extensions. 13 | - Optimize toolchain for specific CPUs and specific work load. 14 | - Add new CPU or Machine/SoC emulations in QEMU. 15 | - Extend Spike Emulator for custom purpose. 16 | 17 | By joining the training program, you could get involved with the latest feature developing 18 | among mulitple open source porjects. For example: 19 | - RISC-V Vector Extension in LLVM upstream. 20 | - XuanTie C910 LLVM toolchain development and support. 21 | - Neclei N300 Series SoC and other new SoCsupport in QEMU. 22 | - New feature implementations for Spike emulator. 23 | - Code size and Performance evaluations for RISC-V toolchains. 24 | 25 | The Training Program is still in the early development stage. We welcome college students and anyone who is 26 | interested in RISC-V software ecosystem to join the program as pilot, work together to improve the project. 27 | 28 | Currently the training materials are mainly in Simplified Chinese language. We are working on translating 29 | the materials in to English and possibily other languages. Volunteers are welcome! 30 | 31 | Contact: wuwei2016[at]iscas.ac.cn 32 | 33 | -------------------------------------------------------------------------------- /Resources.md: -------------------------------------------------------------------------------- 1 | # The Resources of RISC-V 2 | 3 | ## Courses 4 | 5 | 1. [Western Digital: Assembly Language Tutorial](https://www.bilibili.com/video/BV1eJ411t7JS) 6 | 7 | 2. [CS61C: Great Ideas in Computer Architecture](https://www.bilibili.com/video/BV1fC4y147iZ) 8 | 9 | 3. [EECS2021E:Computer Organization and Architecture (RISC-V)](https://www.bilibili.com/video/BV1vT4y1c7Es) -Amir Ashouri 10 | 11 | [(备用链接)](https://www.bilibili.com/video/BV1XZ4y1M7B2) 12 | 13 | 4. [读书课程:Computer Organization and Design (RISC-V)](https://www.bilibili.com/video/BV1kz4y1D7vL) 14 | 15 | 5. [清华大学:操作系统(RISC-V版)](https://www.bilibili.com/video/BV1GE41157Hc) -向勇,陈渝 16 | 17 | 6. [浙江大学:计算机组成与设计](https://www.bilibili.com/video/BV1tz411z7GN/) 18 | 19 | 7. [芯来科技:RISC-V处理器设计](https://space.bilibili.com/398205429) 20 | 21 | 8. [Introduction to RISC-V](https://learning.edx.org/course/course-v1:LinuxFoundationX+LFD110x+1T2021/home) 22 | 23 | ## Global Summit 24 | 25 | 1. [Global Summit 2019](https://www.bilibili.com/video/BV1Mg4y1i7t2/) 26 | --------------------------------------------------------------------------------