Testgen working for Lab 2

This commit is contained in:
David Harris 2022-01-26 18:01:51 +00:00
parent 492c1a488e
commit c60bb68bff
6 changed files with 28 additions and 26 deletions

View File

@ -36,7 +36,7 @@ string tvpaths[] = '{
"../../tests/imperas-riscv-tests/work/"
};
// *** make sure these are somewhere
// *** make sure these are somewhere
string imperas64a[] = '{
`MYIMPERASTEST,
"rv64a/WALLY-AMO", "2110",
@ -1467,8 +1467,11 @@ string imperas32f[] = '{
string wally64i[] = '{
`WALLYTEST,
"rv64i_m/I/add-01", "9010",
"rv64i_m/I/PIPELINE", "3010"
"rv64i_m/I/WALLY-ADD", "002010",
"rv64i_m/I/WALLY-SLT", "002010",
"rv64i_m/I/WALLY-SLTU", "002010",
"rv64i_m/I/WALLY-SUB", "002010",
"rv64i_m/I/WALLY-XOR", "002010"
};
string wally64priv[] = '{
@ -1485,7 +1488,11 @@ string imperas32f[] = '{
string wally32i[] = '{
`WALLYTEST,
"rv32i_m/I/PIPELINE", "3010"
"rv32i_m/I/WALLY-ADD", "002010",
"rv32i_m/I/WALLY-SLT", "002010",
"rv32i_m/I/WALLY-SLTU", "002010",
"rv32i_m/I/WALLY-SUB", "002010",
"rv32i_m/I/WALLY-XOR", "002010"
};
string wally32priv[] = '{

View File

@ -74,7 +74,7 @@ def writeVector(a, b, storecmd, xlen):
lines = lines + "li x" + str(reg2) + ", MASK_XLEN(" + formatstr.format(b) + ")\n"
lines = lines + test + " x" + str(reg3) + ", x" + str(reg1) + ", x" + str(reg2) + "\n"
lines = lines + storecmd + " x" + str(reg3) + ", " + str(wordsize*testnum) + "(x6)\n"
lines = lines + "RVTEST_IO_ASSERT_GPR_EQ(x7, " + str(reg3) +", "+formatstr.format(expected)+")\n"
# lines = lines + "RVTEST_IO_ASSERT_GPR_EQ(x7, " + str(reg3) +", "+formatstr.format(expected)+")\n"
f.write(lines)
if (xlen == 32):
line = formatrefstr.format(expected)+"\n"
@ -143,6 +143,8 @@ for xlen in xlens:
# print footer
line = "\n.EQU NUMTESTS," + str(testnum) + "\n\n"
f.write(line)
h = open("testgen_footer.S", "r")
for line in h:
f.write(line)

View File

@ -4,30 +4,14 @@ RVMODEL_HALT
RVTEST_DATA_BEGIN
.align 4
rvtest_data:
.word 0xbabecafe
.word 0x98765432
RVTEST_DATA_END
RVMODEL_DATA_BEGIN
signature_x8_0:
.fill 0*(XLEN/32),4,0xdeadbeef
signature_x8_1:
.fill 19*(XLEN/32),4,0xdeadbeef
signature_x1_0:
.fill 256*(XLEN/32),4,0xdeadbeef
signature_x1_1:
.fill 256*(XLEN/32),4,0xdeadbeef
signature_x1_2:
.fill 148*(XLEN/32),4,0xdeadbeef
wally_signature:
.fill NUMTESTS*(XLEN/32),4,0xdeadbeef
#ifdef rvtest_mtrap_routine

View File

@ -23,4 +23,4 @@ rvtest_entry_point:
RVMODEL_BOOT
RVTEST_CODE_BEGIN
RVTEST_SIGBASE( x8,signature_x8_1)
RVTEST_SIGBASE( x6, wally_signature)

View File

@ -28,7 +28,11 @@
# Description: Makefrag for RV32I architectural tests
rv32i_sc_tests = \
PIPELINE \
WALLY-ADD \
WALLY-SUB \
WALLY-SLT \
WALLY-SLTU \
WALLY-XOR
rv32i_tests = $(addsuffix .elf, $(rv32i_sc_tests))

View File

@ -28,6 +28,11 @@
# Description: Makefrag for RV64I architectural tests
rv64i_sc_tests = \
WALLY-ADD \
WALLY-SUB \
WALLY-SLT \
WALLY-SLTU \
WALLY-XOR
rv64i_tests = $(addsuffix .elf, $(rv64i_sc_tests))