-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 42433fe
Showing
25 changed files
with
706 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Create Release | ||
|
||
on: | ||
workflow_dispatch: # Allows manual triggering of the workflow | ||
schedule: | ||
- cron: '0 0 * * *' # Runs every day at midnight UTC | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all tags and branches | ||
|
||
- name: Get current date | ||
id: date | ||
run: echo "RELEASE_TAG=$(date +'%m-%d-%y')" >> $GITHUB_ENV | ||
|
||
- name: Create GitHub Release with timestamp | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.YSYX_DOCS_CONTENT_TOKEN }} | ||
RELEASE_TAG: ${{ env.RELEASE_TAG }} | ||
run: | | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/${{ github.repository }}/releases \ | ||
-d '{ | ||
"tag_name": "'"$RELEASE_TAG"'", | ||
"target_commitish": "main", | ||
"name": "'"$RELEASE_TAG"'", | ||
"body": "Nightly Release", | ||
"draft": false, | ||
"prerelease": false, | ||
"generate_release_notes": true | ||
}' | ||
- name: Create or update "latest" tag | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git tag -f latest | ||
git push origin :refs/tags/latest | ||
git push origin latest | ||
- name: Create GitHub Release with "latest" tag | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.YSYX_DOCS_CONTENT_TOKEN }} | ||
run: | | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/${{ github.repository }}/releases \ | ||
-d '{ | ||
"tag_name": "latest", | ||
"target_commitish": "main", | ||
"name": "Latest Release", | ||
"body": "Latest Nightly Release", | ||
"draft": false, | ||
"prerelease": false, | ||
"generate_release_notes": true | ||
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build YSYX Docs | ||
|
||
on: | ||
workflow_dispatch: # Allows manual triggering of the workflow | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout ysyx-docs-content | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: oscc-web/ysyx-docs-content | ||
path: ysyx-docs-content | ||
|
||
- name: Checkout ysyx-docs | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: oscc-web/ysyx-docs | ||
path: ysyx-docs | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
cache: 'npm' | ||
cache-dependency-path: ysyx-docs/package*.json | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' # caching pip dependencies | ||
|
||
- name: Install Dependencies | ||
working-directory: ysyx-docs | ||
run: | | ||
npm ci | ||
pip install -r requirements.txt | ||
# Pull content from the local git repo then build the docs | ||
- name: Test doc building | ||
working-directory: ysyx-docs | ||
run: | | ||
python3 ./pull_content.py --local ${{ github.workspace }}/ysyx-docs-content --map zh:docs --map en:i18n/en/docusaurus-plugin-content-docs/current | ||
npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# VuePress 迁移到 Docusaurus 指南 | ||
|
||
本指南重点介绍如何将文档结构从 VuePress 迁移到 Docusaurus。 | ||
|
||
## 文件命名和索引 | ||
|
||
### 文件名 | ||
避免使用 `0.1/0.2` 这种数字前缀作为文件名。请使用以下规则: | ||
- 使用文档的一级标题 `#` 作为文件名 | ||
- 采用驼峰命名法(第一个单词首字母小写,后续单词首字母大写) | ||
- 文件名中不使用空格 | ||
|
||
示例:`gettingStarted.md` 而不是 `0.1 Getting Started.md` | ||
|
||
### 侧边栏索引 | ||
使用 front matter 控制侧边栏中的位置。要将页面放在侧边栏的第一位: | ||
|
||
```yaml | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
``` | ||
|
||
更多 front matter 选项,请参考 [Docusaurus 文档](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#markdown-front-matter)。 | ||
|
||
## 提示框(Admonitions) | ||
|
||
将 VuePress 的自定义容器转换为 Docusaurus 的提示框: | ||
|
||
VuePress: | ||
```markdown | ||
> #### hint::信息框说明 | ||
> 这是一个提示。 | ||
> > #### flag::进度提示 | ||
> | ||
> > #### comment::扩展阅读 | ||
``` | ||
|
||
Docusaurus: | ||
```markdown | ||
:::info[信息框说明] | ||
这是一个提示。 | ||
::: | ||
|
||
:::tip[进度提示] | ||
::: | ||
|
||
:::info[扩展阅读] | ||
::: | ||
``` | ||
|
||
Docusaurus 提供五种内置的提示框类型。使用这些内置类型可以更好地兼容未来的迁移。更多自定义选项,请参阅 [提示框文档](https://docusaurus.io/docs/markdown-features/admonitions)。 | ||
|
||
## 链接 | ||
|
||
使用相对链接引用所有本地文件,以确保多语言支持的正确性: | ||
|
||
```markdown | ||
[链接到另一页](./anotherPage.md) | ||
``` | ||
|
||
## 文本高亮 | ||
|
||
将内联 HTML 替换为 Docusaurus 的 `<Highlight>` 组件: | ||
|
||
VuePress: | ||
```html | ||
<font color=red>重要文本</font> | ||
``` | ||
|
||
Docusaurus: | ||
```jsx | ||
<Highlight color="#c40e0e">重要文本</Highlight> | ||
``` | ||
|
||
指定颜色时使用十六进制 RGB 值。`<Highlight>` 组件定义如下: | ||
|
||
```jsx | ||
import React from 'react'; | ||
|
||
export default function Highlight({children, color}) { | ||
return ( | ||
<span | ||
style={{ | ||
backgroundColor: color, | ||
borderRadius: '2px', | ||
color: '#fff', | ||
padding: '0.2rem', | ||
}}> | ||
{children} | ||
</span> | ||
); | ||
} | ||
``` | ||
|
||
按照这些指南操作,您可以确保从 VuePress 到 Docusaurus 的平滑过渡,同时保持一致的格式,并利用 Docusaurus 的特定功能。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
position: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
position: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Advanced Overview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
position: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Baseline overview | ||
|
||
The Baseline stage is the first formal learning stage of the "One Student One Chip". | ||
There are two goals in the Baseline stage | ||
* Running the NES game Super Mario on a processor designed by yourself | ||
* Understand in depth how Super Mario runs on the processor you designed | ||
|
||
![image](./mario.png) | ||
|
||
Specifically, the tasks in the Baseline stage can be divided into the following parts: | ||
1. Build infrastructures. Infrastructures are tools and methods that help improve debugging efficiency. | ||
If you have heard about the DiffTest (differential testing) mechanism of the third term of the "One Student One Chip", | ||
Then you should probably understand how important infrastructure is for a project of a certain scale. | ||
In addition to DiffTest, you will also implement a simple debugger and various tracing tools. | ||
These infrastructures will accompany you throughout the "One Student One Chip": | ||
Even in stages A and S, you will find that they can still greatly improve debugging efficiency; | ||
What's more? Without these infrastructures, you will be very painful when working on the S stage. | ||
1. Design an RV32E single-cycle processor. | ||
But you will first implement an RV32IM (yes, RV32IM) simulator. | ||
Understand the behavior of RISC-V instructions and programs without considering RTL implementation details, | ||
Then apply these understandings to the real processor implemented in RTL. | ||
1. Implement input and output functionality to the single-cycle processor. | ||
After that, you can run Super Mario on the processor you designed. | ||
1. Implement a simple exception handling mechanism and run the RT-Thread operating system. | ||
1. Implement bus and connect to SoC. | ||
1. Change the processor from a single-cycle processor to a pipelined processor. | ||
|
||
> #### caution::Isn’t it enough just learn how to use tools? Why do I have to spend so much time implementing tools? | ||
> If you really have such questions, you most likely do not understand the meaning of "using the right tools to solve problems", which may be reflected in the following aspects | ||
> 1. Not proactively looking for the right tools to improve work efficiency (such as backing up projects by copying and pasting them instead of using version control tools) | ||
> 1. Even if you know how to use certain tools, you are not willing to spend some time to understand the tools in depth. | ||
> 1. If the tool is open source, you have never thought about adding some customized functions. | ||
> 1. If there was no such tool, you would never even think of writing them by yourself. | ||
> | ||
> Developers who truly understand the meaning of tools will not feel that it is a waste of time: | ||
> Taking the time to understand/implement the tools now will help you earn back your time exponentially in the future. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
slug: / | ||
sidebar_position: 1 | ||
--- | ||
|
||
<!-- # 第六期"一生一芯"课程主页 --> | ||
# The 6th "One Student One Chip" Program Home Page | ||
|
||
<!-- * 课时: 每周六15:00~17:00 | ||
* [B站直播](https://live.bilibili.com/24416626) | [录播链接](https://space.bilibili.com/2107852263/channel/collectiondetail?sid=1523995) --> | ||
* Time: Every Saturday 15:00~17:00 China Standard Time | ||
* [Bilibil Live](https://live.bilibili.com/24416626) | [recording](https://space.bilibili.com/2107852263/channel/collectiondetail?sid=1523995) | ||
|
||
<!-- ## 学习目标 --> | ||
## Learning Objectives | ||
|
||
<!-- "一生一芯"将会培养大家的综合能力. | ||
大家完成学习之后, 将会对以下问题有一定的认识: | ||
1. 处理器是如何设计的? | ||
1. 程序是如何在计算机上运行的? | ||
1. 如何对处理器的性能进行优化? | ||
1. 如何使用/设计正确的工具高效地进行调试? | ||
1. 如何自己编写测试用例进行单元测试? | ||
1. RTL设计如何生成可流片的版图? --> | ||
"One Student One Chip" will develop your general skills. | ||
At the end of the course, you will have a better understanding of the following questions: | ||
1. how processors are designed? | ||
1. how programs run on computers? | ||
1. how to optimize the performance of a processor? | ||
1. how to use/design the right tools for efficient debugging? | ||
1. how to write your own test cases for unit testing? | ||
1. how does an RTL design generate a flowable layout? | ||
|
||
<!-- 我们将会引导大家设计一款RISC-V流水线处理器, | ||
并在自己设计的处理器上运行操作系统, | ||
在操作系统上运行真实游戏. | ||
达成指标的处理器将可以接入到SoC, 并获得流片机会. --> | ||
We will guide you to design a RISC-V pipeline processor. | ||
Run an operating system on your processor. | ||
Run a real game on the OS. | ||
The processor that achieves the target will be connected to the SoC and will be given the opportunity to tapeout. | ||
|
||
<!-- ## 教学资源 --> | ||
## Learning Resource | ||
|
||
<!-- * 可点击图标跳转到相应资源 | ||
* 完整的讲义可通过页面右上方导航栏查看 | ||
* S阶段讲义内容仍然在🕊 --> | ||
* Icons can be clicked to jump to the appropriate resource | ||
* Complete handouts can be viewed via the navigation bar at the top right of the page | ||
* The content of the Stage S handout is still available 🕊 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
# How to ask smart questions | ||
|
||
:::tip[Fill in the general education questionnaire] | ||
Before starting the first task of pre learning, please carefully read the content in sections ["Signup"](https://ysyx.oscc.cc/signup/) and ["FAQ"](https://ysyx.oscc.cc/project/faq.html) on the official website and fill in ["The general education questionnaire of 'One Student One Chip'"](https://www.wenjuan.pub/s/UZBZJv6ci37/#). **Note: The general education questionnaire can be repeated many times, and only those who score 100 can apply for admission defense.** | ||
::: | ||
|
||
:::tip[Read "How To Ask Questions The Smart Way" and "Stop Ask Questions The Stupid Ways", and write an essay of your thoughts on them] | ||
Your first task in the prestudy is to read the articles ["How To Ask Questions The Smart Way"](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md) and ["Stop Ask Questions The Stupid Ways"](https://github.com/tangx/Stop-Ask-Questions-The-Stupid-Ways/blob/master/README.md) and [Don't Ask Like a Retard](https://github.com/tangx/Stop-Ask-Questions-The-Stupid-Ways/blob/master/README.md), and write an 800-word essay about your experience of asking and being asked questions, and what you think about "good questioning" and "Independent problem solving through STFW and RTFM". | ||
> | ||
This task is not intended to be a waste of time, nor is it intended to prohibit you from asking any questions, but it is intended to show you "what is the right thing to do". When you are willing to work on these "right things" and try to ask questions in a professional way, you have already taken the first step to become a "professional". | ||
::: | ||
|
||
:::tip[STFW, RTFM, RTFSC] | ||
Try to find and understand the meanings of the three acronyms in the above article. | ||
> | ||
You may feel offended by the F word, but in fact the meaning of the F word is never the point, it just reflects the legend behind the three acronyms and makes them easier to remember. For example, RTFSC originated with the first words of Linus Torvalds, the father of Linux, in a reply to an email dated April 1, 1991, which is still available on the Internet mailing list. Interestingly, Andrew S. Tanenbaum, in [Lessons Learned from 30 Years of MINIX](https://cacm.acm.org/magazines/2016/3/198874-lessons-learned-from-30-years-of-minix/fulltext) cites this e-mail as an example of how easy it was to learn the MINIX operating system: Linus Torvalds, as a student, learned MINIX in about 10 days. | ||
::: | ||
|
||
:::warning[It's not so much learning to ask questions as it is learning not to ask questions.] | ||
Many students, more or less, have the illusion that. | ||
I asked a master for advice, he gave it to me, and I learned it. | ||
> | ||
But have you ever thought that in the future you will join a company and your leader will ask you to attempt a technical solution; or in the future you will join a school project team and your advisor will ask you to explore a new topic. You may think: I'll be surrounded by great coworkers, or I'll have senior colleagues to guide me. But the reality is that your coworkers have their own KPIs to fulfill, and your senior colleagues have their own projects to work on, and no one wants to be chased around by you asking questions, so how are you going to get things done when there is no master to tell you the answers one day? | ||
> | ||
If you don't think you can do it on your own, you probably lack <Highlight color="#c40e0e">the ability to solve problems on your own.</Highlight> | ||
> | ||
But fortunately, this ability can be trained. The masters they've developed their independent problem solving skills long before you did: they've solved a million weird problems while you've been asking them for advice on a stupid one. In fact, your ability to solve problems is directly proportional to your dedication to solving them independently, and when a master tells you the answer, it's a demonstration of the master's ability, not yours. Therefore, in order to develop independent problem solving ability, and more importantly, to correct your own mindset: <Highlight color="#c40e0e">you come to learn, you should do your best to solve all the problems encountered independently</Highlight>(of course, except for some due to the framework code defects). | ||
::: | ||
|
||
:::warning[I'm a master who enjoys helping others] | ||
Take Nanjing University's terrifying PA course as an example, we have seen too many situations like this: at the beginning of each semester, there are always a few enthusiastic senior students from the previous semester answering all kinds of questions for novice students, and these novice students do feel the warmth of the enthusiastic senior students shielding them from the wind and rain during the brutal PA training. However, after a month or two, these enthusiastic mentors would suddenly disappear, leaving these newbies waiting in the cold wind of PA; while some other students would have already developed the right mindset and skills during the month or two, and grown into professionals who can take charge of their own business, and continue to move forward under the encouragement of PA. We don't know the mysterious reasons for the sudden disappearance of these enthusiastic seniors, maybe they felt the pressure of their own school work, maybe they got tired of answering these endless questions, or maybe they suddenly felt that the help they provided to the newbies was not really helping them. But whatever the case, the novice students will no longer be able to complete their PA training on their own, as they will be faced more difficult questions than they were at the beginning of the semester, only now they are finally on their own. | ||
> | ||
So, while we don't deny you the sense of fulfillment that comes from helping your fellow classmates, we think there are a lot more serious issues to think about: | ||
> | ||
what if some student asked a simply question, can you drill down to the root cause of it? | ||
> | ||
When a student can't solve a problem without asking you, is what you did before really helping them? | ||
> | ||
More importantly, can you take responsibility for the future of these students? | ||
> | ||
If you ask "what do you want this student to be like", I think we all have the same goal: to let them become a professional in the future. But at the same time, you need to realize that <Highlight color="#c40e0e">learning is a long term process.</Highlight>If you just tell him the answer to a question and he becomes a professional, how can you justify the sweat of the senior engineers who have been working on the front line for years? | ||
> | ||
So, <Highlight color="#c40e0e">every time you give them an answer, every time you help them solve a problem, you are depriving them of the opportunity to receive professional training.</Highlight>Instead, if you really want to help them you can try to point out the missing concepts and skills without interfering with their training, let them do the research/read the manual/look at the code if they need to, guide them to come up with their own thinking about the problem, and then try to summarize the solution indenpendently. It's not easy for you or for them, but learning is a costly process: if you make it easy for them to get the answer to a problem, then they won't get the training they need by solving the problem. | ||
::: | ||
|
||
:::info[Channels for asking questions] | ||
* Group chat (recommendation), the more active students can hopefully be developed into teaching assistants. [Discord Server](https://discord.gg/dKyq46VeSQ) | ||
* Private chat with TAs (TAs also have other work commitments and may not be able to respond in a timely manner). | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
position: 2 |
Oops, something went wrong.