From 61c38ea459a4f30b6e5e3f28b321f2fcda12c9b1 Mon Sep 17 00:00:00 2001 From: Jean-Roch Coulon Date: Mon, 21 Oct 2024 17:42:11 +0200 Subject: [PATCH] Install Verilator only if DV_SIMULATORS == veri-testharness --- verif/regress/benchmark.sh | 12 +++++++----- verif/regress/coremark.sh | 12 +++++++----- verif/regress/cv32a6_tests.sh | 11 ++++++----- verif/regress/cv64a6_imafdc_tests.sh | 11 ++++++----- verif/regress/cvxif_verif_regression.sh | 12 +++++++----- verif/regress/dhrystone.sh | 12 +++++++----- verif/regress/dhrystone_smoke.sh | 12 +++++++----- verif/regress/dv-csr-embedded-tests.sh | 12 +++++++----- verif/regress/dv-generated-tests.sh | 5 ----- verif/regress/dv-generated-xif-tests.sh | 5 ----- verif/regress/dv-riscv-tests.sh | 12 +++++++----- verif/regress/hwconfig_tests.sh | 12 +++++++----- verif/regress/smoke-gen_tests.sh | 12 +++++++----- verif/regress/smoke-tests-cv32a65x.sh | 10 ++++++---- verif/regress/smoke-tests-cv32a6_imac_sv32.sh | 11 ++++++----- verif/regress/smoke-tests-cv64a6_imafdc_sv39.sh | 11 ++++++----- 16 files changed, 93 insertions(+), 79 deletions(-) diff --git a/verif/regress/benchmark.sh b/verif/regress/benchmark.sh index 955f29d912..282bafdec9 100644 --- a/verif/regress/benchmark.sh +++ b/verif/regress/benchmark.sh @@ -13,16 +13,18 @@ if [ -z "$RISCV" ]; then return fi +if [ -z "$DV_SIMULATORS" ]; then + DV_SIMULATORS=veri-testharness,spike +fi + # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh source ./verif/sim/setup-env.sh -if [ -z "$DV_SIMULATORS" ]; then - DV_SIMULATORS=veri-testharness,spike -fi - if [ -z "$DV_TARGET" ]; then DV_TARGET=cv64a6_imafdc_sv39 fi diff --git a/verif/regress/coremark.sh b/verif/regress/coremark.sh index 225b5f033b..b21ec7e86b 100644 --- a/verif/regress/coremark.sh +++ b/verif/regress/coremark.sh @@ -18,16 +18,18 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-uvm +fi + # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh source ./verif/sim/setup-env.sh -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-uvm -fi - if ! [ -n "$DV_HWCONFIG_OPTS" ]; then DV_HWCONFIG_OPTS="cv32a65x" fi diff --git a/verif/regress/cv32a6_tests.sh b/verif/regress/cv32a6_tests.sh index 03496d4a3e..0af6cc0231 100644 --- a/verif/regress/cv32a6_tests.sh +++ b/verif/regress/cv32a6_tests.sh @@ -14,9 +14,14 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-testharness,spike +fi # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh # install the required test suites @@ -27,10 +32,6 @@ source ./verif/sim/setup-env.sh echo "$SPIKE_INSTALL_DIR$" -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-testharness,spike -fi - if ! [ -n "$DV_TARGET" ]; then DV_TARGET=cv32a65x fi diff --git a/verif/regress/cv64a6_imafdc_tests.sh b/verif/regress/cv64a6_imafdc_tests.sh index 015e43b7ad..e5164f40e6 100644 --- a/verif/regress/cv64a6_imafdc_tests.sh +++ b/verif/regress/cv64a6_imafdc_tests.sh @@ -17,9 +17,14 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-testharness,spike +fi # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh # install the required test suites @@ -30,10 +35,6 @@ source ./verif/sim/setup-env.sh echo "$SPIKE_INSTALL_DIR$" -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-testharness,spike -fi - if ! [ -n "$DV_TARGET" ]; then DV_TARGET=cv64a6_imafdc_sv39_hpdcache fi diff --git a/verif/regress/cvxif_verif_regression.sh b/verif/regress/cvxif_verif_regression.sh index 224a770e26..4d7b9e6503 100644 --- a/verif/regress/cvxif_verif_regression.sh +++ b/verif/regress/cvxif_verif_regression.sh @@ -14,8 +14,14 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-testharness,spike +fi + # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh # setup sim env @@ -23,10 +29,6 @@ source ./verif/sim/setup-env.sh echo "$SPIKE_INSTALL_DIR$" -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-testharness,spike -fi - if ! [ -n "$UVM_VERBOSITY" ]; then export UVM_VERBOSITY=UVM_NONE fi diff --git a/verif/regress/dhrystone.sh b/verif/regress/dhrystone.sh index 72f3dbcb27..160608a290 100644 --- a/verif/regress/dhrystone.sh +++ b/verif/regress/dhrystone.sh @@ -13,16 +13,18 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-uvm +fi + # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh source ./verif/sim/setup-env.sh -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-uvm -fi - if ! [ -n "$DV_HWCONFIG_OPTS" ]; then DV_HWCONFIG_OPTS="cv32a65x" fi diff --git a/verif/regress/dhrystone_smoke.sh b/verif/regress/dhrystone_smoke.sh index 5f0f332fa8..f1238cb805 100644 --- a/verif/regress/dhrystone_smoke.sh +++ b/verif/regress/dhrystone_smoke.sh @@ -13,16 +13,18 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-uvm +fi + # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh source ./verif/sim/setup-env.sh -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-uvm -fi - make clean make -C verif/sim clean_all diff --git a/verif/regress/dv-csr-embedded-tests.sh b/verif/regress/dv-csr-embedded-tests.sh index 277c8f395b..0e091230bd 100644 --- a/verif/regress/dv-csr-embedded-tests.sh +++ b/verif/regress/dv-csr-embedded-tests.sh @@ -13,8 +13,14 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-uvm,spike +fi + # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh source ./verif/sim/setup-env.sh @@ -26,10 +32,6 @@ if ! [ -n "$DV_TARGET" ]; then DV_TARGET=cv32a65x fi -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-uvm,spike -fi - cd verif/sim/ python3 cva6.py --testlist=../tests/testlist_csr_embedded.yaml --iss_yaml cva6.yaml --target $DV_TARGET --iss=$DV_SIMULATORS $DV_OPTS --priv=m --iss_timeout 600 --linker=../../config/gen_from_riscv_config/$DV_TARGET/linker/link.ld diff --git a/verif/regress/dv-generated-tests.sh b/verif/regress/dv-generated-tests.sh index 62f3bcf0b8..36eff7eeeb 100644 --- a/verif/regress/dv-generated-tests.sh +++ b/verif/regress/dv-generated-tests.sh @@ -18,7 +18,6 @@ if ! [ -n "$RISCV" ]; then fi # install the required tools -source ./verif/regress/install-verilator.sh source ./verif/regress/install-spike.sh source ./verif/sim/setup-env.sh @@ -27,10 +26,6 @@ if ! [ -n "$DV_TARGET" ]; then DV_TARGET=cv32a65x fi -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-uvm,spike -fi - if ! [ -n "$list_num" ]; then list_num=1 #default test list fi diff --git a/verif/regress/dv-generated-xif-tests.sh b/verif/regress/dv-generated-xif-tests.sh index 0405ee4910..0476e5b56d 100644 --- a/verif/regress/dv-generated-xif-tests.sh +++ b/verif/regress/dv-generated-xif-tests.sh @@ -18,7 +18,6 @@ if ! [ -n "$RISCV" ]; then fi # install the required tools -source ./verif/regress/install-verilator.sh source ./verif/regress/install-spike.sh source ./verif/sim/setup-env.sh @@ -27,10 +26,6 @@ if ! [ -n "$DV_TARGET" ]; then DV_TARGET=cv32a65x fi -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-uvm,spike -fi - if ! [ -n "$list_num" ]; then list_num=1 #default test list fi diff --git a/verif/regress/dv-riscv-tests.sh b/verif/regress/dv-riscv-tests.sh index 4cf86d38ed..913244c9ca 100755 --- a/verif/regress/dv-riscv-tests.sh +++ b/verif/regress/dv-riscv-tests.sh @@ -13,8 +13,14 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=veri-testharness,spike +fi + # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh source verif/regress/install-riscv-tests.sh @@ -24,10 +30,6 @@ if ! [ -n "$DV_TARGET" ]; then DV_TARGET=cv64a6_imafdc_sv39 fi -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=veri-testharness,spike -fi - if ! [ -n "$DV_TESTLISTS" ]; then DV_TESTLISTS="../tests/testlist_riscv-tests-$DV_TARGET-p.yaml \ ../tests/testlist_riscv-tests-$DV_TARGET-v.yaml" diff --git a/verif/regress/hwconfig_tests.sh b/verif/regress/hwconfig_tests.sh index cdbfafb2d3..8fbf0cd8ae 100644 --- a/verif/regress/hwconfig_tests.sh +++ b/verif/regress/hwconfig_tests.sh @@ -13,16 +13,18 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-uvm +fi + # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh source ./verif/sim/setup-env.sh -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-uvm -fi - if ! [ -n "$DV_TARGET" ]; then DV_TARGET=cv32a65x fi diff --git a/verif/regress/smoke-gen_tests.sh b/verif/regress/smoke-gen_tests.sh index 6f820180a9..1895dd7fb9 100644 --- a/verif/regress/smoke-gen_tests.sh +++ b/verif/regress/smoke-gen_tests.sh @@ -17,8 +17,14 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-uvm +fi + # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh source verif/sim/setup-env.sh @@ -27,10 +33,6 @@ if ! [ -n "$DV_TARGET" ]; then DV_TARGET=cv32a65x fi -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-uvm -fi - cd verif/sim/ cp ../env/corev-dv/custom/riscv_custom_instr_enum.sv ./dv/src/isa/custom/ python3 cva6.py --testlist=cva6_base_testlist.yaml --test riscv_arithmetic_basic_test_comp --iss_yaml cva6.yaml --target $DV_TARGET -cs ../env/corev-dv/target/rv32imcb/ --mabi ilp32 --isa rv32imc --isa_extension="zba,zbb,zbc,zbs,zcb" --simulator_yaml ../env/corev-dv/simulator.yaml --iss=$DV_SIMULATORS $DV_OPTS --priv=m -i 1 --iss_timeout 300 diff --git a/verif/regress/smoke-tests-cv32a65x.sh b/verif/regress/smoke-tests-cv32a65x.sh index 994415c419..cc1d8a37b7 100644 --- a/verif/regress/smoke-tests-cv32a65x.sh +++ b/verif/regress/smoke-tests-cv32a65x.sh @@ -13,8 +13,14 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-testharness,spike +fi # install the required tools +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh # setup sim env @@ -22,10 +28,6 @@ source ./verif/sim/setup-env.sh echo "$SPIKE_INSTALL_DIR$" -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-testharness,spike -fi - if ! [ -n "$UVM_VERBOSITY" ]; then export UVM_VERBOSITY=UVM_NONE fi diff --git a/verif/regress/smoke-tests-cv32a6_imac_sv32.sh b/verif/regress/smoke-tests-cv32a6_imac_sv32.sh index 3b18f911e1..6b6d4217d2 100644 --- a/verif/regress/smoke-tests-cv32a6_imac_sv32.sh +++ b/verif/regress/smoke-tests-cv32a6_imac_sv32.sh @@ -13,9 +13,14 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-testharness,spike +fi # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh # install the required test suites @@ -28,10 +33,6 @@ source ./verif/sim/setup-env.sh echo "$SPIKE_INSTALL_DIR$" -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-testharness,spike -fi - if ! [ -n "$UVM_VERBOSITY" ]; then export UVM_VERBOSITY=UVM_NONE fi diff --git a/verif/regress/smoke-tests-cv64a6_imafdc_sv39.sh b/verif/regress/smoke-tests-cv64a6_imafdc_sv39.sh index 8b09a0ba3a..d60ce010d2 100644 --- a/verif/regress/smoke-tests-cv64a6_imafdc_sv39.sh +++ b/verif/regress/smoke-tests-cv64a6_imafdc_sv39.sh @@ -13,9 +13,14 @@ if ! [ -n "$RISCV" ]; then return fi +if ! [ -n "$DV_SIMULATORS" ]; then + DV_SIMULATORS=vcs-testharness,spike +fi # install the required tools -source ./verif/regress/install-verilator.sh +if [[ "$DV_SIMULATORS" == *"veri-testharness"* ]]; then + source ./verif/regress/install-verilator.sh +fi source ./verif/regress/install-spike.sh # install the required test suites @@ -28,10 +33,6 @@ source ./verif/sim/setup-env.sh echo "$SPIKE_INSTALL_DIR$" -if ! [ -n "$DV_SIMULATORS" ]; then - DV_SIMULATORS=vcs-testharness,spike -fi - if ! [ -n "$UVM_VERBOSITY" ]; then export UVM_VERBOSITY=UVM_NONE fi