Skip to content

Commit 58de122

Browse files
committed
docs: add mill manual install intro section
1 parent 2bcb752 commit 58de122

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,12 @@ To compatible with SoC test, All types of TreeCore have same memory map range:
9999
#### Configuration
100100

101101
## Usage
102-
adsfadfasdfasf
102+
This section introduces how to set up development environment and runs unit test for your own riscv processor.
103103
### Enviroment Setup
104104
> 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.
105105
106106
First, you need to install verilator, mill and dependency libraries:
107107
```bash
108-
$ su -
109108
$ cd rtl
110109
$ chmod +x scripts/install.sh
111110
$ make install
@@ -119,7 +118,7 @@ After that, you need to add the `NEMU_HOME` and `NOOP_HOME` environment variable
119118
```bash
120119
$ echo export NEMU_HOME=$(pwd)/dependency/NEMU >> ~/.bashrc # according to shell type your system uses
121120
$ echo export NOOP_HOME=$(pwd)/dependency >> ~/.bashrc
122-
$ exec bash
121+
$ source ~/.bashrc
123122
```
124123

125124
Becuase running the isa test don't need 8G memory, so you need to config the simulation memory size to reduce memory usage. You need to type `make menuconfig` as follow:
@@ -153,6 +152,7 @@ Last, remember to type `Save` button in bottom menu to save the `.config` file.
153152
If you already run above commands correctly, you need to compile runtime libraries as follow:
154153

155154
```bash
155+
$ cd ../../
156156
$ make nemuBuild
157157
$ make dramsim3Build
158158
```
@@ -164,13 +164,24 @@ $ make riscvTestBuild
164164
$ make cpuTestBuild
165165
$ make amTestBuild
166166
```
167-
> NOTE: you need to enough memory to compile the
167+
> NOTE: you need to enough memory to compile the application binaries.
168168
169169
### Recursive test
170-
or after you modify the processor design, you need to run recursive test to gurantee the
170+
After you modify the processor design, you need to run recursive unit test to gurantee the modification is correct.
171+
171172
```bash
172173
$ make unit-tests
173174
```
175+
176+
First, Running unit test need to download `mill` from github. If you cannot access the github correctly, you need to type below commands to configure `mill` manually:
177+
178+
```bash
179+
$ # download '0.9.9-assembly' from https://github.com/com-lihaoyi/mill/releases/download/0.9.9/0.9.9-assembly manually.
180+
$ cp 0.9.9-assembly ~/.cache/mill/download
181+
$ mv ~/.cache/mill/download/0.9.9-assembly ~/.cache/mill/download/0.9.9 # change name
182+
$ chmod +x ~/.cache/mill/download/0.9.9
183+
```
184+
174185
IMG!!!!!!!!!
175186

176187
### Software test

0 commit comments

Comments
 (0)