mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-19 11:54:46 -04:00
fixed Verilator detection by tests (#1854)
This commit is contained in:
parent
a8c15ca366
commit
cedc21bb35
5 changed files with 14 additions and 9 deletions
|
@ -18,13 +18,13 @@ ROOT_PROJECT=$(readlink -f $(dirname "${BASH_SOURCE[0]}")/../..)
|
|||
# Use the in-tree vendorized Spike if SPIKE_SRC_DIR is not set
|
||||
# or when a fully local installation was requested.
|
||||
if [ -z "$SPIKE_SRC_DIR" -o "$SPIKE_INSTALL_DIR" = "__local__" ]; then
|
||||
SPIKE_SRC_DIR=$ROOT_PROJECT/verif/core-v-verif/vendor/riscv/riscv-isa-sim
|
||||
export SPIKE_SRC_DIR=$ROOT_PROJECT/verif/core-v-verif/vendor/riscv/riscv-isa-sim
|
||||
fi
|
||||
|
||||
# Expect/perform Spike installation in directory $SPIKE_INSTALL_DIR.
|
||||
# which defaults to $ROOT_PROJECT/tools/spike.
|
||||
if [ -z "$SPIKE_INSTALL_DIR" -o "$SPIKE_INSTALL_DIR" = "__local__" ]; then
|
||||
SPIKE_INSTALL_DIR="$ROOT_PROJECT/tools/spike"
|
||||
export SPIKE_INSTALL_DIR="$ROOT_PROJECT/tools/spike"
|
||||
fi
|
||||
|
||||
# Do not clean up the destination directory: leave that to the user (real or CI job).
|
||||
|
|
|
@ -29,7 +29,7 @@ fi
|
|||
# Define the default src+build location of Verilator.
|
||||
# No need to force this location in Continuous Integration scripts.
|
||||
if [ -z "$VERILATOR_BUILD_DIR" ]; then
|
||||
VERILATOR_BUILD_DIR="$ROOT_PROJECT"/tools/verilator-$VERILATOR_HASH/verilator
|
||||
export VERILATOR_BUILD_DIR="$ROOT_PROJECT"/tools/verilator-$VERILATOR_HASH/verilator
|
||||
fi
|
||||
|
||||
# Define the default installation location of Verilator: one level up
|
||||
|
@ -37,7 +37,7 @@ fi
|
|||
# Continuous Integration may need to override this particular variable
|
||||
# to use a preinstalled build of Verilator.
|
||||
if [ -z "$VERILATOR_INSTALL_DIR" ]; then
|
||||
VERILATOR_INSTALL_DIR="$(dirname $VERILATOR_BUILD_DIR)"
|
||||
export VERILATOR_INSTALL_DIR="$(dirname $VERILATOR_BUILD_DIR)"
|
||||
fi
|
||||
|
||||
# Build and install Verilator only if not already installed at the expected
|
||||
|
|
|
@ -20,9 +20,8 @@ if ! [ -n "$BBL_ROOT" ]; then
|
|||
return 1
|
||||
fi
|
||||
|
||||
# install the required tools
|
||||
source verif/regress/install-cva6.sh
|
||||
source verif/regress/install-riscv-dv.sh
|
||||
# setup sim env
|
||||
source verif/sim/setup-env.sh
|
||||
|
||||
if ! [ -n "$DV_SIMULATORS" ]; then
|
||||
DV_SIMULATORS=veri-testharness
|
||||
|
|
|
@ -13,15 +13,21 @@ if ! [ -n "$RISCV" ]; then
|
|||
return
|
||||
fi
|
||||
|
||||
source ./verif/sim/setup-env.sh
|
||||
|
||||
# install the required tools
|
||||
source ./verif/regress/install-verilator.sh
|
||||
source ./verif/regress/install-spike.sh
|
||||
|
||||
# install the required test suites
|
||||
source ./verif/regress/install-riscv-compliance.sh
|
||||
source ./verif/regress/install-riscv-tests.sh
|
||||
source ./verif/regress/install-riscv-arch-test.sh
|
||||
|
||||
# setup sim env
|
||||
source ./verif/sim/setup-env.sh
|
||||
|
||||
echo "$SPIKE_INSTALL_DIR$"
|
||||
|
||||
if ! [ -n "$DV_SIMULATORS" ]; then
|
||||
DV_SIMULATORS=vcs-testharness,spike
|
||||
fi
|
||||
|
|
|
@ -30,7 +30,7 @@ fi
|
|||
|
||||
# Set verilator and spike related variables
|
||||
if [ -z "$VERILATOR_INSTALL_DIR" ]; then
|
||||
export VERILATOR_INSTALL_DIR="$ROOT_PROJECT"/tools/$(ls $ROOT_PROJECT/tools | grep verilator)
|
||||
export VERILATOR_INSTALL_DIR="$ROOT_PROJECT"/tools/$(ls $ROOT_PROJECT/tools | grep verilator | head -n 1)
|
||||
fi
|
||||
|
||||
if [ -z "$SPIKE_SRC_DIR" -o "$SPIKE_INSTALL_DIR" = "__local__" ]; then
|
||||
|
|
Loading…
Add table
Reference in a new issue