Skip to content

Commit

Permalink
removed the usage of install-cva6.sh and add setup-env.sh (#1741)
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinThomazic authored Jan 3, 2024
1 parent 72b8556 commit 706daa0
Show file tree
Hide file tree
Showing 26 changed files with 175 additions and 218 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ jobs:
name: compiled-tools
- name: Run Tests
run: |
set -x
tar xf tools.tar
tar xf tmp.tar
source verif/regress/install-cva6.sh
source verif/sim/setup-env.sh
make run-${{ matrix.testcase}}-verilator target=${{ matrix.target }}
11 changes: 4 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ asic-synthesis:
- echo $PERIOD
- echo $TECH_NAME
- echo $DV_TARGET
- source verif/regress/install-cva6.sh
- source ./verif/sim/setup-env.sh
- echo $SYN_DCSHELL_BASHRC; source $SYN_DCSHELL_BASHRC
- make -C pd/synth cva6_synth TARGET="$DV_TARGET"
- mv pd/synth/cva6_${DV_TARGET}_synth_modified.v artifacts/cva6_${DV_TARGET}_synth_modified.v
Expand All @@ -233,7 +233,7 @@ fpga-build:
TARGET: cv32a60x
script:
- source $VIVADO_SETUP
- source verif/regress/install-cva6.sh
- source ./verif/sim/setup-env.sh
- make fpga target=$TARGET
- mkdir -p artifacts/reports
- mv corev_apu/fpga/work-fpga/ariane_xilinx.bit artifacts/ariane_xilinx_$TARGET.bit
Expand Down Expand Up @@ -460,8 +460,7 @@ smoke-gate:
- echo $FOUNDRY_PATH
- echo $PERIOD
- echo $TECH_NAME
- source verif/regress/install-cva6.sh
- source verif/regress/install-riscv-dv.sh
- source ./verif/sim/setup-env.sh
- source verif/regress/install-riscv-tests.sh
- mv artifacts/cva6_${DV_TARGET}_synth_modified.v pd/synth/cva6_${DV_TARGET}_synth_modified.v
- cd verif/sim
Expand All @@ -481,10 +480,8 @@ fpga-boot:
DASHBOARD_JOB_DESCRIPTION: "Test of Linux 32 bits boot on FPGA Genesys2"
DASHBOARD_SORT_INDEX: 10
DASHBOARD_JOB_CATEGORY: "Synthesis"
VERILATOR_INSTALL_DIR: "NO" # Skip install and checks of verilator
SPIKE_INSTALL_DIR: "NO" # Skip install and checks of spike
script:
- source verif/regress/install-cva6.sh
- source ./verif/sim/setup-env.sh
- source $VIVADO2022_SETUP
- mkdir -p corev_apu/fpga/work-fpga
- mv artifacts/ariane_xilinx_cv32a60x.bit corev_apu/fpga/work-fpga/ariane_xilinx.bit
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ For Debian-based Linux distributions, run :
sudo apt-get install help2man device-tree-compiler
```

5. Run these commands to install a custom Spike and Verilator (i.e. these versions must be used to simulate the CVA6) and [these](#running-regression-tests-simulations) tests suites.
5. Install the riscv-dv requirements:

```sh
pip3 install -r verif/sim/dv/requirements.txt
```

6. Run these commands to install a custom Spike and Verilator (i.e. these versions must be used to simulate the CVA6) and [these](#running-regression-tests-simulations) tests suites.
```sh
# DV_SIMULATORS is detailed in the next section
export DV_SIMULATORS=veri-testharness,spike
Expand Down Expand Up @@ -81,9 +87,9 @@ If exactly 2 simulators are given, their trace is compared ([see the Regression
Here is how you can run the hello world C program with the Verilator model:

```sh
# Make sure to source these 2 scripts to correctly set the environment variables related to the tools
source ./verif/regress/install-cva6.sh
source ./verif/regress/install-riscv-dv.sh
# Make sure to source this script from the root directory
# to correctly set the environment variables related to the tools
source verif/sim/setup-env.sh

# Set the NUM_JOBS variable to increase the number of parallel make jobs
# export NUM_JOBS=
Expand Down Expand Up @@ -387,4 +393,3 @@ If you use CVA6 in your academic work you can cite us:
# Acknowledgements
Check out the [acknowledgements](ACKNOWLEDGEMENTS.md).
1 change: 1 addition & 0 deletions ci/build-riscv-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
VERSION="eeacd5507db7a0f50ca8c4f27aff220fcbb60bdf"

Expand Down
4 changes: 3 additions & 1 deletion ci/setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
set -e
set -x
export ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
export ROOT_PROJECT=$ROOT

Expand All @@ -25,5 +26,6 @@ tar -x -f $RISCV64_UNKNOWN_ELF_GCC --strip-components=1 -C $RISCV

sudo apt install libfl-dev help2man

verif/regress/install-cva6.sh
bash verif/regress/install-verilator.sh
(source verif/sim/setup-env.sh; bash verif/regress/install-spike.sh)
ci/build-riscv-tests.sh
6 changes: 4 additions & 2 deletions verif/regress/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ if [ -z "$RISCV" ]; then
fi

# install the required tools
source verif/regress/install-cva6.sh
source verif/regress/install-riscv-dv.sh
source ./verif/regress/install-verilator.sh
source ./verif/regress/install-spike.sh

source ./verif/sim/setup-env.sh

if [ -z "$DV_SIMULATORS" ]; then
DV_SIMULATORS=veri-testharness,spike
Expand Down
6 changes: 4 additions & 2 deletions verif/regress/coremark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ if ! [ -n "$RISCV" ]; then
fi

# install the required tools
source verif/regress/install-cva6.sh
source verif/regress/install-riscv-dv.sh
source ./verif/regress/install-verilator.sh
source ./verif/regress/install-spike.sh
source verif/regress/install-riscv-compliance.sh
source verif/regress/install-riscv-tests.sh

source ./verif/sim/setup-env.sh

if ! [ -n "$DV_SIMULATORS" ]; then
DV_SIMULATORS=veri-testharness
fi
Expand Down
6 changes: 4 additions & 2 deletions verif/regress/dhrystone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ if ! [ -n "$RISCV" ]; then
fi

# install the required tools
source verif/regress/install-cva6.sh
source verif/regress/install-riscv-dv.sh
source ./verif/regress/install-verilator.sh
source ./verif/regress/install-spike.sh
source verif/regress/install-riscv-compliance.sh
source verif/regress/install-riscv-tests.sh

source ./verif/sim/setup-env.sh

if ! [ -n "$DV_SIMULATORS" ]; then
DV_SIMULATORS=veri-testharness
fi
Expand Down
7 changes: 5 additions & 2 deletions verif/regress/dv-csr-embedded-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ if ! [ -n "$RISCV" ]; then
fi

# install the required tools
source verif/regress/install-cva6.sh
source verif/regress/install-riscv-dv.sh
source ./verif/regress/install-verilator.sh
source ./verif/regress/install-spike.sh

source ./verif/sim/setup-env.sh


export cov=1 #enable the Code Coverage

Expand Down
7 changes: 4 additions & 3 deletions verif/regress/dv-generated-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ if ! [ -n "$RISCV" ]; then
fi

# install the required tools
source verif/regress/install-cva6.sh
source verif/regress/install-riscv-dv.sh
source verif/regress/install-spike.sh
source ./verif/regress/install-verilator.sh
source ./verif/regress/install-spike.sh

source ./verif/sim/setup-env.sh

if ! [ -n "$DV_TARGET" ]; then
DV_TARGET=cv32a6_embedded
Expand Down
7 changes: 4 additions & 3 deletions verif/regress/dv-generated-xif-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ if ! [ -n "$RISCV" ]; then
fi

# install the required tools
source verif/regress/install-cva6.sh
source verif/regress/install-riscv-dv.sh
source verif/regress/install-spike.sh
source ./verif/regress/install-verilator.sh
source ./verif/regress/install-spike.sh

source ./verif/sim/setup-env.sh

if ! [ -n "$DV_TARGET" ]; then
DV_TARGET=cv32a6_embedded
Expand Down
6 changes: 4 additions & 2 deletions verif/regress/dv-riscv-arch-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ if ! [ -n "$RISCV" ]; then
fi

# install the required tools
source verif/regress/install-cva6.sh
source verif/regress/install-riscv-dv.sh
source ./verif/regress/install-verilator.sh
source ./verif/regress/install-spike.sh
source verif/regress/install-riscv-arch-test.sh

source ./verif/sim/setup-env.sh

if ! [ -n "$DV_TARGET" ]; then
DV_TARGET=cv64a6_imafdc_sv39
fi
Expand Down
6 changes: 4 additions & 2 deletions verif/regress/dv-riscv-compliance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ if ! [ -n "$RISCV" ]; then
fi

# install the required tools
source verif/regress/install-cva6.sh
source verif/regress/install-riscv-dv.sh
source ./verif/regress/install-verilator.sh
source ./verif/regress/install-spike.sh
source verif/regress/install-riscv-compliance.sh

source ./verif/sim/setup-env.sh

if ! [ -n "$DV_TARGET" ]; then
DV_TARGET=cv64a6_imafdc_sv39
fi
Expand Down
6 changes: 4 additions & 2 deletions verif/regress/dv-riscv-csr-access-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ if ! [ -n "$RISCV" ]; then
fi

# install the required tools
source verif/regress/install-cva6.sh
source verif/regress/install-riscv-dv.sh
source ./verif/regress/install-verilator.sh
source ./verif/regress/install-spike.sh
source verif/regress/install-riscv-arch-test.sh

source ./verif/sim/setup-env.sh

if ! [ -n "$DV_TARGET" ]; then
DV_TARGET=cv32a60x
fi
Expand Down
6 changes: 4 additions & 2 deletions verif/regress/dv-riscv-mmu-sv32-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ if ! [ -n "$RISCV" ]; then
fi

# install the required tools
source verif/regress/install-cva6.sh
source verif/regress/install-riscv-dv.sh
source ./verif/regress/install-verilator.sh
source ./verif/regress/install-spike.sh
source verif/regress/install-riscv-arch-test.sh

source ./verif/sim/setup-env.sh

if ! [ -n "$DV_TARGET" ]; then
DV_TARGET=cv32a60x
fi
Expand Down
6 changes: 4 additions & 2 deletions verif/regress/dv-riscv-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ if ! [ -n "$RISCV" ]; then
fi

# install the required tools
source verif/regress/install-cva6.sh
source verif/regress/install-riscv-dv.sh
source ./verif/regress/install-verilator.sh
source ./verif/regress/install-spike.sh
source verif/regress/install-riscv-tests.sh

source ./verif/sim/setup-env.sh

if ! [ -n "$DV_TARGET" ]; then
DV_TARGET=cv64a6_imafdc_sv39
fi
Expand Down
6 changes: 4 additions & 2 deletions verif/regress/hwconfig_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ if ! [ -n "$RISCV" ]; then
fi

# install the required tools
source verif/regress/install-cva6.sh
source verif/regress/install-riscv-dv.sh
source ./verif/regress/install-verilator.sh
source ./verif/regress/install-spike.sh
source verif/regress/install-riscv-tests.sh

source ./verif/sim/setup-env.sh

if ! [ -n "$DV_SIMULATORS" ]; then
DV_SIMULATORS=veri-testharness,spike
fi
Expand Down
82 changes: 0 additions & 82 deletions verif/regress/install-cva6.sh

This file was deleted.

23 changes: 0 additions & 23 deletions verif/regress/install-riscv-dv.sh

This file was deleted.

Loading

0 comments on commit 706daa0

Please sign in to comment.