Added Zaamo and Zalrsc support to testbench and regression

This commit is contained in:
David Harris 2024-05-10 05:41:00 -07:00
parent 04457d49f7
commit 66b33c09be
4 changed files with 33 additions and 11 deletions

View File

@ -28,9 +28,9 @@ tests = [
["rv32i", ["arch32i"]],
["rv32imc", ["arch32i", "arch32c", "arch32m", "wally32periph"]],
["rv32gc", ["arch32f", "arch32d", "arch32f_fma", "arch32d_fma", "arch32f_divsqrt", "arch32d_divsqrt",
"arch32i", "arch32priv", "arch32c", "arch32m", "arch32a", "arch32zifencei", "arch32zicond",
"arch32i", "arch32priv", "arch32c", "arch32m", "arch32a_amo", "arch32zifencei", "arch32zicond",
"arch32zba", "arch32zbb", "arch32zbc", "arch32zbs", "arch32zfh", "arch32zfh_fma",
"arch32zfh_divsqrt", "arch32zfaf", "arch32zfad", "wally32a", "wally32priv", "wally32periph", "arch32zcb",
"arch32zfh_divsqrt", "arch32zfaf", "arch32zfad", "wally32a_lrsc", "wally32priv", "wally32periph", "arch32zcb",
"arch32zbkb", "arch32zbkc", "arch32zbkx", "arch32zknd", "arch32zkne", "arch32zknh"]],
["rv64i", ["arch64i"]]
]
@ -51,7 +51,7 @@ tests_buildrootboot = [
# Separate out floating-point tests for RV64 to speed up coverage
tests64gc_nofp = [
["rv64gc", ["coverage64gc", "arch64i", "arch64priv", "arch64c", "arch64m", "arch64zcb",
"arch64zifencei", "arch64zicond", "arch64a", "wally64a", "wally64periph", "wally64priv",
"arch64zifencei", "arch64zicond", "arch64a_amo", "wally64a_lrsc", "wally64periph", "wally64priv",
"arch64zbkb", "arch64zbkc", "arch64zbkx", "arch64zknd", "arch64zkne", "arch64zknh",
"arch64zba", "arch64zbb", "arch64zbc", "arch64zbs"]] # add when working: "arch64zicboz"
]
@ -93,6 +93,12 @@ derivconfigtests = [
["nodcache_rv64gc", ["ahb64"]],
["nocache_rv64gc", ["ahb64"]],
# Atomic variatnts
["zaamo_rv64gc", ["arch64i", "arch64a_amo"]],
["zalrsc_rv64gc", ["arch64i", "wally64a_lrsc"]],
["zaamo_rv32gc", ["arch32i", "arch32a_amo"]],
["zalrsc_rv32gc", ["arch32i", "wally32a_lrsc"]],
### add misaligned tests
# fp/int divider permutations

View File

@ -511,6 +511,22 @@ BIGENDIAN_SUPPORTED 0
deriv nobigendian_rv64gc rv64gc
BIGENDIAN_SUPPORTED 0
deriv zaamo_rv32gc rv32gc
MISA (32'h00000104 | 1 << 20 | 1 << 18 | 1 << 12 | 1 <<3 | 1 << 5);
ZAAMO_SUPPORTED 1
deriv zalrsc_rv32gc rv32gc
MISA (32'h00000104 | 1 << 20 | 1 << 18 | 1 << 12 | 1 <<3 | 1 << 5);
ZALRSC_SUPPORTED 1
deriv zaamo_rv64gc rv64gc
MISA (32'h00000104 | 1 << 20 | 1 << 18 | 1 << 12 | 1 <<3 | 1 << 5);
ZAAMO_SUPPORTED 1
deriv zalrsc_rv64gc rv64gc
MISA (32'h00000104 | 1 << 20 | 1 << 18 | 1 << 12 | 1 <<3 | 1 << 5);
ZALRSC_SUPPORTED 1
# Floating-point modes supported
deriv f_rv32gc rv32gc

View File

@ -128,7 +128,7 @@ module testbench;
if (P.ZICSR_SUPPORTED) tests = {arch64c, arch64cpriv};
else tests = {arch64c};
"arch64m": if (P.M_SUPPORTED) tests = arch64m;
"arch64a": if (P.A_SUPPORTED) tests = arch64a;
"arch64a_amo": if (P.A_SUPPORTED | P.ZAAMO_SUPPORTED) tests = arch64a_amo;
"arch64f": if (P.F_SUPPORTED) tests = arch64f;
"arch64d": if (P.D_SUPPORTED) tests = arch64d;
"arch64f_fma": if (P.F_SUPPORTED) tests = arch64f_fma;
@ -142,7 +142,7 @@ module testbench;
"imperas64d": if (P.D_SUPPORTED) tests = imperas64d;
"imperas64m": if (P.M_SUPPORTED) tests = imperas64m;
"wally64q": if (P.Q_SUPPORTED) tests = wally64q;
"wally64a": if (P.A_SUPPORTED) tests = wally64a;
"wally64a_lrsc": if (P.A_SUPPORTED | P.ZALRSC_SUPPORTED) tests = wally64a_lrsc;
"imperas64c": if (P.C_SUPPORTED) tests = imperas64c;
else tests = imperas64iNOc;
"custom": tests = custom;
@ -181,7 +181,7 @@ module testbench;
if (P.ZICSR_SUPPORTED) tests = {arch32c, arch32cpriv};
else tests = {arch32c};
"arch32m": if (P.M_SUPPORTED) tests = arch32m;
"arch32a": if (P.A_SUPPORTED) tests = arch32a;
"arch32a_amo": if (P.A_SUPPORTED | P.ZAAMO_SUPPORTED) tests = arch32a_amo;
"arch32f": if (P.F_SUPPORTED) tests = arch32f;
"arch32d": if (P.D_SUPPORTED) tests = arch32d;
"arch32f_fma": if (P.F_SUPPORTED) tests = arch32f_fma;
@ -193,7 +193,7 @@ module testbench;
"imperas32i": tests = imperas32i;
"imperas32f": if (P.F_SUPPORTED) tests = imperas32f;
"imperas32m": if (P.M_SUPPORTED) tests = imperas32m;
"wally32a": if (P.A_SUPPORTED) tests = wally32a;
"wally32a_lrsc": if (P.A_SUPPORTED | P.ZALRSC_SUPPORTED) tests = wally32a_lrsc;
"imperas32c": if (P.C_SUPPORTED) tests = imperas32c;
else tests = imperas32iNOc;
"wally32i": tests = wally32i;

View File

@ -927,12 +927,12 @@ string imperas32f[] = '{
"rv64i_m/Q/src/WALLY-q-01.S"
};
string wally64a[] = '{
string wally64a_lrsc[] = '{
`WALLYTEST,
"rv64i_m/privilege/src/WALLY-lrsc-01.S"
};
string wally32a[] = '{
string wally32a_lrsc[] = '{
`WALLYTEST,
"rv32i_m/privilege/src/WALLY-lrsc-01.S"
};
@ -974,7 +974,7 @@ string imperas32f[] = '{
"rv64i_m/Zicond/src/czero.nez-01.S"
};
string arch32a[] = '{
string arch32a_amo[] = '{
`RISCVARCHTEST,
"rv32i_m/A/src/amoadd.w-01.S",
"rv32i_m/A/src/amoand.w-01.S",
@ -1136,7 +1136,7 @@ string imperas32f[] = '{
"rv64i_m/M/src/remw-01.S"
};
string arch64a[] = '{
string arch64a_amo[] = '{
`RISCVARCHTEST,
"rv64i_m/A/src/amoadd.w-01.S",
"rv64i_m/A/src/amoand.w-01.S",