Skip to content

Commit c4179b6

Browse files
committed
fixed the setup script and guide
1 parent 46f02c6 commit c4179b6

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build
22
ece
33
tools*
4-
*.elf
4+
*.elf

Diff for: guides/getting-started.md

+25-5
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,33 @@ All necessary tools have been installed to linux.engr.ucsb.edu. Therefore we rec
2626

2727
1. Set `$RISCV` to wherever you want the tools to be installed to. i.e. `export RISCV=~/riscv-tools`
2828
2. Run [`./cva6/ci/setup.sh`](https://github.com/openhwgroup/cva6/blob/master/ci/setup.sh). (If you get an error, you may need to rerun parts of the script manually).
29-
3. In ["./setup.sh"](https://github.com/openhwgroup/cva6/blob/master/ci/setup.sh), change the `$RISCV` initialization to whatever you chose for step 1.
29+
3. Install the [OSS CAD Suite](https://github.com/YosysHQ/oss-cad-suite-build). You can do this by un-taring the latest release to a `"~/Utils/oss-cad-suite"` directory.
30+
4. Add the following to your `"~/.bashrc"`, and replace the values of the 3 environment variables:
31+
32+
```bash
33+
# ECE 154B local machine ~/.bashrc additions
34+
# Author: Ethan Sifferman <[email protected]>
35+
# Purpose: Configure riscv64-unknown-elf-gcc, fesvr, verilator-4.110, gtkwave
36+
export RISCV_ROOT=<REPLACE THIS WITH YOUR RISCV ROOT>
37+
export VERILATOR_ROOT=<REPLACE THIS WITH YOUR VERILATOR 4.110 ROOT>
38+
export OSS_CAD_SUITE=<REPLACE THIS WITH YOUR OSS CAD SUITE ROOT>
39+
export PATH=$RISCV_ROOT/bin:$VERILATOR_ROOT/bin:$PATH:$OSS_CAD_SUITE/bin
40+
# end ECE 154B
41+
```
3042

3143
### linux.engr.ucsb.edu Tool Setup
3244

33-
1. Set `$RISCV` to `/ece/riscv` using `export RISCV=/ece/riscv`.
34-
2. **TODO: Add thigs to `$PATH`**
35-
3. In [`"./setup.sh"`](https://github.com/openhwgroup/cva6/blob/master/ci/setup.sh), ensure `$RISCV` is set to `/ece/riscv`.
45+
Add the following to your `"~/.bashrc"`:
46+
47+
```bash
48+
# ECE 154B ~/.bashrc additions
49+
# Author: Ethan Sifferman <[email protected]>
50+
# Purpose: Configure riscv64-unknown-elf-gcc, fesvr, verilator-4.110, gtkwave
51+
export RISCV_ROOT=/ece/riscv
52+
export VERILATOR_ROOT=/ece/verilator-4.110
53+
export PATH=$RISCV_ROOT/bin:$VERILATOR_ROOT/bin:$PATH:/ece/oss-cad-suite/bin
54+
# end ECE 154B
55+
```
3656

3757
## Regular Setup
3858

@@ -49,7 +69,7 @@ You can see example programs in [`"./programs/examples"`](https://github.com/sif
4969
### Running the Simulation
5070

5171
1. `cd cva6`
52-
2. `make verilate DEBUG=1`
72+
2. `make verilate DEBUG=1 TRACE_FAST=1`
5373
3. `./work-ver/Variane_testharness -v dump.vcd <PATH TO ELF>`
5474
4. To view the waves, run `gtkwave dump.vcd`. (This should probably be done in another terminal to not interfere with running more simulations.)
5575
5. Navigate to **TOP.ariane_testharness.i_ariane.i_cva6** to see all the logic for the core.

Diff for: setup.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
# https://github.com/PrincetonUniversity/openpiton/blob/3cc7bf4d3d1ee2f8e18c33eda6c136a57222806b/piton/ariane_setup.sh
44

55
# tool install directory
6-
export RISCV=`pwd`/tools
6+
export RISCV=$RISCV_ROOT
77

88
# init cva6 submodule
99
git submodule update --init --recursive
1010

1111
# PATHS
1212
export CVA6_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/cva6" && pwd)
13-
export PATH=$RISCV/bin:/bin:$PATH
1413
export LIBRARY_PATH=$RISCV/lib
1514
export LD_LIBRARY_PATH=$RISCV/lib
1615
export C_INCLUDE_PATH=$RISCV/include

0 commit comments

Comments
 (0)