Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit bfbed38

Browse files
committed
feat: single cycle CPU
1 parent b1229ea commit bfbed38

32 files changed

+686
-986
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
.DS_Store
1+
.DS_Store
2+
3+
src/core.vvp
4+
src/dump.vcd
5+
src/wave.gtkw

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,38 @@
44
>
55
> **Warning**: 仅供参考,请勿抄袭
66
7-
RISC-V CPU,Verilog 实现。
7+
## 实验进度
8+
9+
系统贯通课程会逐步实现一个 RISC-V 五级流水线 CPU,并实现异常处理、分支预测、Cache 等功能。本 repo 通过分支、tag 等来记录实验进度,保存各阶段成果。
10+
11+
- [x] 系统 Ⅰ lab5-1/lab5-2:单周期 CPU
12+
- [ ] extra:单周期 CPU with 特权指令/异常处理
13+
- [ ] 系统 Ⅱ lab1:流水线 CPU (stall)
14+
- [ ] 系统 Ⅱ lab2:流水线 CPU (forwarding)
15+
- [ ] 系统 Ⅱ lab7:流水线 CPU with 特权指令/异常处理
16+
- [ ] 系统 Ⅲ lab1:流水线 CPU with 动态分支预测
17+
- [ ] 系统 Ⅲ lab2:流水线 CPU with Cache
18+
19+
## 实验环境
20+
21+
课内使用 vivado 以及 Nexys A7-100T FPGA 开发板进行实验。
22+
23+
为了在非 Windows 平台开发/仿真方便,使用了 [Icarus Verilog](https://github.com/steveicarus/iverilog) 以及 [GTKWave](https://github.com/gtkwave/gtkwave/) 进行仿真。
24+
25+
## 编译与仿真
26+
27+
使用了一个 Makefile 来整合编译、仿真等操作:
28+
29+
- `make`:编译、仿真,并打开 GTKWave 查看波形
30+
- `make compile`:编译
31+
- `make simulate`:仿真,并打开 GTKWave 查看波形
32+
33+
需要通过 `GTKWAVE=/path/to/your/gtkwave` 来指定 GTKWave 的路径。
34+
35+
## 声明
36+
37+
没有认真学过 verilog,写的都挺屎的,反正能跑就行,跑起来了也就懒得改了。仅供参考,参考价值或许也不那么大(x,那就仅供记录(✓
38+
39+
## LICENSE
40+
41+
都是基于 [starter code](https://github.com/TonyCrane/CraneCPU/commit/08b1c5129c9c933bebcf9a755afddb13f8b7d679) 完全自己写的,就用个 MIT License 吧。

0 commit comments

Comments
 (0)