Skip to content

Commit

Permalink
Enable ZBA, ZBB, ZBC, ZBS in cva6 env & generated tests (#1587)
Browse files Browse the repository at this point in the history
  • Loading branch information
AyoubJalali authored Oct 31, 2023
1 parent a99f115 commit 797f0a9
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 14 deletions.
9 changes: 8 additions & 1 deletion verif/env/corev-dv/target/rv32imcb/riscv_core_setting.sv
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ privileged_mode_t supported_privileged_mode[] = {MACHINE_MODE};
riscv_instr_name_t unsupported_instr[];

// ISA supported by the processor
riscv_instr_group_t supported_isa[$] = {RV32I, RV32M, RV32C, RV32B, RV32X};
riscv_instr_group_t supported_isa[$] = {RV32I,
RV32M,
RV32C,
RV32ZBA,
RV32ZBB,
RV32ZBC,
RV32ZBS,
RV32X};

// Interrupt mode support
mtvec_mode_t supported_interrupt_mode[$] = {DIRECT, VECTORED};
Expand Down
8 changes: 4 additions & 4 deletions verif/env/uvme/uvme_cva6_cfg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ class uvme_cva6_cfg_c extends uvma_core_cntrl_cfg_c;
ext_v_supported == 0;
ext_f_supported == 0;
ext_d_supported == 0;
ext_zba_supported == 0;
ext_zbb_supported == 0;
ext_zbc_supported == 0;
ext_zba_supported == 1;
ext_zbb_supported == 1;
ext_zbc_supported == 1;
ext_zbe_supported == 0;
ext_zbf_supported == 0;
ext_zbm_supported == 0;
ext_zbp_supported == 0;
ext_zbr_supported == 0;
ext_zbs_supported == 0;
ext_zbs_supported == 1;
ext_zbt_supported == 0;
ext_zifencei_supported == 1;
ext_zicsr_supported == 1;
Expand Down
2 changes: 1 addition & 1 deletion verif/regress/dv-generated-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ printf "+=======================================================================
j=0
while [[ $j -lt ${#TEST_NAME[@]} ]];do
cp ../env/corev-dv/custom/riscv_custom_instr_enum.sv ./dv/src/isa/custom/
python3 cva6.py --testlist=$TESTLIST_FILE --test ${TEST_NAME[j]} --iss_yaml cva6.yaml --target $DV_TARGET -cs ../env/corev-dv/target/rv32imcb/ --mabi ilp32 --isa rv32imc --simulator_yaml ../env/corev-dv/simulator.yaml --iss=vcs-uvm,spike -i ${I[j]} -bz 1 --iss_timeout 300
python3 cva6.py --testlist=$TESTLIST_FILE --test ${TEST_NAME[j]} --iss_yaml cva6.yaml --target $DV_TARGET -cs ../env/corev-dv/target/rv32imcb/ --mabi ilp32 --isa rv32imc --isa_extension="zba,zbb,zbc,zbs" --simulator_yaml ../env/corev-dv/simulator.yaml --iss=vcs-uvm,spike -i ${I[j]} -bz 1 --iss_timeout 300
n=0
echo "Generate the test: ${TEST_NAME[j]}"
#this while loop detects the failed tests from the log file and remove them
Expand Down
2 changes: 1 addition & 1 deletion verif/regress/dv-generated-xif-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ printf "+=======================================================================
j=0
while [[ $j -lt ${#TEST_NAME[@]} ]];do
cp ../env/corev-dv/custom/riscv_custom_instr_enum.sv ./dv/src/isa/custom/
python3 cva6.py --testlist=$TESTLIST_FILE --test ${TEST_NAME[j]} --iss_yaml cva6.yaml --target $DV_TARGET -cs ../env/corev-dv/target/rv32imcb/ --mabi ilp32 --isa rv32imc --simulator_yaml ../env/corev-dv/simulator.yaml --iss=vcs-uvm,spike -i ${I[j]} -bz 1 --iss_timeout 300
python3 cva6.py --testlist=$TESTLIST_FILE --test ${TEST_NAME[j]} --iss_yaml cva6.yaml --target $DV_TARGET -cs ../env/corev-dv/target/rv32imcb/ --mabi ilp32 --isa rv32imc --isa_extension="zba,zbb,zbc,zbs" --simulator_yaml ../env/corev-dv/simulator.yaml --iss=vcs-uvm,spike -i ${I[j]} -bz 1 --iss_timeout 300
n=0
echo "Generate the test: ${TEST_NAME[j]}"
#this while loop detects the failed tests from the log file and remove them
Expand Down
6 changes: 3 additions & 3 deletions verif/regress/smoke-gen_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ 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 --simulator_yaml ../env/corev-dv/simulator.yaml --iss=$DV_SIMULATORS $DV_OPTS -i 1 --iss_timeout 300
python3 cva6.py --testlist=cva6_base_testlist.yaml --test riscv_load_store_test --iss_yaml cva6.yaml --target $DV_TARGET -cs ../env/corev-dv/target/rv32imcb/ --mabi ilp32 --isa rv32imc --simulator_yaml ../env/corev-dv/simulator.yaml --iss=$DV_SIMULATORS $DV_OPTS -i 1 --iss_timeout 300
python3 cva6.py --testlist=cva6_base_testlist.yaml --test riscv_unaligned_load_store_test --iss_yaml cva6.yaml --target $DV_TARGET -cs ../env/corev-dv/target/rv32imcb/ --mabi ilp32 --isa rv32imc --simulator_yaml ../env/corev-dv/simulator.yaml --iss=$DV_SIMULATORS $DV_OPTS -i 1 --iss_timeout 300
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" --simulator_yaml ../env/corev-dv/simulator.yaml --iss=$DV_SIMULATORS $DV_OPTS -i 1 --iss_timeout 300
python3 cva6.py --testlist=cva6_base_testlist.yaml --test riscv_load_store_test --iss_yaml cva6.yaml --target $DV_TARGET -cs ../env/corev-dv/target/rv32imcb/ --mabi ilp32 --isa rv32imc --isa_extension="zba,zbb,zbc,zbs" --simulator_yaml ../env/corev-dv/simulator.yaml --iss=$DV_SIMULATORS $DV_OPTS -i 1 --iss_timeout 300
python3 cva6.py --testlist=cva6_base_testlist.yaml --test riscv_unaligned_load_store_test --iss_yaml cva6.yaml --target $DV_TARGET -cs ../env/corev-dv/target/rv32imcb/ --mabi ilp32 --isa rv32imc --isa_extension="zba,zbb,zbc,zbs" --simulator_yaml ../env/corev-dv/simulator.yaml --iss=$DV_SIMULATORS $DV_OPTS -i 1 --iss_timeout 300
make clean_all

cd -
116 changes: 112 additions & 4 deletions verif/sim/cva6_base_testlist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
+directed_instr_1=riscv_load_store_hazard_instr_stream,10
+directed_instr_2=riscv_multi_page_load_store_instr_stream,10
+directed_instr_3=riscv_mem_region_stress_test,10
+disable_compressed_instr=0
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -56,6 +59,10 @@
+directed_instr_2=riscv_multi_page_load_store_instr_stream,10
+directed_instr_3=riscv_mem_region_stress_test,10
+hint_instr_ratio=500
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -70,6 +77,10 @@
+directed_instr_1=riscv_jal_instr,20
+illegal_instr_ratio=100
+tvec_alignment=8
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -82,6 +93,10 @@
+num_of_sub_program=0
+directed_instr_1=riscv_jal_instr,70
+hint_instr_ratio=500
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -94,6 +109,10 @@
+num_of_sub_program=0
+directed_instr_0=riscv_jal_instr,70
+disable_compressed_instr=1
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -108,7 +127,10 @@
+no_branch_jump=0
+directed_instr_0=riscv_load_store_rand_instr_stream,70
+directed_instr_1=riscv_load_store_hazard_instr_stream,50
+disable_compressed_instr=0
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -124,6 +146,10 @@
+directed_instr_0=riscv_load_store_rand_instr_stream,20
+directed_instr_1=riscv_load_store_hazard_instr_stream,50
+disable_compressed_instr=1
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -140,7 +166,10 @@
+no_branch_jump=1
+boot_mode=m
+no_csr_instr=1
+disable_compressed_instr=0
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -159,6 +188,10 @@
+enable_x_extension=1
+disable_compressed_instr=1
+tvec_alignment=8
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -176,6 +209,10 @@
+enable_x_extension=1
+illegal_instr_ratio=100
+tvec_alignment=8
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -192,6 +229,10 @@
+directed_instr_1=riscv_load_store_hazard_instr_stream,50
+tvec_alignment=8
+enable_x_extension=1
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -205,6 +246,10 @@
+directed_instr_1=riscv_jal_instr,70
+enable_x_extension=1
+tvec_alignment=8
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -222,6 +267,10 @@
+boot_mode=m
+no_csr_instr=1
+disable_compressed_instr=1
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -238,6 +287,10 @@
+no_branch_jump=1
+boot_mode=m
+no_csr_instr=1
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -254,6 +307,10 @@
+no_branch_jump=0
+boot_mode=m
+no_csr_instr=1
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -269,6 +326,10 @@
+no_branch_jump=1
+boot_mode=m
+no_csr_instr=1
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -285,6 +346,10 @@
+no_csr_instr=1
+illegal_instr_ratio=100
+tvec_alignment=8
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -303,7 +368,10 @@
+directed_instr_1=riscv_load_store_hazard_instr_stream,20
+enable_unaligned_load_store=1
+tvec_alignment=8
+disable_compressed_instr=1
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -322,6 +390,10 @@
+enable_access_invalid_csr_level=1
+disable_compressed_instr=1
+tvec_alignment=8
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -338,6 +410,10 @@
+boot_mode=m
+enable_dummy_csr_write=1
+no_csr_instr=0
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -357,6 +433,10 @@
+randomize_csr=1
+enable_acess_invalid_csr_level=1
+tvec_alignment=8
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -376,6 +456,10 @@
+enable_illegal_csr_instruction=1
+hint_instr_ratio=150
+tvec_alignment=8
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -396,6 +480,10 @@
+illegal_instr_ratio=100
+hint_instr_ratio=100
+tvec_alignment=8
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -412,6 +500,10 @@
+no_branch_jump=1
+boot_mode=m
+no_csr_instr=1
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -430,6 +522,10 @@
+no_dret=0
+no_fence=0
+tvec_alignment=8
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_base_test_c
rtl_test: core_base_test
Expand All @@ -447,6 +543,10 @@
+no_csr_instr=1
+enable_same_reg=1
+disable_compressed_instr=1
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_hazard_test_c
rtl_test: core_base_test
Expand All @@ -464,6 +564,10 @@
+no_csr_instr=1
+enable_rdrs1_hazard=1
+disable_compressed_instr=1
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_hazard_test_c
rtl_test: core_base_test
Expand All @@ -481,6 +585,10 @@
+no_csr_instr=1
+enable_rdrs2_hazard=1
+disable_compressed_instr=1
+enable_zba_extension=1
+enable_zbb_extension=1
+enable_zbc_extension=1
+enable_zbs_extension=1
iterations: 2
gen_test: cva6_instr_hazard_test_c
rtl_test: core_base_test

0 comments on commit 797f0a9

Please sign in to comment.