Skip to content

Commit a0bb51c

Browse files
committed
Merge branch 'tc-l3' into dev
2 parents 77458a5 + 5d0905a commit a0bb51c

File tree

2 files changed

+52
-18
lines changed

2 files changed

+52
-18
lines changed

README.md

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,19 @@ Season 1 was a first educational practice which aimed to design riscv processor
3333
Unlike Season 1, Season 2 had eleven undergraduates from five universities to design processors, and it is the first attempt to promote this project to the other university.
3434

3535
### Season 3[**2021.7-2022.1**]: More students(One hundred students), More open source tools(NEMU, difftest, AM...)
36-
TreeCore project is the achievement of this season. Season 3 now is completed, and the official website is [ysyx.org](https://ysyx.org/).
36+
TreeCoreL1[[1]](#id_tcl1) and TreeCoreL2[[2]](#id_tcl2) are the achievement of this season. After about six months of development, TreeCoreL2 obtained the qualification of tape-out in second shuttle. You can visit the official website [ysyx.org](https://ysyx.org/) to get more information.
37+
> NOTE: The PCB card with TreeCoreL2 possible return in the second quarter of 2022, so on board debugging cannot release now.
38+
39+
### Season 4[**2022.2.20-2022.8.31, in progress**]: More open source IPs(SDRAM, VGA...), Smoother learning curve(bbs, tutorials, lecture, ...)
40+
TreeCoreL3[[3]](#id_tcl3) and TreeCoreL4[[4]](#id_tcl4) will be the expected achievement of this season.
3741

3842
Now the TreeCore has two version: TreeCoreL1(**_TreeCore Learning 1_**) and TreeCoreL2(**_TreeCore Learning 2_**). The TreeCore project aims to help students to learn how to write riscv processors by themselves with **step-to-step materials**. Not like textbooks only exhibit all of concepts in one time, the learn process of TreeCore is incremental. That means TreeCore only provides a very simple model with necessary new knowledges you need to learn first, then add extra codes to modify the whole design.
3943

40-
> NOTE: now the TreeCoreL2 is under tape-out phase. The chip debug and test introduction will release soon.
4144

4245
## Motivation
4346
I heard the word '**_riscv_**' first time in sophomore year(that is, the summer of 2016). My roommate participated in the pilot class of **_Computer Architecture_**, and their final assignment was to **design a simple soft-core riscv processor**. At that time, I only knew it was an open source RISC ISA launched by the UC, Berkeley. What is unexpected to me is that just after a few period of time, the riscv has been supported by many semiconductor giants and research institutions. Although the performance of riscv are still limited now, **I believe riscv will usher in a revolution that can change the old pattern in someday**.
4447

45-
The best way to learn the processor design is to implement it from scratch. When I searched online and found the learning threshold and cost is very high. In addition, in order to pursue high performance, some open-source riscv cores are very complex(such as using dynamics branch prediction, multi-core processing, out-of-order execution technology, etc), these are very difficult for beginners to learn. So I decided to design a series of open source processors from scratch, which has **simple, understandable architecture, high-quality code with step-to-step tutorial**.
48+
The best way to learn the processor design is to implement it from scratch. When I searched online and found the learning threshold is very high. In addition, in order to pursue high performance, some open-source riscv cores are very complex(such as using dynamics branch prediction, multi-core processing, out-of-order execution technology, etc), these are very difficult for beginners to learn. So I decided to design a series of open source processors from scratch, which has **simple, understandable architecture, high-quality code with step-to-step tutorial**.
4649

4750
I hope it can become a ABC project like Arduino to make more processor enthusiasts and computer related specialized students enter into the computer architecture field. In the future, under the mutual promotion of the software and hardware ecosystem, I believe more people will like processor design and be willing to spend time on it.
4851

@@ -51,14 +54,16 @@ IMG!!!!!!!!!!!!!!!! to intro three type processor and timeline.
5154

5255
**intro** the plan with the such as the target every type core need to meet. and timeline
5356

54-
**TreeCoreL1**
57+
**TreeCoreL1**<span id="id_tcl1"></span>
5558
* 64-bits FSM
5659
* written by chisel3
5760

58-
In fact, TreeCoreL1 is not just a processor, it only supplies the basic implement of Turing machine model: 'loop + '.
61+
In fact, TreeCoreL1 is not a processor, it is a bundle of some independent verilator programs and common chisel modules writing for learning.
62+
63+
List!!!!
5964
IMG!!!!
6065

61-
**TreeCoreL2**
66+
**TreeCoreL2**<span id="id_tcl2"></span>
6267
* 64-bits single-issue, five-stage pipeline riscv core
6368
* written by chisel3
6469
* support RISCV integer(I) instruction set
@@ -71,9 +76,10 @@ asdafafaadsfsafa
7176
IMG!!!!!!!!!!!!!!!
7277

7378

74-
**TreeCoreL3(_under development_)**
79+
**TreeCoreL3(_under development_)**<span id="id_tcl3"></span>
80+
7581

76-
**TreeCoreL4(_under development_)**
82+
**TreeCoreL4(_under development_)**<span id="id_tcl4"></span>
7783
* 64-bits five-stage pipeline riscv core
7884

7985

@@ -99,13 +105,40 @@ To compatible with SoC test, All types of TreeCore have same memory map range:
99105
#### Configuration
100106

101107
## Usage
102-
This section introduces how to set up development environment and runs unit test for your own riscv processor.
108+
This section introduces how to set up development environment and runs unit test for your own riscv processor. Project directory is:
109+
```bash
110+
env ->
111+
| hello_world_tb.gtkw # gtkwave wave config
112+
| hello_world_tb.sh # compile script
113+
| hello_world_tb.v # hello world verilog module
114+
fpga ->
115+
| bare_metal/ # bare metal verilog module for fpga
116+
report ->
117+
| tc_l2.md # treecore l2 wiki
118+
rtl ->
119+
| Makefile # main Makefile for rtl test
120+
| scripts/ # tool scripts called from main Makefile
121+
| build.sc # chisel config
122+
| tc_l(x)[1, 2, 3] # rtl project
123+
tests ->
124+
| compile_rtl.py # bare metal module compile script
125+
| compliance_test.py # isa compliance test
126+
| run_all_isa_test.py # run all isa test
127+
tools ->
128+
| bin2mem.py # convert bin file to mem file
129+
| bin2mif.py # convert bin file to mif file
130+
```
131+
103132
### Enviroment Setup
104133
> NOTE: All of the components and tools are installed under linux operation system. To gurantee the compatibility and stability, I strongly recommend using `ubuntu 20.04 LTS`. `ubuntu 18.04` and `ubuntu 16.04` is not supported official.
105134
106-
First, you need to install verilator, mill and dependency libraries:
135+
If you're new to TreeCore project, we suggest you start with the install section. Remeber you **ONLY** need to install the below libraries once.
136+
> NOTE: In order to download and configure all libraries successful, you **NEED**
137+
138+
First, you need to install verilator, mill, difftest, abstract-machine and other dependency libraries:
107139
```bash
108-
$ cd rtl
140+
$ git clone https://github.com/microdynamics-cpu/tree-core-cpu.git
141+
$ cd tree-core-cpu/rtl
109142
$ chmod +x scripts/install.sh
110143
$ make install
111144
```
@@ -164,13 +197,13 @@ $ make riscvTestBuild
164197
$ make cpuTestBuild
165198
$ make amTestBuild
166199
```
167-
> NOTE: you need to enough memory to compile the application binaries.
200+
> NOTE: you need enough memory to compile the application binaries.
168201
169202
### Recursive test
170203
After you modify the processor design, you need to run recursive unit test to gurantee the modification is correct.
171204

172205
```bash
173-
$ make unit-tests
206+
$ make CHIP_TARGET=tc_l2 unit-test # CHIP_TARGET value is tc_l1, tc_l2, tc_lx...
174207
```
175208

176209
The unit tests display the progress, testcase name, PASS or FAIL and ipc value.
@@ -196,13 +229,13 @@ $ make
196229
```
197230

198231
### SoC test
232+
SoC test is based on ysyxSoC project. SoC test provides more accurate simulation environment for processor design.
233+
199234
```bash
200235
$ make socBuild
201236
$ make socTest
202237
```
203-
### Customize new core project
204-
205-
## Summary
238+
### Add and Customize new project
206239

207240
## Plan
208241

@@ -212,7 +245,8 @@ $ make socTest
212245
All of the TreeCore codes are release under the [GPL-3.0 License](LICENSE).
213246

214247
## Acknowledgement
215-
248+
1. [oscpu-framework](https://github.com/OSCPU/oscpu-framework)
249+
2. [NutShell](https://github.com/OSCPU/NutShell)
216250

217251
## Reference
218252

rtl/scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ install_verilator() {
6060
# git tag # see what versions exist
6161
#git checkout master # use development branch (e.g. recent bug fixes)
6262
#git checkout stable # use most recent stable release
63-
git checkout v4.204 # switch to specified release version
63+
git checkout v4.210 # switch to specified release version
6464

6565
autoconf # create ./configure script
6666
./configure # configure and create Makefile

0 commit comments

Comments
 (0)